Commit Graph

13361 Commits

Author SHA1 Message Date
Benjamin Peterson 3bb6b7a5cd mark dictionary assertElementsSame test as an expected failure 2009-04-04 16:46:24 +00:00
Benjamin Peterson 4f75b64399 fix test_unittest 2009-04-04 16:39:09 +00:00
Benjamin Peterson 7fe73a17c5 Merged revisions 70837,70864,70878,71004,71032,71043 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70837 | gregory.p.smith | 2009-03-31 11:54:10 -0500 (Tue, 31 Mar 2009) | 9 lines

  The unittest.TestCase.assertEqual() now displays the differences in lists,
  tuples, dicts and sets on failure.

  Many new handy type and comparison specific assert* methods have been added
  that fail with error messages actually useful for debugging.  Contributed in
  by Google and completed with help from mfoord and GvR at PyCon 2009 sprints.

  Discussion lives in http://bugs.python.org/issue2578.
........
  r70864 | gregory.p.smith | 2009-03-31 14:03:28 -0500 (Tue, 31 Mar 2009) | 10 lines

  Rename the actual method definitions to the official assertFoo names.

  Adds unittests to make sure the old fail* names continue to work now
  and adds a comment that they are pending deprecation.

  Also adds a test to confirm that the plural Equals method variants
  continue to exist even though we're unlikely to deprecate those.

  http://bugs.python.org/issue2578
........
  r70878 | gregory.p.smith | 2009-03-31 14:59:14 -0500 (Tue, 31 Mar 2009) | 3 lines

  Issue an actual PendingDeprecationWarning for the TestCase.fail* methods.
  Document the deprecation.
........
  r71004 | benjamin.peterson | 2009-04-01 18:15:49 -0500 (Wed, 01 Apr 2009) | 1 line

  remove double underscores
........
  r71032 | michael.foord | 2009-04-01 22:20:38 -0500 (Wed, 01 Apr 2009) | 13 lines

  Better exception messages for unittest assert methods.

  - unittest.assertNotEqual() now uses the inequality operator (!=) instead
    of the equality operator.

  - Default assertTrue and assertFalse messages are now useful.

  - TestCase has a longMessage attribute. This defaults to False, but if set to True
    useful error messages are shown in addition to explicit messages passed to assert methods.

  Issue #5663
........
  r71043 | michael.foord | 2009-04-02 00:51:54 -0500 (Thu, 02 Apr 2009) | 7 lines

  Store the functions in the _type_equality_funcs as wrapped objects that are deep copyable.

  This allows for the deep copying of TestCase instances.

  Issue 5660
........
2009-04-04 16:35:46 +00:00
Antoine Pitrou 1144648543 Fix test_memoryio under Windows 2009-04-04 14:09:30 +00:00
Raymond Hettinger c47917071a Replace the localized min/max calls with normal if/else 2009-04-04 08:48:03 +00:00
R. David Murray 8b7d4aa746 Update documentation for csv module to reflect changes in code,
specifically that it now expects unicode input (and therefore the
paragraph about it not handling unicode is deleted, as well as
the 'how to handle unicode' examples) and that files should
be opened with "newline=''" instead of binary mode.  Also removed
unused BytesIO import from test_csv.

This addresses issue 4847.
2009-04-04 01:38:38 +00:00
Benjamin Peterson 3c33b833dd fix name again 2009-04-04 01:21:56 +00:00
Benjamin Peterson 3e0c9176fe fix name 2009-04-04 00:46:15 +00:00
Benjamin Peterson 4376dbc5f6 fix this test 2009-04-03 23:57:05 +00:00
Benjamin Peterson 309633db08 fix naming 2009-04-03 23:47:26 +00:00
Benjamin Peterson 8d55a9e8dd os.path.listdir -> os.listdir 2009-04-03 22:23:43 +00:00
Eric Smith a3b1ac8dca Added ',' thousands grouping to int.__format__. See PEP 378.
This is incomplete, but I want to get some version into the next alpha. I am still working on:
Documentation.
More tests.
Implement for floats.

In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
2009-04-03 14:45:06 +00:00
Alexandre Vassalotti b5292a2e27 Make http.server main program nicer for interactive use.
Remove unreachable calls to test().

This restores the behavior of SimpleHTTPServer, where a user could
type "python -m SimpleHTTPServer" and get a simple server for sharing
files. Now, you can do the same thing with "python3 -m http.server".
2009-04-03 07:16:55 +00:00
Raymond Hettinger b646aa1789 Localize the function lookup in timeit. 2009-04-03 02:45:36 +00:00
Raymond Hettinger 5614524293 Have namedtuple's field renamer assign names that
are consistent with the corresponding tuple index.
2009-04-02 22:31:59 +00:00
R. David Murray 548ac41079 In 3k this becomes an items() call.
Merged revisions 71046 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71046 | r.david.murray | 2009-04-02 10:05:35 -0400 (Thu, 02 Apr 2009) | 4 lines

  Add missing iteritems() call to the for loop in mailbox.MH.get_message().

  Fixes issue2625.
........
2009-04-02 19:44:43 +00:00
Brett Cannon 5561982b64 importlib.test.source.test_abc_loader was making a bad assumption that all file
paths used '/' as a path separator.

Fixes issue #5646.
2009-04-02 17:54:43 +00:00
Brett Cannon f86213f6f2 Make a test in importlib have a more robust test value. 2009-04-02 15:35:09 +00:00
Brett Cannon 978259e9b3 Give a more informative message on an importlib test upon failure. 2009-04-02 15:32:07 +00:00
Hye-Shik Chang 944820b044 Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat
error replacement returned by codec error callbacks twice in
IncrementalEncoder and StreamWriter.
2009-04-02 10:33:16 +00:00
Brett Cannon a3d056ed95 Check that on a platform that is expected to have a case-insensitive filesystem
that is in fact the case.

Closes issue #5442.
2009-04-02 05:17:54 +00:00
Senthil Kumaran 3e2ea79bda Fixing the issue4860. Escaping the embedded '"' in the js_output method of Morsel class. 2009-04-02 03:02:03 +00:00
Benjamin Peterson 9762a3eb87 add io and _pyio to test___all__ 2009-04-02 01:14:45 +00:00
Benjamin Peterson bfb959404f Merged revisions 71014 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71014 | benjamin.peterson | 2009-04-01 20:03:17 -0500 (Wed, 01 Apr 2009) | 1 line

  handle SEEK_ constants in test_io
........
2009-04-02 01:13:40 +00:00
Benjamin Peterson 8d5fd4ed5c add SEEK_ constants to _pyio 2009-04-02 01:03:26 +00:00
Benjamin Peterson 7fe9853596 make 'c' only accept bytes and 'C' only unicode #5499 2009-04-02 00:33:55 +00:00
Georg Brandl 33c2881b63 #5656: detect correct encoding of files when reporting coverage in trace.py, and ignore files in the temporary directory when reporting. 2009-04-01 23:07:29 +00:00
R. David Murray cde68cfc14 Merged revisions 70997 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70997 | r.david.murray | 2009-04-01 17:26:18 -0400 (Wed, 01 Apr 2009) | 3 lines

  Add tests checking the CSV module's ability to handle
  embedded newlines in quoted field values.
........
2009-04-01 22:37:58 +00:00
Benjamin Peterson 0e4caf4bd2 Merged revisions 70992,70995 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70992 | georg.brandl | 2009-04-01 16:00:55 -0500 (Wed, 01 Apr 2009) | 1 line

  #4572: add SEEK_* values as constants in io.py.
........
  r70995 | benjamin.peterson | 2009-04-01 16:12:54 -0500 (Wed, 01 Apr 2009) | 1 line

  add seek constants to __all__
........
2009-04-01 21:22:20 +00:00
Benjamin Peterson 91d7dfd77c barry has already been causing test breakage 2009-04-01 20:38:13 +00:00
Brett Cannon fcc052763e Merged revisions 70979 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70979 | brett.cannon | 2009-04-01 13:25:48 -0700 (Wed, 01 Apr 2009) | 3 lines

  test_warnings ironically had a single test that was not protecting the warnings
  filter and was resetting it.
........
2009-04-01 20:27:29 +00:00
Senthil Kumaran b3af08f84c Fix for issue5040. Adding support for unicode message passing and tests for unicode message and test for Content-Length. 2009-04-01 20:20:43 +00:00
Brett Cannon df8709d7b1 Merged revisions 70975 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70975 | brett.cannon | 2009-04-01 12:57:10 -0700 (Wed, 01 Apr 2009) | 4 lines

  test_logging was blindly clearing the warnings filter. This caused
  PendingDeprecationWarnings to be spewed all over by unittest.failIf*(). Fix
  moves over to using warnings.catch_warning to protect the warnings filter.
........
2009-04-01 20:01:47 +00:00
Raymond Hettinger 3f10a952f6 Issue #5647: MutableSet.__iand__() no longer mutates self during iteration. 2009-04-01 19:05:50 +00:00
Brett Cannon 0759dd66c5 Merged revisions 70965 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70965 | brett.cannon | 2009-04-01 11:03:59 -0700 (Wed, 01 Apr 2009) | 5 lines

  _warnings was importing itself to get an attribute. That's bad if warnings gets
  called in a thread that was spawned by an import itself.

  Last part to close #1665206.
........
2009-04-01 18:13:07 +00:00
R. David Murray 86fe876fb5 Remove redundant import of tkinter. 2009-04-01 16:39:21 +00:00
Brett Cannon f47e84ce63 Merged revisions 70956 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70956 | brett.cannon | 2009-04-01 09:00:34 -0700 (Wed, 01 Apr 2009) | 5 lines

  The cgitb module had imports in its functions. This can cause deadlock with the
  import lock if called from within a thread that was triggered by an import.

  Partially fixes issue #1665206.
........
2009-04-01 16:06:01 +00:00
Georg Brandl c748506427 #5636: fix next -> __next__ in csv reader docs. 2009-04-01 15:53:15 +00:00
Kristján Valur Jónsson 42a40c59a0 Allow skipping of regression tests not supported on windows. This reduces noise in the regression test suite for py3k on Windows. 2009-04-01 11:28:47 +00:00
Brett Cannon e3944a5e1e The BDFL has retired! Long live the FLUFL (Friendly Language Uncle For Life)! 2009-04-01 05:08:41 +00:00
Georg Brandl 4ed72acd68 #5624: _winreg is winreg in Python 3. 2009-04-01 04:28:33 +00:00
Georg Brandl 99412e559b Merged revisions 70940 via svnmerge
........
  r70940 | georg.brandl | 2009-03-31 23:21:14 -0500 (Di, 31 Mär 2009) | 2 lines

  The SimpleXMLRPCServer's CGI handler now runs like a pony.
