Commit graph

47866 commits

Author SHA1 Message Date
Giampaolo Rodolà
f4977d2f50 Merged revisions 88501 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88501 | giampaolo.rodola | 2011-02-22 16:56:20 +0100 (mar, 22 feb 2011) | 1 line

  smtlib.py PEP8 normalization via pep8.py script.
........
2011-02-24 20:25:11 +00:00
Alexander Belopolsky
1ce92dc20d Issue #11286: Fixed unpickling of empty 2.x strings. 2011-02-24 19:40:09 +00:00
Éric Araujo
6c3787cb70 Allow usage of SomeABC.register as a class decorator. Patch by Edoardo Spadolini (#10868). 2011-02-24 18:03:10 +00:00
Raymond Hettinger
8edd2e9720 Issue #11296: rsplit() mentioned twice for the same change. 2011-02-24 11:15:36 +00:00
Benjamin Peterson
edf5132dfe Merged revisions 88540-88541 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88540 | benjamin.peterson | 2011-02-23 20:46:00 -0600 (Wed, 23 Feb 2011) | 1 line

  this seems to be pointlessly nested
........
  r88541 | benjamin.peterson | 2011-02-23 20:53:05 -0600 (Wed, 23 Feb 2011) | 1 line

  rewrite
........
2011-02-24 03:03:46 +00:00
Benjamin Peterson
5390d00cc6 rewrite 2011-02-24 02:53:05 +00:00
Benjamin Peterson
634ef9cb81 this seems to be pointlessly nested 2011-02-24 02:46:00 +00:00
Benjamin Peterson
a6f85e2270 Merged revisions 88535 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r88535 | brett.cannon | 2011-02-23 13:46:46 -0600 (Wed, 23 Feb 2011) | 1 line

  Add lib2to3.__main__ for easy testing from the console.
........
2011-02-24 01:41:46 +00:00
Raymond Hettinger
c38f025a55 Issue #11304: Input/output tutorial - PI is rounded not truncated. 2011-02-24 00:08:13 +00:00
Raymond Hettinger
756fe2608d Issue #11304: Input/output tutorial - PI is rounded not truncated. 2011-02-24 00:06:16 +00:00
Brett Cannon
e457f0d220 Revert r88503 as Benjamin's request. 2011-02-23 18:48:52 +00:00
Victor Stinner
e1ea8298c6 Issue #3080: Fix test_reprlib on Windows
Fix the test for last module changes (r88520).
2011-02-23 14:14:48 +00:00
Victor Stinner
659eb84457 Merged revisions 88481 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88481 | victor.stinner | 2011-02-21 22:13:44 +0100 (lun., 21 févr. 2011) | 4 lines

  Fix PyUnicode_FromFormatV("%c") for non-BMP char

  Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
  narrow build.
........
2011-02-23 12:14:22 +00:00
Victor Stinner
02bfdb3f79 Merged revisions 88530 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88530 | victor.stinner | 2011-02-23 13:07:37 +0100 (mer., 23 févr. 2011) | 4 lines

  Issue #11272: Fix input() and sys.stdin for Windows newline

  On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses
  universal newline (replace '\r\n' by '\n').
........
2011-02-23 12:10:23 +00:00
Victor Stinner
c0f1a1afae Issue #11272: Fix input() and sys.stdin for Windows newline
On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses
universal newline (replace '\r\n' by '\n').
2011-02-23 12:07:37 +00:00
Lars Gustäbel
9f6cbe09cc Merged revisions 88528 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88528 | lars.gustaebel | 2011-02-23 12:42:22 +0100 (Wed, 23 Feb 2011) | 16 lines

  Issue #11224: Improved sparse file read support (r85916) introduced a
  regression in _FileInFile which is used in file-like objects returned
  by TarFile.extractfile(). The inefficient design of the
  _FileInFile.read() method causes various dramatic side-effects and
  errors:

    - The data segment of a file member is read completely into memory
      every(!) time a small block is accessed. This is not only slow
      but may cause unexpected MemoryErrors with very large files.
    - Reading members from compressed tar archives is even slower
      because of the excessive backwards seeking which is done when the
      same data segment is read over and over again.
    - As a backwards seek on a TarFile opened in stream mode is not
      possible, using extractfile() fails with a StreamError.
........
2011-02-23 11:52:31 +00:00
Lars Gustäbel
dd071045e7 Issue #11224: Improved sparse file read support (r85916) introduced a
regression in _FileInFile which is used in file-like objects returned
by TarFile.extractfile(). The inefficient design of the
_FileInFile.read() method causes various dramatic side-effects and
errors:

  - The data segment of a file member is read completely into memory
    every(!) time a small block is accessed. This is not only slow
    but may cause unexpected MemoryErrors with very large files.
  - Reading members from compressed tar archives is even slower
    because of the excessive backwards seeking which is done when the
    same data segment is read over and over again.
  - As a backwards seek on a TarFile opened in stream mode is not
    possible, using extractfile() fails with a StreamError.
2011-02-23 11:42:22 +00:00
Victor Stinner
3eeee83391 dynload_dl.c: replace tabs by spaces 2011-02-23 11:29:28 +00:00
Raymond Hettinger
dcb29c93d2 Add tests for the collections helper class and sync-up with py3k branch. 2011-02-23 08:28:06 +00:00
Raymond Hettinger
499e19340e Add tests for the _ChainMap helper class. 2011-02-23 07:56:53 +00:00
Georg Brandl
08f5cf51dc Indent "versionadded" properly. 2011-02-23 07:31:24 +00:00
Georg Brandl
5329123ee0 Add new subdirectory to LIBSUBDIRS. 2011-02-23 07:30:12 +00:00
Raymond Hettinger
48e5cd3df3 nits 2011-02-23 04:22:31 +00:00
Raymond Hettinger
57d1a887e7 Fix imports from collections.abc 2011-02-23 00:46:28 +00:00
Victor Stinner
bd475115c4 Issue #3080: Add PyModule_GetNameObject()
repr(module) uses %R to format module name and filenames, instead of '%s' and
'%U', so surrogates from undecodable bytes in a filename (PEP 383) are escaped.
2011-02-23 00:21:43 +00:00
Victor Stinner
501c09a754 Issue #3080: Mark _PyImport_FindBuiltin() argument as constant
And as a consequence, mark also name argument of
_PyImport_FindExtensionUnicode() constant too. But I plan to change this
argument type to PyObject* later.
2011-02-23 00:02:00 +00:00
Victor Stinner
eda71c9ef1 Merged revisions 88517 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88517 | victor.stinner | 2011-02-23 00:38:34 +0100 (mer., 23 févr. 2011) | 1 line

  Issue #3080: document encoding used by import functions
........
2011-02-22 23:43:57 +00:00
Victor Stinner
d7e76405c7 Issue #3080: document encoding used by import functions 2011-02-22 23:38:34 +00:00
Victor Stinner
42040fb665 Issue #3080: Remove unused argument of _PyImport_GetDynLoadFunc()
The first argument, fqname, was not used.
2011-02-22 23:16:19 +00:00
Victor Stinner
9b99b448f7 Issue #3080: Mark PyWin_FindRegisteredModule() as private
This function was not declared in Python public API (in any .h file) and not
documented. Mark it as private to prepare a change of its API.
2011-02-22 23:12:28 +00:00
Antoine Pitrou
cc76a410e2 Merged revisions 88511 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88511 | antoine.pitrou | 2011-02-22 22:42:56 +0100 (mar., 22 févr. 2011) | 4 lines

  Issue #11277: finally fix Snow Leopard crash following r88460.
  (probably an OS-related issue with mmap)
........
2011-02-22 22:36:07 +00:00
Brett Cannon
cfbcdbbbf2 A crypt algorithm may not be available by returning None. 2011-02-22 21:55:51 +00:00
Brett Cannon
daa5799cb8 Make Lib/crypt.py meet PEP 8 standards. This also led to a tweak in the new API
by making methods() into a module attribute as it is statically calculated.
2011-02-22 21:48:06 +00:00
Antoine Pitrou
543b7f3ee9 Issue #11277: finally fix Snow Leopard crash following r88460.
(probably an OS-related issue with mmap)
2011-02-22 21:42:56 +00:00
Brett Cannon
d8878ccf13 Blocked revisions 88507 via svnmerge
........
  r88507 | brett.cannon | 2011-02-22 12:17:14 -0800 (Tue, 22 Feb 2011) | 1 line

  Fix test.test_crypt.test_methods() to pass on OS X.
........
2011-02-22 20:18:11 +00:00
Brett Cannon
c564a96583 Blocked revisions 88506 via svnmerge
........
  r88506 | brett.cannon | 2011-02-22 12:15:44 -0800 (Tue, 22 Feb 2011) | 2 lines

  Issue #8914: fix various warnings from the Clang static analyzer v254.
........
2011-02-22 20:17:24 +00:00
Brett Cannon
292ee5dc43 Fix test.test_crypt.test_methods() to pass on OS X. 2011-02-22 20:17:14 +00:00
Brett Cannon
b94767ff44 Issue #8914: fix various warnings from the Clang static analyzer v254. 2011-02-22 20:15:44 +00:00
Giampaolo Rodolà
79da6b7075 In FTP.close() method, make sure to also close the socket object, not only the file. 2011-02-22 19:24:33 +00:00
Giampaolo Rodolà
d686848807 In FTP.close() method, make sure to also close the socket object, not only the file. 2011-02-22 19:24:33 +00:00
Brett Cannon
4f85c3fa4c Blocked revisions 88503 via svnmerge
........
  r88503 | brett.cannon | 2011-02-22 11:12:43 -0800 (Tue, 22 Feb 2011) | 1 line

  Add lib2to3.__main__ to make it easier for debugging purposes to run 2to3.
........
2011-02-22 19:13:46 +00:00
Brett Cannon
4cfa24757b Add lib2to3.__main__ to make it easier for debugging purposes to run 2to3. 2011-02-22 19:12:43 +00:00
Terry Reedy
ba9ad6021a Fix typo reported by 'Paddy' on python-list. 2011-02-22 16:24:07 +00:00
Giampaolo Rodolà
bd258bd4c6 smtlib.py PEP8 normalization via pep8.py script. 2011-02-22 15:56:20 +00:00
Sean Reifscheider
e2dfefbe85 Issue #10924: Adding salt and Modular Crypt Format to crypt library. 2011-02-22 10:55:44 +00:00
Brett Cannon
45b96d373e Merged revisions 88498 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88498 | brett.cannon | 2011-02-21 19:25:12 -0800 (Mon, 21 Feb 2011) | 8 lines

  Issue #11074: Make 'tokenize' so it can be reloaded.

  The module stored away the 'open' object as found in the global namespace
  (which fell through to the built-in namespace) since it defined its own 'open'.
  Problem is that if you reloaded the module it then grabbed the 'open' defined
  in the previous load, leading to code that infinite recursed. Switched to
  simply call builtins.open directly.
........
2011-02-22 03:35:18 +00:00
Brett Cannon
f3042782af Issue #11074: Make 'tokenize' so it can be reloaded.
The module stored away the 'open' object as found in the global namespace
(which fell through to the built-in namespace) since it defined its own 'open'.
Problem is that if you reloaded the module it then grabbed the 'open' defined
in the previous load, leading to code that infinite recursed. Switched to
simply call builtins.open directly.
2011-02-22 03:25:12 +00:00
Brett Cannon
64c9af1508 Merged revisions 88496 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88496 | brett.cannon | 2011-02-21 19:14:12 -0800 (Mon, 21 Feb 2011) | 4 lines

  Issue #10512: close the log file in cgi when running tests.

  Thanks to Nadeem Vawda for the find and an initial fix.
........
2011-02-22 03:16:07 +00:00
Brett Cannon
eeb114b028 Issue #10512: close the log file in cgi when running tests.
Thanks to Nadeem Vawda for the find and an initial fix.
2011-02-22 03:14:12 +00:00
Brett Cannon
d8b64788ce Blocked revisions 88494 via svnmerge
........
  r88494 | brett.cannon | 2011-02-21 19:04:06 -0800 (Mon, 21 Feb 2011) | 10 lines

  Issue #10992: make tests pass when run under coverage.

  Various tests fail when run under coverage. A primary culprit is refcount tests
  which fail as the counts are thrown off by the coverage code. A new decorator
  -- test.support.refcount_test -- is used to decorate tests which test refcounts
  and to skip them when running under coverage. Other tests simply fail because
  of changes in the system (e.g., __local__ suddenly appearing).

  Thanks to Kristian Vlaardingerbroek for helping to diagnose the test failures.
........
2011-02-22 03:07:39 +00:00