........
2009-04-01 04:27:47 +00:00
Jack Diederich e0cbd69659 Merged revisions 70931 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70931 | jack.diederich | 2009-03-31 19:46:48 -0400 (Tue, 31 Mar 2009) | 1 line

  #5228: add pickle support to functools.partial
........
2009-04-01 04:27:09 +00:00
R. David Murray e59482ec9a Merged revisions 70936 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70936 | r.david.murray | 2009-03-31 23:21:43 -0400 (Tue, 31 Mar 2009) | 4 lines

  Fix issue 2522.  locale.format now checks that it is passed
  exactly one pattern, which avoids mysterious errors where it
  had seemed to fail to do localization.
........
2009-04-01 03:42:00 +00:00
Brett Cannon 12e533d7bf Rip out a useless method that the superclass implements properly. 2009-04-01 03:35:20 +00:00
Jeremy Hylton a7cff0230b An HTTPResponse is, by its nature, readable. 2009-04-01 02:35:56 +00:00
R. David Murray 6af6d264e2 Merged revisions 70930 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70930 | r.david.murray | 2009-03-31 19:45:39 -0400 (Tue, 31 Mar 2009) | 3 lines

  Fix Windows test skip error revealed by buildbot.  Also a comment spelling
  correction in a previously fixed test.
........
2009-03-31 23:50:31 +00:00
R. David Murray a21e4ca3c6 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
........
  r70734 | r.david.murray | 2009-03-30 15:04:00 -0400 (Mon, 30 Mar 2009) | 7 lines

  Add import_function method to test.test_support, and modify a number of
  tests that expect to be skipped if imports fail or functions don't
  exist to use import_function and import_module.  The ultimate goal is
  to change regrtest to not skip automatically on ImportError.  Checking
  in now to make sure the buldbots don't show any errors on platforms
  I can't direct test on.
........
  r70775 | r.david.murray | 2009-03-30 19:05:48 -0400 (Mon, 30 Mar 2009) | 4 lines

  Change more tests to use import_module for the modules that
  should cause tests to be skipped.  Also rename import_function
  to the more descriptive get_attribute and add a docstring.
........
  r70856 | r.david.murray | 2009-03-31 14:32:17 -0400 (Tue, 31 Mar 2009) | 7 lines

  A few more test skips via import_module, and change import_module to
  return the error message produced by importlib, so that if an import
  in the package whose import is being wrapped is what failed the skip
  message will contain the name of that module instead of the name of the
  wrapped module.  Also fixed formatting of some previous comments.
........
  r70874 | r.david.murray | 2009-03-31 15:33:15 -0400 (Tue, 31 Mar 2009) | 5 lines

  Improve test_support.import_module docstring, remove
  deprecated flag from get_attribute since it isn't likely
  to do anything useful.
........
  r70876 | r.david.murray | 2009-03-31 15:49:15 -0400 (Tue, 31 Mar 2009) | 4 lines

  Remove the regrtest check that turns any ImportError into a skipped test.
  Hopefully all modules whose imports legitimately result in a skipped
  test have been properly wrapped by the previous commits.
........
  r70877 | r.david.murray | 2009-03-31 15:57:24 -0400 (Tue, 31 Mar 2009) | 2 lines

  Add NEWS entry for regrtest change.
........
2009-03-31 23:16:50 +00:00
Benjamin Peterson a1b49013f4 fix TextIOWrapper.read() when the buffer is not readable #5628 2009-03-31 23:11:32 +00:00
Tarek Ziadé 30911294d8 Merged revisions 70920,70922 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70920 | tarek.ziade | 2009-03-31 17:44:10 -0500 (Tue, 31 Mar 2009) | 1 line

  catching msvc9compiler error as well
........
  r70922 | tarek.ziade | 2009-03-31 17:47:01 -0500 (Tue, 31 Mar 2009) | 1 line

  fixed the test for win32 CompileError
........
2009-03-31 22:50:54 +00:00
Tarek Ziadé b2e36f1df7 Merged revisions 70910 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70910 | tarek.ziade | 2009-03-31 17:27:23 -0500 (Tue, 31 Mar 2009) | 1 line

  #5583 Added optional Extensions in Distutils
........
2009-03-31 22:37:55 +00:00
Tarek Ziadé baf518046c Merged revisions 70886,70888-70892 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70886 | tarek.ziade | 2009-03-31 15:50:59 -0500 (Tue, 31 Mar 2009) | 1 line

  added tests for the clean command
........
  r70888 | tarek.ziade | 2009-03-31 15:53:13 -0500 (Tue, 31 Mar 2009) | 1 line

  more tests for the register command
........
  r70889 | tarek.ziade | 2009-03-31 15:53:55 -0500 (Tue, 31 Mar 2009) | 1 line

  more tests for the upload command
........
  r70890 | tarek.ziade | 2009-03-31 15:54:38 -0500 (Tue, 31 Mar 2009) | 1 line

  added test to the install_data command
........
  r70891 | tarek.ziade | 2009-03-31 15:55:21 -0500 (Tue, 31 Mar 2009) | 1 line

  added tests to the install_headers command
........
  r70892 | tarek.ziade | 2009-03-31 15:56:11 -0500 (Tue, 31 Mar 2009) | 1 line

  making sdist and config test silents
........
2009-03-31 21:37:16 +00:00
Hirokazu Yamamoto 2ca15013ec Merged revisions 70879 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70879 | hirokazu.yamamoto | 2009-04-01 05:14:04 +0900 | 1 line

  Issue #5387: Fixed mmap.move crash by integer overflow. (take2)
........
2009-03-31 20:43:56 +00:00
R. David Murray a6f2946cd5 Merged revisions 70779 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70779 | r.david.murray | 2009-03-30 19:10:37 -0400 (Mon, 30 Mar 2009) | 3 lines

  Actually suppress warnings in test_at_least_import_untested_modules
  inside the catch_warnings context manager.
........
2009-03-31 18:27:51 +00:00
Raymond Hettinger 9dbc6706b0 Per the language summit, the optional fastpath imports should use from-import-star. 2009-03-31 17:51:51 +00:00
Jeremy Hylton 2bdb576e70 Make urllib use HTTP/1.1. It seems to work now, but hasn't been
carefully tested.
2009-03-31 16:37:16 +00:00
Jeremy Hylton f37708e048 Merged revisions 70801,70809 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

The merge ran into a lot of conflicts because dicts were replaced with
sets in the Python 3 version of the symbol table.

........
  r70801 | jeremy.hylton | 2009-03-31 09:17:03 -0400 (Tue, 31 Mar 2009) | 3 lines

  Add is_declared_global() which distinguishes between implicit and
  explicit global variables.
........
  r70809 | jeremy.hylton | 2009-03-31 09:48:15 -0400 (Tue, 31 Mar 2009) | 14 lines

  Global statements from one function leaked into parallel functions.

  Re http://bugs.python.org/issue4315

  The symbol table used the same name dictionaries to recursively
  analyze each of its child blocks, even though the dictionaries are
  modified during analysis.  The fix is to create new temporary
  dictionaries via the analyze_child_block().  The only information that
  needs to propagate back up is the names of the free variables.

  Add more comments and break out a helper function.  This code doesn't
  get any easier to understand when you only look at it once a year.
........
2009-03-31 15:26:37 +00:00
Jeremy Hylton 6c5e28c383 Simplify the Request class. The basic components of the parsed
Request are now available as public attributes, e.g. full_url and
host.  The accessor methods are deprecated.  The implementation
replace the complicated __getattr__ machinery with a _parse() method.

The response from an HTTP request is now an HTTPResponse instance
instead of an addinfourl() wrapper instance.  The wrapper provided
minimal extract functionality and was undocumented.  The API of
addinfourl() was preserved, except for close hooks, by adding a few
methods and public attributes to the HTTPResponse class.
2009-03-31 14:35:53 +00:00
Hirokazu Yamamoto 16caab00a2 Merged revisions 70800 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70800 | hirokazu.yamamoto | 2009-03-31 22:13:05 +0900 | 1 line

  Issue #5387: Fixed mmap.move crash by integer overflow.
........
2009-03-31 13:44:06 +00:00
Georg Brandl ab6f2f6eb6 Fix segfaults when running test_exceptions with coverage tracing, caused by wrongly defining Exception.__context__ as a T_OBJECT structmember which does not set the member to NULL on None assignment, and generally does not do type checks. This could be used to crash the interpreter by setting any object to __context__. The same applies to __cause__. Also document the PyException_* functions. 2009-03-31 04:16:10 +00:00
Brett Cannon 71095ea4ce The message for the exception when time.strptime was passed something other
than str did not output the type of the argument but the object itself.
2009-03-31 03:58:04 +00:00
Jesse Noller 14f3ae2723 merge 70792 to py3k 2009-03-31 03:37:07 +00:00
Jesse Noller f8d0085510 merge 70783 to py3k 2009-03-31 03:25:07 +00:00
Georg Brandl 6d4a9cf85f Add new copydir_run_2to3() function, for use e.g. in test runners to transparently convert and run tests written for Python 2. 2009-03-31 00:34:54 +00:00
Ronald Oussoren fa1fcd107d Merged revisions 70778 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70778 | ronald.oussoren | 2009-03-30 18:10:35 -0500 (Mon, 30 Mar 2009) | 4 lines

  Fix issue #4865: add /Library/Python/2.7/site-packages to
  sys.path on OSX, to make it easier to share (some) installed
  packages between the system install and a user install.
........
2009-03-30 23:16:10 +00:00
Barry Warsaw 70d61cedf7 "Port" the fix for issue 1974 from the trunk (2.7). Because Python 3.x does things much better, less changes are necessary.
This also shoves test_email_codecs_rename.py onto test_email_codecs.py even though the test needs to be ported to Python 3.
2009-03-30 23:12:30 +00:00
Jesse Noller 35d1f00902 finalize the queue to resolve test issue 2009-03-30 22:59:27 +00:00
Guido van Rossum 0ad59d467d Issue #5604: non-ASCII characters in module name passed to
imp.find_module() were converted to UTF-8 while the path is
converted to the default filesystem encoding, causing nonsense.
Thanks to Andrew Svetlov.

(This time to the right branch.  Will block duplicate merge to 3.0.2.)
2009-03-30 22:01:35 +00:00
Senthil Kumaran eaaec27b6e Fix for Issue4962, issue4675. 2009-03-30 21:54:41 +00:00
Brett Cannon 7f6b4f86e3 Make sure time.strptime only accepts strings (and document the fact like
strftime). Already didn't accept bytes but make the check earlier. This also
lifts the limitation of requiring ASCII.

Closes issue #5236. Thanks Tennessee Leeuwenburg.
2009-03-30 21:30:26 +00:00
Brett Cannon 8593a75688 Fix importlib.machinery.PathFinder.find_module() to essentially skip over None
entries in sys.path_importer_cache. While this differs from semantics in how
__import__ works, it prevents any implicit semantics from taking hold with
users.
2009-03-30 19:57:15 +00:00
Jesse Noller c5d28a0b03 Merge 70717 to 30maint 2009-03-30 16:37:36 +00:00
Brett Cannon 6ae7a7d13d Add simple tests for __import__ for future optimizations to importlib. 2009-03-30 15:53:01 +00:00
Benjamin Peterson ded31c47af Merged revisions 70656,70668-70669,70671,70701,70703,70706 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70656 | georg.brandl | 2009-03-28 14:33:33 -0500 (Sat, 28 Mar 2009) | 2 lines

  Add a script to fixup rst files if the pre-commit hook rejects them.
........
  r70668 | benjamin.peterson | 2009-03-28 22:16:57 -0500 (Sat, 28 Mar 2009) | 1 line

  a more realistic example
........
  r70669 | benjamin.peterson | 2009-03-28 22:31:40 -0500 (Sat, 28 Mar 2009) | 1 line

  stop the versionchanged directive from hiding the docs
........
  r70671 | benjamin.peterson | 2009-03-28 22:39:58 -0500 (Sat, 28 Mar 2009) | 1 line

  fix consistency
........
  r70701 | benjamin.peterson | 2009-03-29 17:27:26 -0500 (Sun, 29 Mar 2009) | 1 line

  add missing import
........
  r70703 | benjamin.peterson | 2009-03-29 21:14:21 -0500 (Sun, 29 Mar 2009) | 1 line

  fix import
........
  r70706 | benjamin.peterson | 2009-03-30 09:42:23 -0500 (Mon, 30 Mar 2009) | 1 line

  add missing import
........
2009-03-30 15:04:16 +00:00
Benjamin Peterson 5879d4122a Merged revisions 70578,70599,70641-70642,70650,70660-70661,70674,70691,70697-70698,70700,70704 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70578 | benjamin.peterson | 2009-03-23 22:24:56 -0500 (Mon, 23 Mar 2009) | 1 line

  this is better written using assertRaises
........
  r70599 | benjamin.peterson | 2009-03-25 16:42:51 -0500 (Wed, 25 Mar 2009) | 1 line

  this can be slightly less ugly
........
  r70641 | guilherme.polo | 2009-03-27 16:43:08 -0500 (Fri, 27 Mar 2009) | 3 lines

  Adjusted _tkinter to compile without warnings when WITH_THREAD is not
  defined (part of issue #5035)
........
  r70642 | georg.brandl | 2009-03-27 19:48:48 -0500 (Fri, 27 Mar 2009) | 1 line

  Fix typo.
........
  r70650 | benjamin.peterson | 2009-03-28 14:16:10 -0500 (Sat, 28 Mar 2009) | 1 line

  give os.symlink and os.link() better parameter names #5564
........
  r70660 | georg.brandl | 2009-03-28 14:52:58 -0500 (Sat, 28 Mar 2009) | 1 line

  Switch to fixed Sphinx version.
........
  r70661 | georg.brandl | 2009-03-28 14:57:36 -0500 (Sat, 28 Mar 2009) | 2 lines

  Add section numbering to some of the larger subdocuments.
........
  r70674 | guilherme.polo | 2009-03-29 05:19:05 -0500 (Sun, 29 Mar 2009) | 1 line

  Typo fix.
........
  r70691 | raymond.hettinger | 2009-03-29 13:51:11 -0500 (Sun, 29 Mar 2009) | 1 line

  Make life easier for non-CPython implementations.
........
  r70697 | benjamin.peterson | 2009-03-29 16:22:35 -0500 (Sun, 29 Mar 2009) | 1 line

  this has been fixed since 2.6 (I love removing these)
........
  r70698 | benjamin.peterson | 2009-03-29 16:31:05 -0500 (Sun, 29 Mar 2009) | 1 line

  thanks to guido's bytecode verifier, this is fixed
........
  r70700 | benjamin.peterson | 2009-03-29 16:50:14 -0500 (Sun, 29 Mar 2009) | 1 line

  use the awesome new status iterator
........
  r70704 | benjamin.peterson | 2009-03-29 21:49:32 -0500 (Sun, 29 Mar 2009) | 1 line

  there's actually three methods here #5600
........
2009-03-30 14:51:56 +00:00
Antoine Pitrou 5550365f4b Fix test_subprocess so that it works when launched from another directory than
the source dist.
2009-03-29 19:30:55 +00:00
Raymond Hettinger 0dd737b5ab Make life easier for non-CPython implementations 2009-03-29 19:30:50 +00:00
Antoine Pitrou 7d037a7b52 Plug another leak, and finally add a test for #1174606 (read() from /dev/zero).
The leak was the reason my previous attempts at testing failed...
2009-03-29 18:55:12 +00:00
Mark Dickinson b40b947c86 Issue #5463: Remove _PY_STRUCT_RANGE_CHECKING constant from struct
module, and remove associated code from test_struct.  This was a
mechanism for skipping some of the tests for overflow behaviour when
packing integers; it's no longer necessary.
2009-03-29 16:58:21 +00:00
Benjamin Peterson 48e2478329 fix variable name #5595 2009-03-29 13:02:52 +00:00
Collin Winter fd12f4972b Port r70672 to py3k. Add the ability to control the random seed used by regrtest.py -r. 2009-03-29 04:05:05 +00:00
Benjamin Peterson e549ead826 Merged revisions 70554,70588-70589,70598,70605,70611-70621,70623-70624,70626-70627 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70554 | benjamin.peterson | 2009-03-23 16:25:15 -0500 (Mon, 23 Mar 2009) | 1 line

  complain when there's no last exception
........
  r70588 | benjamin.peterson | 2009-03-24 17:56:32 -0500 (Tue, 24 Mar 2009) | 1 line

  fix newline issue in test summary
........
  r70589 | benjamin.peterson | 2009-03-24 18:07:07 -0500 (Tue, 24 Mar 2009) | 1 line

  another style nit
........
  r70598 | benjamin.peterson | 2009-03-25 16:24:04 -0500 (Wed, 25 Mar 2009) | 1 line

  add shorthands for expected failures and unexpected success
........
  r70605 | benjamin.peterson | 2009-03-26 11:32:23 -0500 (Thu, 26 Mar 2009) | 1 line

  remove uneeded function
........
  r70611 | benjamin.peterson | 2009-03-26 13:35:37 -0500 (Thu, 26 Mar 2009) | 1 line

  add much better tests for python version information parsing
........
  r70612 | benjamin.peterson | 2009-03-26 13:55:48 -0500 (Thu, 26 Mar 2009) | 1 line

  more and more implementations now support sys.subversion
........
  r70613 | benjamin.peterson | 2009-03-26 13:58:30 -0500 (Thu, 26 Mar 2009) | 1 line

  roll old test in with new one
........
  r70614 | benjamin.peterson | 2009-03-26 14:09:21 -0500 (Thu, 26 Mar 2009) | 1 line

  add support for PyPy
........
  r70615 | benjamin.peterson | 2009-03-26 14:58:18 -0500 (Thu, 26 Mar 2009) | 5 lines

  add some useful utilities for skipping tests with unittest's new skipping ability

  most significantly apply a modified portion of the patch from #4242 with
  patches for skipping implementation details
........
  r70616 | benjamin.peterson | 2009-03-26 15:05:50 -0500 (Thu, 26 Mar 2009) | 1 line

  rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
........
  r70617 | benjamin.peterson | 2009-03-26 15:17:27 -0500 (Thu, 26 Mar 2009) | 1 line

  apply the second part of #4242's patch; classify all the implementation details in test_descr
........
  r70618 | benjamin.peterson | 2009-03-26 15:48:25 -0500 (Thu, 26 Mar 2009) | 1 line

  remove test_support.TestSkipped and just use unittest.SkipTest
........
  r70619 | benjamin.peterson | 2009-03-26 15:49:40 -0500 (Thu, 26 Mar 2009) | 1 line

  fix naming
........
  r70620 | benjamin.peterson | 2009-03-26 16:10:30 -0500 (Thu, 26 Mar 2009) | 1 line

  fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
........
  r70621 | benjamin.peterson | 2009-03-26 16:11:16 -0500 (Thu, 26 Mar 2009) | 1 line

  must pass argument to get expected behavior ;)
........
  r70623 | benjamin.peterson | 2009-03-26 16:30:10 -0500 (Thu, 26 Mar 2009) | 1 line

  add missing import
........
  r70624 | benjamin.peterson | 2009-03-26 16:30:54 -0500 (Thu, 26 Mar 2009) | 1 line

  ** is required here
........
  r70626 | benjamin.peterson | 2009-03-26 16:40:29 -0500 (Thu, 26 Mar 2009) | 1 line

  update email tests to use SkipTest
........
  r70627 | benjamin.peterson | 2009-03-26 16:44:43 -0500 (Thu, 26 Mar 2009) | 1 line

  fix another name
........
2009-03-28 21:42:05 +00:00
Jeremy Hylton 636950f925 Remove special logic that closes HTTPConnection socket on EPIPE.
http://bugs.python.org/issue5542

If the socket is closed, the client has no chance to read the response
from the server.  EPIPE means that it isn't possible to write more
data from the socket, but not that it is impossible to read.

Also, various formatting changes.
2009-03-28 04:34:21 +00:00
Jeremy Hylton 7c1692d587 Replace references to httplib with http.client. 2009-03-27 21:31:03 +00:00
Jeremy Hylton 236654b82d Fix some string encoding issues with entity bodies in HTTP requests.
RFC 2616 says that iso-8859-1 is the default charset for HTTP entity
bodies, but we encoded strings using ascii.  See
http://bugs.python.org/issue5314.  Changed docs and code to use
iso-8859-1.

Also fix some brokenness with passing a file as the body instead of a
string.

Add tests to show that some of this behavior actually works.
2009-03-27 20:24:34 +00:00
Jeremy Hylton 98eb6c2838 Fix compatibility issue with HTTPMessage class.
The server needs to use MessageClass to parse.
2009-03-27 18:31:36 +00:00
Jeremy Hylton 914ab45d0a Sort import list. 2009-03-27 17:16:06 +00:00
Jeremy Hylton e6fdd04b37 Replace duplicate code in http.server with call to http.client.parse_headers(). 2009-03-27 17:14:18 +00:00
Jeremy Hylton ef9f48e578 Simplify complex expression. 2009-03-26 22:04:05 +00:00
Benjamin Peterson 5f28b7b797 Merged revisions 70518,70521,70590,70594-70595 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70518 | matthias.klose | 2009-03-22 08:08:22 -0500 (Sun, 22 Mar 2009) | 2 lines

  - Fix comment macro in python.man
........
  r70521 | benjamin.peterson | 2009-03-22 12:45:11 -0500 (Sun, 22 Mar 2009) | 1 line

  close the file even if an exception occurs #5536
........
  r70590 | skip.montanaro | 2009-03-24 19:52:11 -0500 (Tue, 24 Mar 2009) | 1 line

  clarify the type of data returned
........
  r70594 | marc-andre.lemburg | 2009-03-25 14:44:58 -0500 (Wed, 25 Mar 2009) | 9 lines

  Remove the sys.version_info shortcut, since they cause the APIs
  to return different information than the _sys_version() output
  used in previous Python versions.

  This also fixes issue5561: platform.python_version_tuple returns tuple of ints, should be strings

  Added more tests for the various platform functions.
........
  r70595 | marc-andre.lemburg | 2009-03-25 14:45:33 -0500 (Wed, 25 Mar 2009) | 3 lines

  News item for the platform.py fix (r70594).
........
2009-03-26 21:49:58 +00:00
Jeremy Hylton b476d59792 Add __enter__ and __exit__ methods to addbase() so that it supports with.
This change also adds a minimal unittest of urllib.response.addbase.
More are needed, but not to cover the small change being made here.

Addresses http://bugs.python.org/issue5418
2009-03-26 21:34:20 +00:00
Benjamin Peterson 09832740d1 fix isprintable() on space characters #5126 2009-03-26 17:15:46 +00:00
Benjamin Peterson 59406a9d85 officially deprecated max_buffer_size 2009-03-26 17:10:29 +00:00
Jeremy Hylton 1ef7c6bc85 Add a few more tests for urllib.parse.urlencode.
Fix some long lines.
2009-03-26 16:57:30 +00:00
Jeremy Hylton 230feba5fd urlencode:
Remove dead code branch created by automated conversion from 2.x.
Clean up a few comments.
2009-03-26 16:56:59 +00:00
Jeremy Hylton f819886a72 Simplify a few complicated expressions. 2009-03-26 16:55:08 +00:00
Jeremy Hylton a4de60a1de Whitespace normalization. 2009-03-26 14:49:26 +00:00
Brett Cannon 663fffa4e2 Fix a circular import dependency. 2009-03-25 23:31:22 +00:00
Raymond Hettinger 52dc06b23c Separate initialization from clearing. 2009-03-25 22:45:22 +00:00
Benjamin Peterson 9b8d24b17d reuse tokenize.detect_encoding in linecache instead of a custom solution
patch by Victor Stinner #4016
2009-03-24 22:30:15 +00:00
Kristján Valur Jónsson a8abe86331 http://bugs.python.org/issue5544
Guard _fileio.c against other malicious os.close(f.fileno()) attempts.
Add tests to test_fileio.py to verify behaviour.
2009-03-24 15:27:42 +00:00
Benjamin Peterson 4c93dcbbef Merged revisions 70574 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70574 | benjamin.peterson | 2009-03-23 20:11:37 -0500 (Mon, 23 Mar 2009) | 1 line

  fix typo
........
2009-03-24 01:33:55 +00:00
Benjamin Peterson 52baa29033 Merged revisions 70558,70561-70563,70568-70571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70558 | benjamin.peterson | 2009-03-23 17:29:45 -0500 (Mon, 23 Mar 2009) | 4 lines

  comply with the evilJavaNamingScheme for attribute names

  It seems my love of PEP 8 overrode the need for consistentcy
........
  r70561 | benjamin.peterson | 2009-03-23 18:10:14 -0500 (Mon, 23 Mar 2009) | 1 line

  refactor unittest docs
........
  r70562 | benjamin.peterson | 2009-03-23 18:13:36 -0500 (Mon, 23 Mar 2009) | 1 line

  forgot to document that setUp can be skipped (silly me...)
........
  r70563 | benjamin.peterson | 2009-03-23 18:19:03 -0500 (Mon, 23 Mar 2009) | 1 line

  update from CVS
........
  r70568 | benjamin.peterson | 2009-03-23 19:35:20 -0500 (Mon, 23 Mar 2009) | 1 line

  some cleanup and modernization
........
  r70569 | benjamin.peterson | 2009-03-23 19:36:16 -0500 (Mon, 23 Mar 2009) | 1 line

  remove special metadata
........
  r70570 | benjamin.peterson | 2009-03-23 19:37:12 -0500 (Mon, 23 Mar 2009) | 1 line

  update docstring
........
  r70571 | benjamin.peterson | 2009-03-23 19:39:24 -0500 (Mon, 23 Mar 2009) | 1 line

  add new skipping things to __all__
........
2009-03-24 00:56:30 +00:00
Benjamin Peterson 5254c04aeb Merged revisions 70555 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70555 | benjamin.peterson | 2009-03-23 16:50:21 -0500 (Mon, 23 Mar 2009) | 4 lines

  implement test skipping and expected failures

  patch by myself #1034053
........
2009-03-23 22:25:03 +00:00
Antoine Pitrou 3a652b1d0a Merged revisions 70546 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70546 | antoine.pitrou | 2009-03-23 19:41:45 +0100 (lun., 23 mars 2009) | 9 lines

  Issue #4688: Add a heuristic so that tuples and dicts containing only
  untrackable objects are not tracked by the garbage collector. This can
  reduce the size of collections and therefore the garbage collection overhead
  on long-running programs, depending on their particular use of datatypes.

  (trivia: this makes the "binary_trees" benchmark from the Computer Language
  Shootout 40% faster)
........
2009-03-23 18:52:06 +00:00
Raymond Hettinger 798ee1a4c6 Make imported name private and wrap long-line. 2009-03-23 18:29:11 +00:00
Raymond Hettinger f173654db8 Forward port r70533 and r70538. 2009-03-23 05:19:21 +00:00
Lars Gustäbel 42e0091208 Merged revisions 70523 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70523 | lars.gustaebel | 2009-03-22 21:09:33 +0100 (Sun, 22 Mar 2009) | 5 lines

  Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop
  forever on incomplete input. That caused tarfile.open() to hang when used
  with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
  partial bzip2 compressed data.
........
2009-03-22 20:34:29 +00:00
Benjamin Peterson 0ed52455b7 port the queue change r70405 2009-03-21 17:36:10 +00:00
Benjamin Peterson f07d0026da Merged revisions 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line

  #5486: typos.
........
  r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line

  fix tuple.index() error message #5495
........
  r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line

  #5496: fix docstring of lookup().
........
  r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line

  #5493: clarify __nonzero__ docs.
........
  r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line

  Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int.
........
  r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line

  #5491: clarify nested() semantics.
........
  r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line

  #5488: add missing struct member.
........
  r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line

  #5478: fix copy-paste oversight in function signature.
........
  r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line

  #5276: document IDLESTARTUP and .Idle.py.
........
  r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines

  Fix markup in re docs and give a mail address in regex howto, so that
  the recommendation to send suggestions to the author can be followed.
........
  r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines

  Move the previously local import of threading to module level.

  This is cleaner and avoids lockups in obscure cases where a Queue
  is instantiated while the import lock is already held by another thread.

  OKed by Tim Peters.
........
  r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line

  Added skip for old MSVC.
........
  r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line

  Add token markup.
........
  r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line

  I thought this was begging for an example
........
  r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line

  a much better example
........
  r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line

  close files after comparing them
........
2009-03-21 17:31:58 +00:00
Mark Dickinson ae681df4d8 - Issue #5463: In struct module, remove deprecated overflow wrapping
when packing an integer: for example, struct.pack('=L', -1) now
  raises struct.error instead of returning b'\xff\xff\xff\xff'.

  Thanks Andreas Schawo for the patch.
2009-03-21 10:26:31 +00:00
Brett Cannon e43b060b05 Document import's semantics for the language reference. This includes filling
in missing details for the sys module.
2009-03-21 03:11:16 +00:00
Benjamin Peterson b487e63282 stringio doesn't have an encoding 2009-03-21 03:08:31 +00:00
Raymond Hettinger bfb5456142 Fix typo 2009-03-19 23:23:15 +00:00
Raymond Hettinger 18ed2cbc75 Forward port 70475: Add implementation notes. Put methods in more readable order. 2009-03-19 23:14:39 +00:00
Raymond Hettinger dc879f033c Forward port r70470 and r70473 for OrderedDict to use a doubly linked list. 2009-03-19 20:30:56 +00:00
Antoine Pitrou 6cf17aacbf svnmerge from trunk for r70457 (sorry, I accidentally deleted the commit message) 2009-03-18 20:26:42 +00:00
Mark Dickinson bd7926478d Issue #4258: Make it possible to use 30-bit digits for PyLongs:
- new configure option --enable-big-digits
 - new structseq sys.int_info giving information about the internal format
By default, 30-bit digits are enabled on 64-bit machines but
disabled on 32-bit machines.
2009-03-18 20:06:12 +00:00
Mark Dickinson 7303b594e6 Merged revisions 70444 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70444 | mark.dickinson | 2009-03-18 08:22:51 +0000 (Wed, 18 Mar 2009) | 3 lines

  Fix bug in _insert_thousands_sep: too much zero padding could be
  added for 'n' formats with non-repeating thousands-separator.
........
2009-03-18 08:25:36 +00:00
Mark Dickinson 79f52039fe Merged revisions 70439 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70439 | mark.dickinson | 2009-03-17 23:03:46 +0000 (Tue, 17 Mar 2009) | 3 lines

  Issue #2110:  Add support for thousands separator and 'n' format specifier
  to Decimal __format__ method.
........
2009-03-17 23:12:51 +00:00
Mark Dickinson ad41634313 Merged revisions 70430 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70430 | mark.dickinson | 2009-03-17 18:01:03 +0000 (Tue, 17 Mar 2009) | 3 lines

  Fix bug in Decimal __format__ method that swapped left and right
  alignment.
........
2009-03-17 18:10:15 +00:00
Brett Cannon 8d11013169 Implement InspectLoader for FrozenImporter. 2009-03-15 02:20:16 +00:00
Brett Cannon a113ac58be Implement InspectLoader for BuiltinImporter. 2009-03-15 01:41:33 +00:00
Brett Cannon 7aa21f75c1 A few more docstring/API cleanups for importlib. 2009-03-15 00:53:05 +00:00
Brett Cannon 0e0d8a63b1 Clean up docstring from importlib.util.module_for_loader. 2009-03-15 00:00:19 +00:00
Eric Smith 8ec90443f5 Merged revisions 70364 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70364 | eric.smith | 2009-03-14 07:57:26 -0400 (Sat, 14 Mar 2009) | 17 lines

  Issue 5237, Allow auto-numbered replacement fields in str.format() strings.

  For simple uses for str.format(), this makes the typing easier. Hopfully this
  will help in the adoption of str.format().

  For example:
  'The {} is {}'.format('sky', 'blue')

  You can mix and matcth auto-numbering and named replacement fields:
  'The {} is {color}'.format('sky', color='blue')

  But you can't mix and match auto-numbering and specified numbering:
  'The {0} is {}'.format('sky', 'blue')
  ValueError: cannot switch from manual field specification to automatic field numbering

  Will port to 3.1.
........
2009-03-14 12:29:34 +00:00
Antoine Pitrou 350370c25f Merged revisions 70356 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70356 | antoine.pitrou | 2009-03-14 01:07:21 +0100 (sam., 14 mars 2009) | 3 lines

  Issue #1222: locale.format() bug when the thousands separator is a space character.
........
2009-03-14 00:13:13 +00:00
Antoine Pitrou a28fcfdbda Issue #5016: FileIO.seekable() could return False if the file position
was negative when truncated to a C int. Patch by Victor Stinner.
2009-03-13 23:42:55 +00:00
Antoine Pitrou 0ae29cf617 The error detection code in FileIO.close() could fail to reflect the `errno` value, and report it as -1 instead. 2009-03-13 22:33:17 +00:00
Antoine Pitrou 652e7076fe Issue #5392: when a very low recursion limit was set, the interpreter would
abort with a fatal error after the recursion limit was hit twice.
2009-03-13 19:25:20 +00:00
Brett Cannon f87e04d339 Finish properly hiding importlib implementation code. 2009-03-12 22:47:53 +00:00
Brett Cannon e9103d2619 Last big re-organization of importlib._bootstrap. Should actually be able to find something in the file now. 2009-03-12 22:37:06 +00:00
Brett Cannon ce43ddfee5 Do a little bit of reorganization on importlib._bootstrap. 2009-03-12 22:28:55 +00:00
Brett Cannon 3eeaa0a821 Make utility code in importlib._bootstrap private. 2009-03-12 22:07:17 +00:00
Brett Cannon 9495f182a0 Define importlib.__init__.__all__. 2009-03-12 22:01:40 +00:00
Tarek Ziadé 516db94459 Merged revisions 70308 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70308 | tarek.ziade | 2009-03-11 13:48:04 +0100 (Wed, 11 Mar 2009) | 1 line

  Issue #5472: Fixed distutils.test_util tear down
........
2009-03-11 12:52:00 +00:00
Brett Cannon c59cd68847 Add a NOTE for importlib to fill in the docstrings for the ABCs. 2009-03-11 05:14:27 +00:00
Raymond Hettinger 5bb0f0e072 For collections.deque() objects, expose the maxlen parameter as a read-only attribute. 2009-03-10 12:56:32 +00:00
Raymond Hettinger 060c7f6bba Small optimization for corner case where maxlen==0. 2009-03-10 09:36:07 +00:00
Brett Cannon 2cf03a8204 Implement importlib.util.set_loader: a decorator to automatically set
__loader__ on modules.
2009-03-10 05:17:37 +00:00
Brett Cannon d43b30b046 Implement get_source for importlib.abc.PyLoader using source_path and get_data. 2009-03-10 03:29:23 +00:00
Benjamin Peterson e0124bd9c3 Merged revisions 69998-69999,70002,70022-70023,70025-70026,70061,70086,70145,70171,70183,70188,70235,70244,70275,70281 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69998 | benjamin.peterson | 2009-02-26 13:04:40 -0600 (Thu, 26 Feb 2009) | 1 line

  the startship is rather outdated now
........
  r69999 | benjamin.peterson | 2009-02-26 13:05:59 -0600 (Thu, 26 Feb 2009) | 1 line

  comma
........
  r70002 | andrew.kuchling | 2009-02-26 16:34:30 -0600 (Thu, 26 Feb 2009) | 1 line

  The curses panel library is now supported
........
  r70022 | georg.brandl | 2009-02-27 10:23:18 -0600 (Fri, 27 Feb 2009) | 1 line

  #5361: fix typo.
........
  r70023 | georg.brandl | 2009-02-27 10:39:26 -0600 (Fri, 27 Feb 2009) | 1 line

  #5363: fix cmpfiles() docs. Another instance where a prose description is twice as long as the code.
........
  r70025 | georg.brandl | 2009-02-27 10:52:55 -0600 (Fri, 27 Feb 2009) | 1 line

  #5344: fix punctuation.
........
  r70026 | georg.brandl | 2009-02-27 10:59:03 -0600 (Fri, 27 Feb 2009) | 1 line

  #5365: add quick look conversion table for different time representations.
........
  r70061 | hirokazu.yamamoto | 2009-02-28 09:24:00 -0600 (Sat, 28 Feb 2009) | 1 line

  Binary flag is needed on windows.
........
  r70086 | benjamin.peterson | 2009-03-01 21:35:12 -0600 (Sun, 01 Mar 2009) | 1 line

  fix a silly problem of caching gone wrong #5401
........
  r70145 | benjamin.peterson | 2009-03-03 16:51:57 -0600 (Tue, 03 Mar 2009) | 1 line

  making the writing more formal
........
  r70171 | facundo.batista | 2009-03-04 15:18:17 -0600 (Wed, 04 Mar 2009) | 3 lines

  Fixed a typo.
........
  r70183 | benjamin.peterson | 2009-03-04 18:17:57 -0600 (Wed, 04 Mar 2009) | 1 line

  add example
........
  r70188 | hirokazu.yamamoto | 2009-03-05 03:34:14 -0600 (Thu, 05 Mar 2009) | 1 line

  Fixed memory leak on failure.
........
  r70235 | benjamin.peterson | 2009-03-07 18:21:17 -0600 (Sat, 07 Mar 2009) | 1 line

  fix funky indentation
........
  r70244 | martin.v.loewis | 2009-03-08 09:06:19 -0500 (Sun, 08 Mar 2009) | 2 lines

  Add Chris Withers.
........
  r70275 | georg.brandl | 2009-03-09 11:35:48 -0500 (Mon, 09 Mar 2009) | 2 lines

  Add missing space.
........
  r70281 | benjamin.peterson | 2009-03-09 15:38:56 -0500 (Mon, 09 Mar 2009) | 1 line

  gzip and bz2 are context managers
........
2009-03-09 21:04:33 +00:00
Brett Cannon e2085bedf1 Clean up importlib NOTES so it only contains short term goals. 2009-03-09 07:54:33 +00:00
Brett Cannon 2a922ed6ad Introduce importlib.abc. The module contains various ABCs related to imports
(mostly stuff specified by PEP 302). There are two ABCs, PyLoader and
PyPycLoader, which help with implementing source and source/bytecode loaders by
implementing load_module in terms of other methods. This removes a lot of
gritty details loaders typically have to worry about.
2009-03-09 03:35:50 +00:00
Brett Cannon ba3fcf17c8 Remove a dead XXX comment. 2009-03-09 01:58:13 +00:00
Brett Cannon 29dff8aada Fix importlib._bootstrap.PyPycLoader.load_module() to better handle
source/bytecode paths and what to do when they don't exist.
2009-03-09 00:14:37 +00:00
Benjamin Peterson 9fd459a3a2 hack StringIO's repr, so it doesn't give an encoding 2009-03-09 00:09:44 +00:00
Benjamin Peterson c4c0eaebbf give TextIOWrapper a repr that tells you the encoding 2009-03-09 00:07:03 +00:00
Brett Cannon f2b55fb5ee Make importlib.test.source.util.write_bytecode reset sys.dont_write_bytecode. 2009-03-09 00:02:01 +00:00
Brett Cannon 1014d42dd3 Minor changes to Python source base loader.
Fixed a bug where 'self' was left off a method call. Was masked by the fact the
source/bytecode loader subclass is always used. Cleaned up when the source path
is fetched. Also made sure ImportError is raised when a source path cannot be
found.
2009-03-08 20:53:50 +00:00
Brett Cannon 79925fdbfe Skip case-sensitivity tests for extension modules if _testcapi cannot be found. 2009-03-08 20:50:32 +00:00
Antoine Pitrou ec00e2ff45 Add notice about strange behaviour of the bigmem tests 2009-03-07 23:52:26 +00:00
Antoine Pitrou 7cdb495e90 Issue #3700: make test_bigmem py3k-compatible, and add bytes/bytearray tests
(please note: some of the tests /do/ fail when run with a sufficiently large memory parameter (-M),
perhaps because of the str/bytes/bytearray overhaul)
2009-03-07 23:40:49 +00:00
Benjamin Peterson a58a626092 bump version to 3.1a1 2009-03-07 16:34:40 +00:00
Guilherme Polo f45b4cce7f Merged revisions 70223 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r70223 | guilherme.polo | 2009-03-06 23:14:38 -0300 (Fri, 06 Mar 2009) | 4 lines

  Fixed issue #2638: Show a window constructed with tkSimpleDialog.Dialog only
  after it is has been populated and properly configured in order to prevent
  window flashing.
........
2009-03-07 02:19:14 +00:00
Guilherme Polo 56f5be5317 Merged revisions 70218-70219 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r70218 | guilherme.polo | 2009-03-06 22:19:12 -0300 (Fri, 06 Mar 2009) | 1 line

  Fixed issue #5193: Guarantee that Tkinter.Text.search returns a string.
........
  r70219 | guilherme.polo | 2009-03-06 22:47:49 -0300 (Fri, 06 Mar 2009) | 4 lines

  Fixed issue #4792: Prevent a segfault in _tkinter by using the
  guaranteed to be safe interp argument given to the PythonCmd in place
  of the Tcl interpreter taken from a PythonCmd_ClientData.
........
2009-03-07 01:54:57 +00:00
Tarek Ziadé b3c6ed5e10 fixed except syntax for py3 2009-03-07 01:12:09 +00:00
Tarek Ziadé 63b64c0211 Merged revisions 70212 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70212 | tarek.ziade | 2009-03-07 01:32:45 +0100 (Sat, 07 Mar 2009) | 1 line

  Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler
........
2009-03-07 00:51:53 +00:00
Benjamin Peterson 113f60740e simplify and beautify code 2009-03-06 23:59:29 +00:00
Raymond Hettinger 611eaf0e66 Document the suggested alternative to emtpy() and full(). 2009-03-06 23:55:28 +00:00
Antoine Pitrou 66913e2213 Issue #5433: Excessive newline detection optimization in IncrementalNewlineDecoder 2009-03-06 23:40:56 +00:00
Hirokazu Yamamoto 54d0df69c0 Issue #5334: array.fromfile() failed to insert values when EOFError was raised.
Reviewed by Benjamin Peterson.
2009-03-06 03:04:07 +00:00
Benjamin Peterson 394ee00993 remove usage of the deprecated max_buffer_size 2009-03-05 22:33:59 +00:00
Hirokazu Yamamoto 9b78925970 Merged revisions 70193 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70193 | hirokazu.yamamoto | 2009-03-05 23:52:44 +0900 | 1 line

  mmap.resize for anonymous map is not working yet, so changed to real file mapping...
........
2009-03-05 15:00:28 +00:00
Hirokazu Yamamoto 8e722bcf85 Merged revisions 70189 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70189 | hirokazu.yamamoto | 2009-03-05 23:21:12 +0900 | 4 lines

  Issue #5385: Fixed mmap crash after resize failure on windows.

  Now uses NULL instead of INVALID_HANDLE_VALUE as invalid map handle
  because CreateFileMapping returns NULL when error occurs.
........
2009-03-05 14:33:01 +00:00
Benjamin Peterson 5ac89cc885 rather pointless XXX 2009-03-05 00:50:15 +00:00
Benjamin Peterson 5fd871d724 rename 2009-03-05 00:49:53 +00:00
Benjamin Peterson 9363a65b2c fix #4862 in _pyio: reset the decoder on seek(0) 2009-03-05 00:42:09 +00:00
Ronald Oussoren 03cfa7365d These are present in the trunk but no longer in 3.x, which causes problems
during the build of the Mac binary installer.
2009-03-04 23:21:07 +00:00
Ronald Oussoren 8954cd36ba Fix for issue #5408. This only enables test_osx_env when the current build
is actually a framework build on OSX (the only environment where this test
is valid).
2009-03-04 22:57:10 +00:00
Brett Cannon 435aad878c Rename importlib.util.set___package__ to set_package. 2009-03-04 16:07:00 +00:00
Antoine Pitrou 1fcadcef40 Fix failures introduced by buggy merge (2) 2009-03-04 11:18:52 +00:00
Antoine Pitrou 7fb111bb9e Fix failures introduced by buggy merge (1) 2009-03-04 11:14:01 +00:00
Brett Cannon 7c9875c32c Move importlib over to _io. 2009-03-04 01:10:09 +00:00
Brett Cannon b5f03c6779 Add a test for importlib.import_module. 2009-03-04 01:02:54 +00:00
Benjamin Peterson 4fa88fa0ba merge the io-c branch: C implementation of the io module
The main io module now uses the C implementation.  The Python one still exists
in Lib/_pyio.py for ease of testing new features and usefulness to other
implementers.

The rewrite was done by Antoine Pitrou and Amaury Forgeot d'Arc.  I was slightly
helpful at the end. :)


Following are the log messages from the io-c branch:

Merged revisions 68683-68685,68687-68689,68693,68704,68741-68743,68745,68747,68752-68754,68756,68758,68812,68816-68817,68820-68822,68824-68825,68828,68876-68877,69037,69044,69104,69115,69194,69626-69629,69636,69638,69641-69642,69644-69654,69656-69661,69671,69677,69812-69815,69817,69827-69830,69839,69841-69845,69848,69850,69852,69854,69860,69865-69866,69868,69872-69873,69885,69888,69891-69893,69911,69913-69916,69963,70033,70035,70038,70041-70048,70067-70070,70075,70112,70133,70135,70140 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/io-c

........
  r68683 | antoine.pitrou | 2009-01-17 17:13:48 -0600 (Sat, 17 Jan 2009) | 3 lines

  Merge in changes from the io-c sandbox. Tests will follow in separate commits.
........
  r68684 | antoine.pitrou | 2009-01-17 17:17:26 -0600 (Sat, 17 Jan 2009) | 3 lines

  Fixes and additions to test_io.py
........
  r68685 | antoine.pitrou | 2009-01-17 17:22:04 -0600 (Sat, 17 Jan 2009) | 1 line

  Fix test_fileio
........
  r68687 | antoine.pitrou | 2009-01-17 17:35:11 -0600 (Sat, 17 Jan 2009) | 3 lines

  Add dependency to _iomodule.h for the various C sources
........
  r68688 | antoine.pitrou | 2009-01-17 17:38:18 -0600 (Sat, 17 Jan 2009) | 3 lines

  These precautions are not needed anymore!
........
  r68689 | antoine.pitrou | 2009-01-17 17:41:48 -0600 (Sat, 17 Jan 2009) | 3 lines

  Fix another test
........
  r68693 | antoine.pitrou | 2009-01-17 17:49:58 -0600 (Sat, 17 Jan 2009) | 3 lines

  Fix test_uu (which was using private attributes of TextIOWrapper)
........
  r68704 | antoine.pitrou | 2009-01-17 18:45:29 -0600 (Sat, 17 Jan 2009) | 3 lines

  Most io sources are Py_ssize_t-clean (I don't know about bytesio and stringio)
........
  r68741 | antoine.pitrou | 2009-01-18 15:20:30 -0600 (Sun, 18 Jan 2009) | 3 lines

  Check return type in TextIOWrapper.__next__
........
  r68742 | antoine.pitrou | 2009-01-18 15:28:48 -0600 (Sun, 18 Jan 2009) | 4 lines

  Make binary buffered readline and iteration much faster
  (8x as fast as the IOBase generic implementation)
........
  r68743 | antoine.pitrou | 2009-01-18 15:47:47 -0600 (Sun, 18 Jan 2009) | 3 lines

  Reinsert test_io_after_close (was removed by mistake)
........
  r68745 | antoine.pitrou | 2009-01-18 16:16:06 -0600 (Sun, 18 Jan 2009) | 3 lines

  Add read, read1 and write methods to BufferedIOBase
........
  r68747 | antoine.pitrou | 2009-01-18 16:35:58 -0600 (Sun, 18 Jan 2009) | 3 lines

  Kill test failure
........
  r68752 | amaury.forgeotdarc | 2009-01-18 17:05:43 -0600 (Sun, 18 Jan 2009) | 3 lines

  Fix a segfault when e.g a BufferedReader is created with a FileIO in
  read mode.
........
  r68753 | antoine.pitrou | 2009-01-18 17:13:09 -0600 (Sun, 18 Jan 2009) | 3 lines

  Add truncate() to text IO objects
........
  r68754 | antoine.pitrou | 2009-01-18 17:51:08 -0600 (Sun, 18 Jan 2009) | 3 lines

  Remove IOBase.__del__ and replace it with custom code with tp_dealloc
........
  r68756 | antoine.pitrou | 2009-01-18 18:10:16 -0600 (Sun, 18 Jan 2009) | 3 lines

  Remove irrelevant comment.
........
  r68758 | antoine.pitrou | 2009-01-18 18:36:16 -0600 (Sun, 18 Jan 2009) | 3 lines

  in importlib:_fileio._FileIO -> _io.FileIO
........
  r68812 | antoine.pitrou | 2009-01-20 14:15:51 -0600 (Tue, 20 Jan 2009) | 3 lines

  Add garbage collection support to FileIO objects
........
  r68816 | antoine.pitrou | 2009-01-20 14:56:28 -0600 (Tue, 20 Jan 2009) | 3 lines

  Add GC support to Buffered and Text IO objects
........
  r68817 | antoine.pitrou | 2009-01-20 15:19:45 -0600 (Tue, 20 Jan 2009) | 3 lines

  Add some file headers
........
  r68820 | antoine.pitrou | 2009-01-20 15:29:59 -0600 (Tue, 20 Jan 2009) | 3 lines

  Add class TextIOBase
........
  r68821 | antoine.pitrou | 2009-01-20 15:36:16 -0600 (Tue, 20 Jan 2009) | 3 lines

  Add properties to TextIOBase
........
  r68822 | antoine.pitrou | 2009-01-20 15:41:19 -0600 (Tue, 20 Jan 2009) | 3 lines

  Disable the pure Python TextIOBase class, and inject C the implementation instead
........
  r68824 | antoine.pitrou | 2009-01-20 16:36:28 -0600 (Tue, 20 Jan 2009) | 3 lines

  Fix two leaks
........
  r68825 | antoine.pitrou | 2009-01-20 16:38:29 -0600 (Tue, 20 Jan 2009) | 3 lines

  FileIO.name is just a plain attribute, we can set it directly
........
  r68828 | antoine.pitrou | 2009-01-20 17:06:33 -0600 (Tue, 20 Jan 2009) | 3 lines

  Speed up closed checks on text IO objects. Good for a 25% speedup on small ops.
........
  r68876 | antoine.pitrou | 2009-01-23 17:01:25 -0600 (Fri, 23 Jan 2009) | 3 lines

  Two typos
........
  r68877 | antoine.pitrou | 2009-01-23 18:13:20 -0600 (Fri, 23 Jan 2009) | 3 lines

  Remove two unused functions
........
  r69037 | amaury.forgeotdarc | 2009-01-27 17:10:25 -0600 (Tue, 27 Jan 2009) | 2 lines

  Update the win32 project files
........
  r69044 | antoine.pitrou | 2009-01-27 18:51:07 -0600 (Tue, 27 Jan 2009) | 3 lines

  Improve heuristic in IncrementalNewlineDecoder + some micro-optimizations
........
  r69104 | antoine.pitrou | 2009-01-29 15:23:42 -0600 (Thu, 29 Jan 2009) | 3 lines

  Fix some crashers found by Victor
........
  r69115 | hirokazu.yamamoto | 2009-01-29 20:36:28 -0600 (Thu, 29 Jan 2009) | 1 line

  Updated VC6 project file.
........
  r69194 | antoine.pitrou | 2009-02-01 16:57:18 -0600 (Sun, 01 Feb 2009) | 3 lines

  Fix downcasting warnings in 32-bit mode with 64-bit offsets (Windows)
........
  r69626 | benjamin.peterson | 2009-02-14 17:33:34 -0600 (Sat, 14 Feb 2009) | 1 line

  only catch AttributeError and UnsupportedOperation
........
  r69627 | benjamin.peterson | 2009-02-14 21:35:28 -0600 (Sat, 14 Feb 2009) | 1 line

  give the IO module its own state and store the os and locale modules in it
........
  r69628 | benjamin.peterson | 2009-02-14 22:08:32 -0600 (Sat, 14 Feb 2009) | 1 line

  put interned strings in the module state structure
........
  r69629 | benjamin.peterson | 2009-02-14 22:15:29 -0600 (Sat, 14 Feb 2009) | 1 line

  put UnsupportedOperation in the module state
........
  r69636 | benjamin.peterson | 2009-02-15 08:31:42 -0600 (Sun, 15 Feb 2009) | 1 line

  dealloc unsupported_operation
........
  r69638 | benjamin.peterson | 2009-02-15 09:24:45 -0600 (Sun, 15 Feb 2009) | 1 line

  actually test the C implementation
........
  r69641 | benjamin.peterson | 2009-02-15 10:12:37 -0600 (Sun, 15 Feb 2009) | 5 lines

  make interned strings globals again ;(

  putting them in the module state was asking for trouble when the module
  was dealloced before the classes in it were
........
  r69642 | benjamin.peterson | 2009-02-15 10:19:45 -0600 (Sun, 15 Feb 2009) | 1 line

  actually test the python implementations
........
  r69644 | antoine.pitrou | 2009-02-15 11:59:30 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix memory leak in destructor when a Python class inherits from IOBase (or an IOBase-derived type)
........
  r69645 | antoine.pitrou | 2009-02-15 12:23:26 -0600 (Sun, 15 Feb 2009) | 3 lines

  Add a warning about the embarassing state of IOBase finalization
........
  r69646 | antoine.pitrou | 2009-02-15 13:14:42 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix opening of 8-bit filenames with FileIO
........
  r69647 | antoine.pitrou | 2009-02-15 13:20:22 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix leak in FileIO constructor
........
  r69648 | antoine.pitrou | 2009-02-15 13:58:16 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix some refleaks
........
  r69649 | antoine.pitrou | 2009-02-15 14:05:13 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix a leak in IOBase.writelines
........
  r69650 | antoine.pitrou | 2009-02-15 14:11:56 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix memory leak in BufferedWriter.truncate
........
  r69651 | antoine.pitrou | 2009-02-15 14:25:34 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix a leak in TextIOWrapper.seek
........
  r69652 | antoine.pitrou | 2009-02-15 14:26:28 -0600 (Sun, 15 Feb 2009) | 3 lines

  Unify implementations of truncate for buffered objects
........
  r69653 | antoine.pitrou | 2009-02-15 15:15:15 -0600 (Sun, 15 Feb 2009) | 3 lines

  Fix more leaks in TextIOWrapper
........
  r69654 | antoine.pitrou | 2009-02-15 15:21:57 -0600 (Sun, 15 Feb 2009) | 3 lines

  Smaller chunk size for a faster test
........
  r69656 | benjamin.peterson | 2009-02-15 17:29:48 -0600 (Sun, 15 Feb 2009) | 1 line

  braces make this much clearer
........
  r69657 | benjamin.peterson | 2009-02-15 17:46:07 -0600 (Sun, 15 Feb 2009) | 1 line

  use the correct macro
........
  r69658 | antoine.pitrou | 2009-02-15 19:38:59 -0600 (Sun, 15 Feb 2009) | 5 lines

  Fix crash in test_urllib2_localnet in debug mode. It was due to an HTTPResponse
  object being revived when calling its close() method in IOBase's tp_dealloc.
  _PyIOBase_finalize() starts looking scary...
........
  r69659 | benjamin.peterson | 2009-02-15 20:55:48 -0600 (Sun, 15 Feb 2009) | 1 line

  fix segfault on initialization failing
........
  r69660 | benjamin.peterson | 2009-02-15 21:09:31 -0600 (Sun, 15 Feb 2009) | 1 line

  apparently locale.getprefferedencoding() can raise a ImportError, too
........
  r69661 | benjamin.peterson | 2009-02-15 21:54:15 -0600 (Sun, 15 Feb 2009) | 1 line

  it's amazing this worked at all; I was using the wrong structs!
........
  r69671 | benjamin.peterson | 2009-02-16 08:38:27 -0600 (Mon, 16 Feb 2009) | 1 line

  add garbage collection support to bytesio
........
  r69677 | benjamin.peterson | 2009-02-16 10:31:03 -0600 (Mon, 16 Feb 2009) | 5 lines

  reduce ImportError catching code duplication

  I'm not sure this makes the code clearer with its new gotos, but
  at least I added a big fat comment
........
  r69812 | antoine.pitrou | 2009-02-20 13:50:16 -0600 (Fri, 20 Feb 2009) | 3 lines

  _StringIO now belongs to the _io modules, rather to its own _stringio module
........
  r69813 | antoine.pitrou | 2009-02-20 13:58:22 -0600 (Fri, 20 Feb 2009) | 3 lines

  Add a test for StringIO properties
........
  r69814 | antoine.pitrou | 2009-02-20 14:06:03 -0600 (Fri, 20 Feb 2009) | 3 lines

  Reimplement a few trivial StringIO functions and properties in C
........
  r69815 | antoine.pitrou | 2009-02-20 14:13:11 -0600 (Fri, 20 Feb 2009) | 3 lines

  Add the line_buffering property to TextIOWrapper, and test for it
........
  r69817 | antoine.pitrou | 2009-02-20 14:45:50 -0600 (Fri, 20 Feb 2009) | 4 lines

  Allow IncrementalNewlineDecoder to take unicode objects as decoding input if the decoder parameter is None
  This will help rewriting StringIO to C
........
  r69827 | antoine.pitrou | 2009-02-20 19:00:30 -0600 (Fri, 20 Feb 2009) | 3 lines

  Rewrite most of StringIO in C. Some almost empty stubs remain to be converted.
........
  r69828 | antoine.pitrou | 2009-02-20 19:09:25 -0600 (Fri, 20 Feb 2009) | 3 lines

  Plug a leak, and remove an unused string
........
  r69829 | benjamin.peterson | 2009-02-20 20:02:28 -0600 (Fri, 20 Feb 2009) | 1 line

  this assertions makes more sense here
........
  r69830 | benjamin.peterson | 2009-02-20 20:03:04 -0600 (Fri, 20 Feb 2009) | 1 line

  PyModule_AddObject can fail; simplify this code with a macro
........
  r69839 | antoine.pitrou | 2009-02-21 12:54:01 -0600 (Sat, 21 Feb 2009) | 3 lines

  StringIO is now written entirely in C (and blazingly fast)
........
  r69841 | benjamin.peterson | 2009-02-21 14:05:40 -0600 (Sat, 21 Feb 2009) | 1 line

  split the Python implementation of io into another module and rewrite the tests to test both implementations
........
  r69842 | benjamin.peterson | 2009-02-21 14:10:00 -0600 (Sat, 21 Feb 2009) | 1 line

  closed is not a function
........
  r69843 | benjamin.peterson | 2009-02-21 14:13:04 -0600 (Sat, 21 Feb 2009) | 1 line

  fix __all__ test
........
  r69844 | benjamin.peterson | 2009-02-21 14:21:24 -0600 (Sat, 21 Feb 2009) | 1 line

  fix the rest of the Misc tests
........
  r69845 | benjamin.peterson | 2009-02-21 14:26:59 -0600 (Sat, 21 Feb 2009) | 1 line

  RawIOBase is better for FileIO
........
  r69848 | benjamin.peterson | 2009-02-21 15:33:53 -0600 (Sat, 21 Feb 2009) | 1 line

  fix some more tests broken by bag argument validation
........
  r69850 | benjamin.peterson | 2009-02-21 16:16:42 -0600 (Sat, 21 Feb 2009) | 1 line

  make the python IncrementalNewineDecoder support a None decoder
........
  r69852 | benjamin.peterson | 2009-02-21 16:36:09 -0600 (Sat, 21 Feb 2009) | 1 line

  fix a BlockingIOError.characters_written bug
........
  r69854 | benjamin.peterson | 2009-02-21 16:49:02 -0600 (Sat, 21 Feb 2009) | 1 line

  check whence
........
  r69860 | benjamin.peterson | 2009-02-21 17:42:50 -0600 (Sat, 21 Feb 2009) | 1 line

  fix some of these Misbehaving io tests
........
  r69865 | benjamin.peterson | 2009-02-21 18:59:52 -0600 (Sat, 21 Feb 2009) | 1 line

  don't use super here()
........
  r69866 | benjamin.peterson | 2009-02-21 19:05:28 -0600 (Sat, 21 Feb 2009) | 1 line

  use implementation specific classes
........
  r69868 | benjamin.peterson | 2009-02-21 22:12:05 -0600 (Sat, 21 Feb 2009) | 1 line

  use a more DRY friendly approach to injecting module contents into test classes
........
  r69872 | antoine.pitrou | 2009-02-22 13:39:45 -0600 (Sun, 22 Feb 2009) | 3 lines

  Sanitize destructor behaviour of IOBase. Now Python-defined attributes can be accessed from close().
........
  r69873 | antoine.pitrou | 2009-02-22 13:50:14 -0600 (Sun, 22 Feb 2009) | 4 lines

  Only set the internal fd after it has been checked to be valid
  (otherwise, the destructor will attempt to close it)
........
  r69885 | benjamin.peterson | 2009-02-22 15:30:14 -0600 (Sun, 22 Feb 2009) | 1 line

  convert some other tests to use both io implementations
........
  r69888 | antoine.pitrou | 2009-02-22 17:03:16 -0600 (Sun, 22 Feb 2009) | 3 lines

  Silence all exceptions when finalizing
........
  r69891 | benjamin.peterson | 2009-02-22 17:27:24 -0600 (Sun, 22 Feb 2009) | 1 line

  convert another test to test both io implementations
........
  r69892 | benjamin.peterson | 2009-02-22 17:32:15 -0600 (Sun, 22 Feb 2009) | 1 line

  help poor people like me to find their io tests (did I miss any?)
........
  r69893 | benjamin.peterson | 2009-02-22 17:37:56 -0600 (Sun, 22 Feb 2009) | 1 line

  put a big note in the test telling people to write tests for both implementations now
........
  r69911 | antoine.pitrou | 2009-02-23 13:57:18 -0600 (Mon, 23 Feb 2009) | 3 lines

  expose DEFAULT_BUFFER_SIZE again (fixes a bunch of test failures)
........
  r69913 | antoine.pitrou | 2009-02-23 14:10:30 -0600 (Mon, 23 Feb 2009) | 4 lines

  Do the cyclic garbage collection tests only on the C version.
  The Python version is helpless as it uses __del__.
........
  r69914 | antoine.pitrou | 2009-02-23 14:21:41 -0600 (Mon, 23 Feb 2009) | 3 lines

  Adapt test_largefile to test both implementations
........
  r69915 | antoine.pitrou | 2009-02-23 14:25:14 -0600 (Mon, 23 Feb 2009) | 3 lines

  One small failure
........
  r69916 | antoine.pitrou | 2009-02-23 14:28:33 -0600 (Mon, 23 Feb 2009) | 3 lines

  Add a comment, at BP's request
........
  r69963 | antoine.pitrou | 2009-02-25 09:42:59 -0600 (Wed, 25 Feb 2009) | 3 lines

  Add a test of ABC inheritance
........
  r70033 | antoine.pitrou | 2009-02-27 15:49:50 -0600 (Fri, 27 Feb 2009) | 3 lines

  The base classes now are ABCs.
........
  r70035 | benjamin.peterson | 2009-02-27 15:57:41 -0600 (Fri, 27 Feb 2009) | 1 line

  good house keeping
........
  r70038 | antoine.pitrou | 2009-02-27 17:05:23 -0600 (Fri, 27 Feb 2009) | 4 lines

  Make the buffer allocation overflow tests specific to the C implementation, since the Python implementation resizes its buffers when needed rather than allocating them up front.
........
  r70041 | benjamin.peterson | 2009-02-27 18:26:12 -0600 (Fri, 27 Feb 2009) | 1 line

  kill java naming for sanity
........
  r70042 | benjamin.peterson | 2009-02-27 18:28:53 -0600 (Fri, 27 Feb 2009) | 2 lines

  timingTest is superseded by iobench
........
  r70043 | antoine.pitrou | 2009-02-27 19:13:50 -0600 (Fri, 27 Feb 2009) | 3 lines

  Remove the last traces of java naming in test_io
........
  r70044 | antoine.pitrou | 2009-02-27 19:18:34 -0600 (Fri, 27 Feb 2009) | 3 lines

  Better resource cleanup
........
  r70045 | antoine.pitrou | 2009-02-27 19:29:00 -0600 (Fri, 27 Feb 2009) | 3 lines

  Remove dubious uses of super(), and fix one test
........
  r70046 | antoine.pitrou | 2009-02-27 19:31:00 -0600 (Fri, 27 Feb 2009) | 3 lines

  Bump up CHUNK_SIZE (no need to make the Python version look slower than it is)
........
  r70047 | benjamin.peterson | 2009-02-27 20:03:26 -0600 (Fri, 27 Feb 2009) | 1 line

  fix typo
........
  r70048 | benjamin.peterson | 2009-02-27 21:35:11 -0600 (Fri, 27 Feb 2009) | 1 line

  move code to a better place
........
  r70067 | benjamin.peterson | 2009-02-28 10:43:20 -0600 (Sat, 28 Feb 2009) | 4 lines

  1. make sure to undo buffered read aheads in BufferedRandom.seek()
  2. refill the buffer if have <= 0
  3. fix the last failing test_io test!
........
  r70068 | benjamin.peterson | 2009-02-28 10:57:50 -0600 (Sat, 28 Feb 2009) | 1 line

  define read1() on the python implementation's BufferedIOBase
........
  r70069 | benjamin.peterson | 2009-02-28 11:01:17 -0600 (Sat, 28 Feb 2009) | 1 line

  document read1() in BufferedIOBase
........
  r70070 | benjamin.peterson | 2009-02-28 11:06:42 -0600 (Sat, 28 Feb 2009) | 1 line

  give credit where credit is due
........
  r70075 | antoine.pitrou | 2009-02-28 13:34:59 -0600 (Sat, 28 Feb 2009) | 3 lines

  Amaury's name
........
  r70112 | antoine.pitrou | 2009-03-02 17:11:55 -0600 (Mon, 02 Mar 2009) | 4 lines

  Looks like this is necessary in order to build cleanly under Windows
  (someone correct this if it's wrong, I'm no Windows user)
........
  r70133 | benjamin.peterson | 2009-03-03 15:23:32 -0600 (Tue, 03 Mar 2009) | 1 line

  fix test_newline_property on _pyio.StringIO
........
  r70135 | benjamin.peterson | 2009-03-03 15:47:30 -0600 (Tue, 03 Mar 2009) | 1 line

  fix typos and inconsistencies. thanks to Daniel Diniz
........
  r70140 | benjamin.peterson | 2009-03-03 16:21:10 -0600 (Tue, 03 Mar 2009) | 1 line

  add the test from #5266
........
2009-03-04 00:14:51 +00:00
Raymond Hettinger b212157465 Additional test for __reduce__. 2009-03-03 22:50:04 +00:00
Raymond Hettinger 89194ff280 Now that __keys are fully hidden, switch the underlying structure
to deque() which futher reduces the temptation to index or resort.
Also, it is a bit faster for some cases.
2009-03-03 22:42:48 +00:00
Hirokazu Yamamoto 0c9881782b Merged revisions 70137 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70137 | hirokazu.yamamoto | 2009-03-04 07:18:14 +0900 | 1 line

  Issue #5179: Fixed subprocess handle leak on failure on windows.
........
2009-03-03 22:41:26 +00:00
Raymond Hettinger 5b26fb530b Add another test. 2009-03-03 22:38:22 +00:00
Raymond Hettinger 14b89ffc7e Fix-up __reduce__ which could not reach the __keys variable indirectly.' 2009-03-03 22:20:56 +00:00
Raymond Hettinger 08c70cf53c Make the underlying data structure more private. 2009-03-03 20:47:29 +00:00
Raymond Hettinger b0d56afc84 Give dict views a helpful __repr__. 2009-03-03 10:52:49 +00:00
Raymond Hettinger ff23e8cfe5 Fix bootstrapping problem where setup.py was using configparser
before _collections had been built.
2009-03-03 01:32:48 +00:00
Benjamin Peterson f5b52246ed ignore the coding cookie in compile(), exec(), and eval() if the source is a string #4626 2009-03-02 23:31:26 +00:00
Raymond Hettinger 0663a1ed79 Let configparser use ordered dicts by default. 2009-03-02 23:06:00 +00:00
Benjamin Peterson 6accb988a1 Merged revisions 70107 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70107 | benjamin.peterson | 2009-03-02 16:41:42 -0600 (Mon, 02 Mar 2009) | 1 line

  give httplib.IncompleteRead a more sane repr #4308
........
2009-03-02 22:50:25 +00:00
Raymond Hettinger a4f52b12d6 Add OrderedDict support to collections.namedtuple(). 2009-03-02 22:28:31 +00:00
Raymond Hettinger ea9f8db2a2 Missed my last update to __eq__ to check matching length. 2009-03-02 21:28:41 +00:00
Raymond Hettinger 2d32f63ec9 PEP 372: OrderedDict() 2009-03-02 21:24:57 +00:00
Brett Cannon 57b46f5b0e Expose importlib.util.set___package__. 2009-03-02 14:38:26 +00:00
Tarek Ziadé d9ca384feb Merged revisions 70094 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70094 | tarek.ziade | 2009-03-02 06:38:44 +0100 (Mon, 02 Mar 2009) | 1 line

  removing the force-optimized option as discussed in #1533164
........
2009-03-02 05:41:25 +00:00
Gregory P. Smith ccc5ae7ae1 Merged revisions 70090 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70090 | gregory.p.smith | 2009-03-01 21:13:57 -0800 (Sun, 01 Mar 2009) | 3 lines

  Adds an optional flags argument to re.split, re.sub and re.subn to be
  consistent with the other re module functions.
........
2009-03-02 05:21:55 +00:00
Hirokazu Yamamoto 10c9937b23 Merged revisions 70056 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70056 | hirokazu.yamamoto | 2009-02-28 21:13:07 +0900 | 2 lines

  Issue #1733986: Fixed mmap crash in accessing elements of second map object
  with same tagname but larger size than first map. (Windows)
........
2009-02-28 12:21:53 +00:00
Hirokazu Yamamoto 39c6dea4a2 Merged revisions 70052 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70052 | hirokazu.yamamoto | 2009-02-28 19:31:54 +0900 | 2 lines

  Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer
  overrun.
........
2009-02-28 10:56:50 +00:00
Tarek Ziadé f072122c79 Merged revisions 70049 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70049 | tarek.ziade | 2009-02-28 11:08:02 +0100 (Sat, 28 Feb 2009) | 1 line

  Issues #1533164 and #5378: Added quiet and force-optimize options to Distutils bdist_rpm command
........
2009-02-28 10:16:43 +00:00
Tarek Ziadé 38e3d51ea7 Merged revisions 70017 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70017 | tarek.ziade | 2009-02-27 13:53:34 +0100 (Fri, 27 Feb 2009) | 1 line

  Issue #5052: make Distutils compatible with 2.3 again.
........
2009-02-27 12:58:56 +00:00
Raymond Hettinger 89fc2b7821 Give mapping views a usable repr. 2009-02-27 07:47:32 +00:00
Tarek Ziadé 041fb344f1 Merged revisions 70003 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70003 | tarek.ziade | 2009-02-27 00:44:00 +0100 (Fri, 27 Feb 2009) | 1 line

  removed unused import
........
2009-02-26 23:47:00 +00:00
Benjamin Peterson efb06b0d91 Merged revisions 69811,69947 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69811 | collin.winter | 2009-02-20 13:30:41 -0600 (Fri, 20 Feb 2009) | 2 lines

  Issue 5176: special-case string formatting in BINARY_MODULO implementation. This shows a modest (1-3%) speed-up in templating systems, for example.
........
  r69947 | jeffrey.yasskin | 2009-02-24 16:48:34 -0600 (Tue, 24 Feb 2009) | 3 lines

  Tools/scripts/analyze_dxp.py, a module with some helper functions to
  analyze the output of sys.getdxp().
........
2009-02-26 18:55:48 +00:00