]> granicus.if.org Git - python/log
python
14 years agoRecorded merge of revisions 81415 via svnmerge from
Georg Brandl [Fri, 21 May 2010 20:57:33 +0000 (20:57 +0000)]
Recorded merge of revisions 81415 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81415 | georg.brandl | 2010-05-21 22:52:46 +0200 (Fr, 21 Mai 2010) | 1 line

  typo
........

14 years agoMerged revisions 81414 via svnmerge from
Benjamin Peterson [Fri, 21 May 2010 20:55:22 +0000 (20:55 +0000)]
Merged revisions 81414 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81414 | benjamin.peterson | 2010-05-21 15:51:45 -0500 (Fri, 21 May 2010) | 1 line

  return NotImplemented from Mapping when comparing to a non-mapping #8729
........

14 years agoRemove redundant example.
Georg Brandl [Fri, 21 May 2010 20:45:12 +0000 (20:45 +0000)]
Remove redundant example.

14 years agoMerged revisions 81404 via svnmerge from
Georg Brandl [Fri, 21 May 2010 20:28:13 +0000 (20:28 +0000)]
Merged revisions 81404 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81404 | georg.brandl | 2010-05-21 22:24:45 +0200 (Fr, 21 Mai 2010) | 1 line

  #8783: replace link to now dead hash collision FAQ.
........

14 years agoIssue #8780: Fix a regression introduced by r78946 in subprocess on Windows
Victor Stinner [Fri, 21 May 2010 20:13:12 +0000 (20:13 +0000)]
Issue #8780: Fix a regression introduced by r78946 in subprocess on Windows

Ensure that stdout / stderr is inherited from the parent if stdout=PIPE /
stderr=PIPE is not used.

14 years agoMerged revisions 81398 via svnmerge from
Antoine Pitrou [Fri, 21 May 2010 17:25:34 +0000 (17:25 +0000)]
Merged revisions 81398 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81398 | antoine.pitrou | 2010-05-21 19:12:38 +0200 (ven., 21 mai 2010) | 6 lines

  Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
  embedders of the interpreter to set sys.argv without also modifying
  sys.path.  This helps fix `CVE-2008-5983
  <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
........

14 years agoIssue #8748: Fix two issues with comparisons between complex and integer
Mark Dickinson [Fri, 21 May 2010 14:55:26 +0000 (14:55 +0000)]
Issue #8748: Fix two issues with comparisons between complex and integer
objects.  (1) The comparison could incorrectly return True in some cases
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
(2) The comparison raised an OverflowError for large integers, leading
to unpredictable exceptions when combining integers and complex objects
in sets or dicts.

Patch by Meador Inge.

14 years agoIssue #8774: tabnanny uses the encoding cookie (#coding:...) to use the correct
Victor Stinner [Fri, 21 May 2010 10:52:08 +0000 (10:52 +0000)]
Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the correct
encoding

14 years agoIssue #4870: Add an `options` attribute to SSL contexts, as well as
Antoine Pitrou [Fri, 21 May 2010 09:56:06 +0000 (09:56 +0000)]
Issue #4870: Add an `options` attribute to SSL contexts, as well as
several ``OP_*`` constants to the `ssl` module.  This allows to selectively
disable protocol versions, when used in combination with `PROTOCOL_SSLv23`.

14 years agoMerged revisions 81385 via svnmerge from
Benjamin Peterson [Thu, 20 May 2010 22:29:43 +0000 (22:29 +0000)]
Merged revisions 81385 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81385 | benjamin.peterson | 2010-05-20 17:23:37 -0500 (Thu, 20 May 2010) | 1 line

  fix extra 't' #8778
........

14 years agoBlocked revisions 81377 via svnmerge
Victor Stinner [Thu, 20 May 2010 11:30:37 +0000 (11:30 +0000)]
Blocked revisions 81377 via svnmerge

........
  r81377 | victor.stinner | 2010-05-20 13:29:45 +0200 (jeu., 20 mai 2010) | 8 lines

  libpython.py: fix support of non-BMP unicode characters

  Forward port some code from Python3:

   * join surrogate pairs if sizeof(Py_UNICODE)==2
   * Enable non-BMP test on narrow builds using u"\U0001D121" instead of
     unichr(0x1D121)
........

14 years agoIssue #8559: improve unicode support of (gdb) libpython.py
Victor Stinner [Wed, 19 May 2010 23:04:56 +0000 (23:04 +0000)]
Issue #8559: improve unicode support of (gdb) libpython.py

 * Escape non printable characters (use locale.getpreferredencoding())
 * Fix support of surrogate pairs
 * test_gdb.py: use ascii() instead of repr() in gdb program arguments to avoid
   encoding issues
 * Fix test_strings() of test_gdb.py for encoding different than UTF-8
   (eg. ACSII)

14 years agoMerged revisions 81371 via svnmerge from
Tarek Ziadé [Wed, 19 May 2010 22:25:00 +0000 (22:25 +0000)]
Merged revisions 81371 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81371 | tarek.ziade | 2010-05-20 00:20:14 +0200 (Thu, 20 May 2010) | 1 line

  #8759: Fixed user paths in sysconfig for posix and os2 schemes
........

14 years agoAdd descriptor HOWTO to py3k docs.
Georg Brandl [Wed, 19 May 2010 21:39:51 +0000 (21:39 +0000)]
Add descriptor HOWTO to py3k docs.

14 years agoMerged revisions 80068 via svnmerge from
Georg Brandl [Wed, 19 May 2010 21:06:36 +0000 (21:06 +0000)]
Merged revisions 80068 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80068 | georg.brandl | 2010-04-14 10:56:01 +0200 (Mi, 14 Apr 2010) | 1 line

  #5341: fix typo and adapt docstring syntax.
........

14 years agoRecorded merge of revisions 80466-80469 via svnmerge from
Georg Brandl [Wed, 19 May 2010 21:03:51 +0000 (21:03 +0000)]
Recorded merge of revisions 80466-80469 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80466 | georg.brandl | 2010-04-25 12:54:42 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Better cross-referencing in socket and winreg docs.
........
  r80467 | georg.brandl | 2010-04-25 12:55:16 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Remove reference to winreg being the fabled high-level registry interface.
........
  r80468 | georg.brandl | 2010-04-25 12:55:58 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Minor spelling changes to _winreg docs.
........
  r80469 | georg.brandl | 2010-04-25 12:56:41 +0200 (So, 25 Apr 2010) | 1 line

  Fix code example to have valid syntax so that it can be highlighted.
........

14 years agoRecorded merge of revisions 80030,80067,80069,80080-80081,80084,80432-80433,80465...
Georg Brandl [Wed, 19 May 2010 20:58:02 +0000 (20:58 +0000)]
Recorded merge of revisions 80030,80067,80069,80080-80081,80084,80432-80433,80465,80470,81059,81065-81067 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80030 | georg.brandl | 2010-04-13 08:43:54 +0200 (Di, 13 Apr 2010) | 1 line

  Get rid of multi-row cells.
........
  r80067 | georg.brandl | 2010-04-14 10:53:38 +0200 (Mi, 14 Apr 2010) | 1 line

  #5341: typo.
........
  r80069 | georg.brandl | 2010-04-14 15:50:31 +0200 (Mi, 14 Apr 2010) | 1 line

  Add an x-ref to where the O_ constants are documented and move the SEEK_ constants after lseek().
........
  r80080 | georg.brandl | 2010-04-14 21:16:38 +0200 (Mi, 14 Apr 2010) | 1 line

  #8399: add note about Windows and O_BINARY.
........
  r80081 | georg.brandl | 2010-04-14 23:34:44 +0200 (Mi, 14 Apr 2010) | 1 line

  #5250: document __instancecheck__ and __subclasscheck__.  I hope the part about the class/metaclass distinction is understandable.
........
  r80084 | georg.brandl | 2010-04-14 23:46:45 +0200 (Mi, 14 Apr 2010) | 1 line

  Fix missing.
........
  r80432 | georg.brandl | 2010-04-24 10:56:58 +0200 (Sa, 24 Apr 2010) | 1 line

  Markup fixes.
........
  r80433 | georg.brandl | 2010-04-24 11:08:10 +0200 (Sa, 24 Apr 2010) | 1 line

  #7507: quote "!" in pipes.quote(); it is a special character for some shells.
........
  r80465 | georg.brandl | 2010-04-25 12:29:17 +0200 (So, 25 Apr 2010) | 1 line

  Remove LaTeXy index entry syntax.
........
  r80470 | georg.brandl | 2010-04-25 12:57:15 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Make socket setblocking <-> settimeout examples symmetric.
........
  r81059 | georg.brandl | 2010-05-10 23:02:51 +0200 (Mo, 10 Mai 2010) | 1 line

  #8642: fix wrong function name.
........
  r81065 | georg.brandl | 2010-05-10 23:46:50 +0200 (Mo, 10 Mai 2010) | 1 line

  Fix reference direction.
........
  r81066 | georg.brandl | 2010-05-10 23:50:57 +0200 (Mo, 10 Mai 2010) | 1 line

  Consolidate deprecation messages.
........
  r81067 | georg.brandl | 2010-05-10 23:51:33 +0200 (Mo, 10 Mai 2010) | 1 line

  Fix typo.
........

14 years agoMerged revisions 80030,80067,80069,80080-80081,80084,80432-80433,80465-80470,81059...
Georg Brandl [Wed, 19 May 2010 20:57:08 +0000 (20:57 +0000)]
Merged revisions 80030,80067,80069,80080-80081,80084,80432-80433,80465-80470,81059,81065-81067 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80030 | georg.brandl | 2010-04-13 08:43:54 +0200 (Di, 13 Apr 2010) | 1 line

  Get rid of multi-row cells.
........
  r80067 | georg.brandl | 2010-04-14 10:53:38 +0200 (Mi, 14 Apr 2010) | 1 line

  #5341: typo.
........
  r80069 | georg.brandl | 2010-04-14 15:50:31 +0200 (Mi, 14 Apr 2010) | 1 line

  Add an x-ref to where the O_ constants are documented and move the SEEK_ constants after lseek().
........
  r80080 | georg.brandl | 2010-04-14 21:16:38 +0200 (Mi, 14 Apr 2010) | 1 line

  #8399: add note about Windows and O_BINARY.
........
  r80081 | georg.brandl | 2010-04-14 23:34:44 +0200 (Mi, 14 Apr 2010) | 1 line

  #5250: document __instancecheck__ and __subclasscheck__.  I hope the part about the class/metaclass distinction is understandable.
........
  r80084 | georg.brandl | 2010-04-14 23:46:45 +0200 (Mi, 14 Apr 2010) | 1 line

  Fix missing.
........
  r80432 | georg.brandl | 2010-04-24 10:56:58 +0200 (Sa, 24 Apr 2010) | 1 line

  Markup fixes.
........
  r80433 | georg.brandl | 2010-04-24 11:08:10 +0200 (Sa, 24 Apr 2010) | 1 line

  #7507: quote "!" in pipes.quote(); it is a special character for some shells.
........
  r80465 | georg.brandl | 2010-04-25 12:29:17 +0200 (So, 25 Apr 2010) | 1 line

  Remove LaTeXy index entry syntax.
........
  r80466 | georg.brandl | 2010-04-25 12:54:42 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Better cross-referencing in socket and winreg docs.
........
  r80467 | georg.brandl | 2010-04-25 12:55:16 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Remove reference to winreg being the fabled high-level registry interface.
........
  r80468 | georg.brandl | 2010-04-25 12:55:58 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Minor spelling changes to _winreg docs.
........
  r80469 | georg.brandl | 2010-04-25 12:56:41 +0200 (So, 25 Apr 2010) | 1 line

  Fix code example to have valid syntax so that it can be highlighted.
........
  r80470 | georg.brandl | 2010-04-25 12:57:15 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Make socket setblocking <-> settimeout examples symmetric.
........
  r81059 | georg.brandl | 2010-05-10 23:02:51 +0200 (Mo, 10 Mai 2010) | 1 line

  #8642: fix wrong function name.
........
  r81065 | georg.brandl | 2010-05-10 23:46:50 +0200 (Mo, 10 Mai 2010) | 1 line

  Fix reference direction.
........
  r81066 | georg.brandl | 2010-05-10 23:50:57 +0200 (Mo, 10 Mai 2010) | 1 line

  Consolidate deprecation messages.
........
  r81067 | georg.brandl | 2010-05-10 23:51:33 +0200 (Mo, 10 Mai 2010) | 1 line

  Fix typo.
........

14 years agoIssue #8766: Initialize _warnings module before importing the first module.
Victor Stinner [Wed, 19 May 2010 20:40:50 +0000 (20:40 +0000)]
Issue #8766: Initialize _warnings module before importing the first module.
Fix a crash if an empty directory called "encodings" exists in sys.path.

14 years agoOops, add the new test_log.py for distutils test suite (missing part of r81359)
Victor Stinner [Wed, 19 May 2010 17:15:50 +0000 (17:15 +0000)]
Oops, add the new test_log.py for distutils test suite (missing part of r81359)

14 years agoregrtest.py: call replace_stdout() before the first call to print()
Victor Stinner [Wed, 19 May 2010 17:11:19 +0000 (17:11 +0000)]
regrtest.py: call replace_stdout() before the first call to print()

print("==  ", os.getcwd()) fails if the current working directory is not ASCII
whereas sys.stdout encoding is ASCII.

14 years agoIssue #8663: distutils.log emulates backslashreplace error handler. Fix
Victor Stinner [Wed, 19 May 2010 17:00:07 +0000 (17:00 +0000)]
Issue #8663: distutils.log emulates backslashreplace error handler. Fix
compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if stdout
is not a TTY).

14 years agoIssue #8589: Decode PYTHONWARNINGS environment variable with the file system
Victor Stinner [Wed, 19 May 2010 16:53:30 +0000 (16:53 +0000)]
Issue #8589: Decode PYTHONWARNINGS environment variable with the file system
encoding and surrogateespace error handler instead of the locale encoding to be
consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.

14 years agoMerged revisions 81354 via svnmerge from
Stefan Krah [Wed, 19 May 2010 16:09:41 +0000 (16:09 +0000)]
Merged revisions 81354 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81354 | stefan.krah | 2010-05-19 17:59:40 +0200 (Wed, 19 May 2010) | 3 lines

  Fix typo.
........

14 years agoMerged revisions 81350 via svnmerge from
Stefan Krah [Wed, 19 May 2010 15:52:31 +0000 (15:52 +0000)]
Merged revisions 81350 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81350 | stefan.krah | 2010-05-19 17:46:39 +0200 (Wed, 19 May 2010) | 1 line

  Fix typos in docstrings.
........

14 years agoOoops, add missing ";" in my previous commit (r81324, typeobject.c)
Victor Stinner [Wed, 19 May 2010 01:50:45 +0000 (01:50 +0000)]
Ooops, add missing ";" in my previous commit (r81324, typeobject.c)

It's time to go to bed...

14 years agoIssue #6697: Check that _PyUnicode_AsString() result is not NULL in typeobject
Victor Stinner [Wed, 19 May 2010 01:42:46 +0000 (01:42 +0000)]
Issue #6697: Check that _PyUnicode_AsString() result is not NULL in typeobject

Type name and slots are already checked for surrogates somewhere else, but it's
better to ensure that the result is not NULL.

14 years agoIssue #6697: Check that _PyUnicode_AsString() result is not NULL in _sqlite
Victor Stinner [Wed, 19 May 2010 01:27:23 +0000 (01:27 +0000)]
Issue #6697: Check that _PyUnicode_AsString() result is not NULL in _sqlite

Strip also some trailing spaces

14 years agoIssue #6697: Check that _PyUnicode_AsString() result is not NULL in textio.c
Victor Stinner [Wed, 19 May 2010 01:17:01 +0000 (01:17 +0000)]
Issue #6697: Check that _PyUnicode_AsString() result is not NULL in textio.c

The bug may occurs if locale.getpreferredencoding() returns an encoding with a
surrogate (very unlikely!).

14 years agoIssue #6697: Fix a crash if sys.stdin or sys.stdout encoding contain a surrogate
Victor Stinner [Wed, 19 May 2010 01:06:22 +0000 (01:06 +0000)]
Issue #6697: Fix a crash if sys.stdin or sys.stdout encoding contain a surrogate

This is *very* unlikely :-)

14 years agoIssue #6697: Fix a crash if a keyword contains a surrogate
Victor Stinner [Wed, 19 May 2010 00:54:06 +0000 (00:54 +0000)]
Issue #6697: Fix a crash if a keyword contains a surrogate

14 years agoIssue #6697: Check that _PyUnicode_AsString() result is not NULL
Victor Stinner [Wed, 19 May 2010 00:34:15 +0000 (00:34 +0000)]
Issue #6697: Check that _PyUnicode_AsString() result is not NULL

14 years agoIssue #6697: Fix a crash if a module attribute name contains a surrogate
Victor Stinner [Wed, 19 May 2010 00:03:09 +0000 (00:03 +0000)]
Issue #6697: Fix a crash if a module attribute name contains a surrogate

14 years agoMerged revisions 81294 via svnmerge from
Giampaolo Rodolà [Tue, 18 May 2010 20:11:58 +0000 (20:11 +0000)]
Merged revisions 81294 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81294 | giampaolo.rodola | 2010-05-18 22:04:31 +0200 (mar, 18 mag 2010) | 1 line

  Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror.
........

14 years agoAdd versionadded (3.2) tag to os.supports_bytes_environ documentation
Victor Stinner [Tue, 18 May 2010 17:24:09 +0000 (17:24 +0000)]
Add versionadded (3.2) tag to os.supports_bytes_environ documentation

14 years agoIssue #8513: os.get_exec_path() supports b'PATH' key and bytes value.
Victor Stinner [Tue, 18 May 2010 17:17:23 +0000 (17:17 +0000)]
Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value.
subprocess.Popen() and os._execvpe() support bytes program name. Add
os.supports_bytes_environ flag: True if the native OS type of the environment
is bytes (eg. False on Windows).

14 years agoRepair test failure. Bug 8727.
Barry Warsaw [Tue, 18 May 2010 14:15:20 +0000 (14:15 +0000)]
Repair test failure.  Bug 8727.

14 years agoMerged revisions 81286 via svnmerge from
Senthil Kumaran [Tue, 18 May 2010 13:48:45 +0000 (13:48 +0000)]
Merged revisions 81286 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81286 | senthil.kumaran | 2010-05-18 19:10:23 +0530 (Tue, 18 May 2010) | 3 lines

  Doc Fix. Correct link to Zephyr ASDL Abstract page.
........

14 years agoRemoving the reference in the docs for overriding _urlopener global value. See Issue8...
Senthil Kumaran [Tue, 18 May 2010 03:58:36 +0000 (03:58 +0000)]
Removing the reference in the docs for overriding _urlopener global value. See Issue8619 for details.

14 years agoMerged revisions 81279 via svnmerge from
Senthil Kumaran [Tue, 18 May 2010 03:26:11 +0000 (03:26 +0000)]
Merged revisions 81279 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81279 | senthil.kumaran | 2010-05-18 08:50:43 +0530 (Tue, 18 May 2010) | 3 lines

  Fix minor typo.
........

14 years agoFix test_main_invalid_unicode() of test_sys for ASCII locale encoding
Victor Stinner [Mon, 17 May 2010 19:57:40 +0000 (19:57 +0000)]
Fix test_main_invalid_unicode() of test_sys for ASCII locale encoding

It should fix sparc 3.x and 3.1 failures.

14 years agoIssue #8633: Support for POSIX.1-2008 binary pax headers.
Lars Gustäbel [Mon, 17 May 2010 18:02:50 +0000 (18:02 +0000)]
Issue #8633: Support for POSIX.1-2008 binary pax headers.

tarfile is now able to read and write pax headers with a
"hdrcharset=BINARY" record. This record was introduced in
POSIX.1-2008 as a method to store unencoded binary strings that
cannot be translated to UTF-8. In practice, this is just a workaround
that allows a tar implementation to store filenames that do not
comply with the current filesystem encoding and thus cannot be
decoded correctly.
Additionally, tarfile works around a bug in current versions of GNU
tar: undecodable filenames are stored as-is in a pax header without a
"hdrcharset" record being added. Technically, these headers are
invalid, but tarfile manages to read them correctly anyway.

14 years agoInadvertently removed part of the comment in r81271.
Florent Xicluna [Mon, 17 May 2010 18:01:22 +0000 (18:01 +0000)]
Inadvertently removed part of the comment in r81271.

14 years agoIssue #1285086: Speed up urllib.parse functions: quote, quote_from_bytes, unquote...
Florent Xicluna [Mon, 17 May 2010 17:33:07 +0000 (17:33 +0000)]
Issue #1285086: Speed up urllib.parse functions: quote, quote_from_bytes, unquote, unquote_to_bytes.

Recorded merge of revisions 81265 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81265 | florent.xicluna | 2010-05-17 15:35:09 +0200 (lun, 17 mai 2010) | 2 lines

  Issue #1285086: Speed up urllib.quote and urllib.unquote for simple cases.
........

14 years agoMerged revision 81259 via svnmerge from
Florent Xicluna [Mon, 17 May 2010 17:24:07 +0000 (17:24 +0000)]
Merged revision 81259 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81259 | florent.xicluna | 2010-05-17 12:39:07 +0200 (lun, 17 mai 2010) | 2 lines

  Slight style cleanup.
........

14 years agoFix test_capi in !pydebug mode, where my original attempt segfaulted without
Jeffrey Yasskin [Mon, 17 May 2010 16:59:23 +0000 (16:59 +0000)]
Fix test_capi in !pydebug mode, where my original attempt segfaulted without
producing the expected error message.  The test only tests what it's supposed
to test in pydebug mode though.  Fixes issue 8726.

14 years agoImprove test_exit() error message to analyze sparc failures
Victor Stinner [Mon, 17 May 2010 14:36:43 +0000 (14:36 +0000)]
Improve test_exit() error message to analyze sparc failures

14 years agoTypo (thanks Arfrever)
Antoine Pitrou [Mon, 17 May 2010 14:13:10 +0000 (14:13 +0000)]
Typo (thanks Arfrever)

14 years agoMerged revisions 81261 via svnmerge from
Tarek Ziadé [Mon, 17 May 2010 11:01:57 +0000 (11:01 +0000)]
Merged revisions 81261 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81261 | tarek.ziade | 2010-05-17 12:54:43 +0200 (Mon, 17 May 2010) | 1 line

  upgraded distutils docs w.r.t. the manifest regeneration
........

14 years agoMerged revisions 81255 via svnmerge from
Tarek Ziadé [Mon, 17 May 2010 10:38:53 +0000 (10:38 +0000)]
Merged revisions 81255 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81255 | tarek.ziade | 2010-05-17 12:06:20 +0200 (Mon, 17 May 2010) | 1 line

  Fixed #8688: Distutils now recalculates MANIFEST everytime.
........

14 years agoTry to fix buildbot failures with old OpenSSLs.
Antoine Pitrou [Mon, 17 May 2010 10:30:00 +0000 (10:30 +0000)]
Try to fix buildbot failures with old OpenSSLs.

14 years agoFix refleak in internal_print() introduced by myself in r81251
Victor Stinner [Mon, 17 May 2010 09:33:42 +0000 (09:33 +0000)]
Fix refleak in internal_print() introduced by myself in r81251

_PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to
automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is
destroyed.

14 years agohandle_system_exit() flushs files to warranty the output order
Victor Stinner [Mon, 17 May 2010 08:58:51 +0000 (08:58 +0000)]
handle_system_exit() flushs files to warranty the output order

PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr()
writes into the Python object sys.stderr. Each object has its own buffer, so
call sys.stderr.flush() and fflush(stderr).

14 years agoPyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
Victor Stinner [Mon, 17 May 2010 01:26:01 +0000 (01:26 +0000)]
PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
of strict) error handler to escape surrogates

14 years agoIssue #6697: Fix a crash if code of "python -c code" contains surrogates
Victor Stinner [Mon, 17 May 2010 01:13:37 +0000 (01:13 +0000)]
Issue #6697: Fix a crash if code of "python -c code" contains surrogates

14 years agoOops, my patch on subprocess is not merged yet: fix my previous commit on test_os
Victor Stinner [Mon, 17 May 2010 00:18:34 +0000 (00:18 +0000)]
Oops, my patch on subprocess is not merged yet: fix my previous commit on test_os

14 years agotest_os: cleanup test_internal_execvpe() and os._execvpe() mockup
Victor Stinner [Mon, 17 May 2010 00:14:53 +0000 (00:14 +0000)]
test_os: cleanup test_internal_execvpe() and os._execvpe() mockup

 * Replace os.defpath instead of os.get_exec_path() to test also
   os.get_exec_path()
 * Use contextlib.contextmanager, move the mockup outside the class, and
   the mockup returns directly the call list object
 * Use two different contexts for the two tests
 * Use more revelant values and names

14 years ago"xyzzy" is not a silly enough name for some OpenSSL versions to report an error
Antoine Pitrou [Sun, 16 May 2010 23:46:26 +0000 (23:46 +0000)]
"xyzzy" is not a silly enough name for some OpenSSL versions to report an error

14 years agoMerged revisions 81241 via svnmerge from
Antoine Pitrou [Sun, 16 May 2010 23:14:22 +0000 (23:14 +0000)]
Merged revisions 81241 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81241 | antoine.pitrou | 2010-05-17 01:11:46 +0200 (lun., 17 mai 2010) | 4 lines

  Clear the OpenSSL error queue each time an error is signalled.
  When the error queue is not emptied, strange things can happen on the next SSL call, depending on the OpenSSL version.
........

14 years agoIssue #8477: ssl.RAND_egd() supports str with surrogates and bytes for the path
Victor Stinner [Sun, 16 May 2010 21:36:37 +0000 (21:36 +0000)]
Issue #8477: ssl.RAND_egd() supports str with surrogates and bytes for the path

14 years agoIssue #8477: _ssl._test_decode_cert() supports str with surrogates and bytes
Victor Stinner [Sun, 16 May 2010 21:23:48 +0000 (21:23 +0000)]
Issue #8477: _ssl._test_decode_cert() supports str with surrogates and bytes
for the filename

14 years agoDo not fail if ssl fails to import
Antoine Pitrou [Sun, 16 May 2010 20:35:03 +0000 (20:35 +0000)]
Do not fail if ssl fails to import

14 years agoFix (hopefully) the remaining test_ssl buildbot failures
Antoine Pitrou [Sun, 16 May 2010 19:56:32 +0000 (19:56 +0000)]
Fix (hopefully) the remaining test_ssl buildbot failures

14 years agoFollowup on r81233: fix test_ssl with OpenSSL < 1.0.0.
Antoine Pitrou [Sun, 16 May 2010 19:22:44 +0000 (19:22 +0000)]
Followup on r81233: fix test_ssl with OpenSSL < 1.0.0.

14 years agoIssue #8550: Add first class `SSLContext` objects to the ssl module.
Antoine Pitrou [Sun, 16 May 2010 18:19:27 +0000 (18:19 +0000)]
Issue #8550: Add first class `SSLContext` objects to the ssl module.

14 years agoMerged revisions 81229 via svnmerge from
Antoine Pitrou [Sun, 16 May 2010 14:19:41 +0000 (14:19 +0000)]
Merged revisions 81229 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81229 | antoine.pitrou | 2010-05-16 16:16:56 +0200 (dim., 16 mai 2010) | 3 lines

  Document that SSL v2 is insecure.
........

14 years agoMerged revisions 81224 via svnmerge from
Victor Stinner [Sun, 16 May 2010 00:36:38 +0000 (00:36 +0000)]
Merged revisions 81224 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81224 | victor.stinner | 2010-05-16 02:34:40 +0200 (dim., 16 mai 2010) | 4 lines

  Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()

  fo is not set if the open() fails.
........

14 years agoMerged revisions 81220 via svnmerge from
Victor Stinner [Sat, 15 May 2010 23:00:51 +0000 (23:00 +0000)]
Merged revisions 81220 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81220 | victor.stinner | 2010-05-16 00:55:28 +0200 (dim., 16 mai 2010) | 4 lines

  Use 4-spaces for indentation (instead of tabs) in pgen outputs

  Regenerate (reindent) Python/graminit.c
........

14 years agoMake test_module_with_large_stack as an expected failure because of a change in
Brett Cannon [Sat, 15 May 2010 22:53:24 +0000 (22:53 +0000)]
Make test_module_with_large_stack as an expected failure because of a change in
importlib that is causing it to fail. Work to fix it is being tracked in issue
8727.

14 years agoFix a comment to state the right thing.
Brett Cannon [Sat, 15 May 2010 22:51:45 +0000 (22:51 +0000)]
Fix a comment to state the right thing.

14 years agoRecorded merge of revisions 81213 via svnmerge from
Victor Stinner [Sat, 15 May 2010 22:23:53 +0000 (22:23 +0000)]
Recorded merge of revisions 81213 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81213 | victor.stinner | 2010-05-16 00:19:27 +0200 (dim., 16 mai 2010) | 5 lines

  reindent _cursesmodule.c

  Use untabify.py + emacs (python3 mode) + manual editions for
  Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS
........

14 years agoA test was not guaranteeing cleanup in the face of an exception.
Brett Cannon [Sat, 15 May 2010 22:20:16 +0000 (22:20 +0000)]
A test was not guaranteeing cleanup in the face of an exception.

14 years agoBlocked revisions 81210 via svnmerge
Amaury Forgeot d'Arc [Sat, 15 May 2010 21:49:45 +0000 (21:49 +0000)]
Blocked revisions 81210 via svnmerge

........
  r81210 | amaury.forgeotdarc | 2010-05-15 23:45:30 +0200 (sam., 15 mai 2010) | 2 lines

  Remove unused variable, and fix a compilation warning on Windows
........

14 years agoIssue #8665: Fix `make pycremoval` exiting with non-zero status.
Antoine Pitrou [Sat, 15 May 2010 21:34:27 +0000 (21:34 +0000)]
Issue #8665: Fix `make pycremoval` exiting with non-zero status.

14 years agoRecorded merge of revisions 81205 via svnmerge from
Victor Stinner [Sat, 15 May 2010 21:04:43 +0000 (21:04 +0000)]
Recorded merge of revisions 81205 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81205 | victor.stinner | 2010-05-15 23:00:59 +0200 (sam., 15 mai 2010) | 2 lines

  NEWS: strip trailing spaces
........

14 years agoRemove unused variable, and fix a compilation warning on Windows.
Amaury Forgeot d'Arc [Sat, 15 May 2010 20:35:12 +0000 (20:35 +0000)]
Remove unused variable, and fix a compilation warning on Windows.

14 years agoMerged revisions 81200 via svnmerge from
Benjamin Peterson [Sat, 15 May 2010 17:52:12 +0000 (17:52 +0000)]
Merged revisions 81200 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81200 | benjamin.peterson | 2010-05-15 12:48:55 -0500 (Sat, 15 May 2010) | 1 line

  use TestCase skip method
........

14 years agofix one more runon
Benjamin Peterson [Sat, 15 May 2010 17:43:57 +0000 (17:43 +0000)]
fix one more runon

14 years agorephrase
Benjamin Peterson [Sat, 15 May 2010 17:43:18 +0000 (17:43 +0000)]
rephrase

14 years agofix run-on sentence
Benjamin Peterson [Sat, 15 May 2010 17:42:02 +0000 (17:42 +0000)]
fix run-on sentence

14 years agoIssue #8692: Improve performance of math.factorial:
Mark Dickinson [Sat, 15 May 2010 17:02:38 +0000 (17:02 +0000)]
Issue #8692: Improve performance of math.factorial:

(1) use a different algorithm that roughly halves the total number of
    multiplications required and results in more balanced multiplications
(2) use a lookup table for small arguments
(3) fast accumulation of products in C integer arithmetic rather than
    PyLong arithmetic when possible.

Typical speedup, from unscientific testing on a 64-bit laptop, is 4.5x
to 6.5x for arguments in the range 100 - 10000.

Patch by Daniel Stutzbach; extensive reviews by Alexander Belopolsky.

14 years agoIssue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a Unicode
Victor Stinner [Sat, 15 May 2010 16:27:27 +0000 (16:27 +0000)]
Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a Unicode
object to Py_FileSystemDefaultEncoding with the "surrogateescape" error
handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set,
fall back to UTF-8.

14 years agoEnable shortcuts for common encodings in PyUnicode_AsEncodedString() for any
Victor Stinner [Sat, 15 May 2010 13:14:32 +0000 (13:14 +0000)]
Enable shortcuts for common encodings in PyUnicode_AsEncodedString() for any
error handler, not only the default error handler (strict)

14 years agoIssue #8610: Load file system codec at startup, and display a fatal error on
Victor Stinner [Sat, 15 May 2010 12:27:16 +0000 (12:27 +0000)]
Issue #8610: Load file system codec at startup, and display a fatal error on
failure. Set the file system encoding to utf-8 (instead of None) if getting
the locale encoding failed, or if nl_langinfo(CODESET) function is missing.

14 years agoMerged revisions 81185 via svnmerge from
Stefan Krah [Sat, 15 May 2010 09:41:27 +0000 (09:41 +0000)]
Merged revisions 81185 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81185 | stefan.krah | 2010-05-15 11:31:08 +0200 (Sat, 15 May 2010) | 4 lines

  If the timeout is exceeded, count the tests as skipped instead of just
  issuing a warning.
........

14 years agoFix test_capi for Windows: strip newline characters
Victor Stinner [Sat, 15 May 2010 01:40:41 +0000 (01:40 +0000)]
Fix test_capi for Windows: strip newline characters

Fix test_no_FatalError_infinite_loop() introduced by r81142 (issue #3605).

14 years agoMerged revisions 81179 via svnmerge from
Victor Stinner [Fri, 14 May 2010 21:53:45 +0000 (21:53 +0000)]
Merged revisions 81179 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81179 | victor.stinner | 2010-05-14 23:52:26 +0200 (ven., 14 mai 2010) | 2 lines

  Fix regression introduced by r81154 (Issue #5099, subprocess destructor)
........

14 years agoposix_listdir(), posix_readlink(): avoid temporary PyBytes object
Victor Stinner [Fri, 14 May 2010 16:35:39 +0000 (16:35 +0000)]
posix_listdir(), posix_readlink(): avoid temporary PyBytes object

Use directly PyUnicode_DecodeFSDefaultAndSize() instead of
PyBytes_FromStringAndSize() + PyUnicode_FromEncodedObject() if the argument is
unicode.

14 years agoIssue #8711: Document PyUnicode_DecodeFSDefault*() functions
Victor Stinner [Fri, 14 May 2010 15:58:55 +0000 (15:58 +0000)]
Issue #8711: Document PyUnicode_DecodeFSDefault*() functions

 * Add paragraph titles to c-api/unicode.rst.
 * Fix PyUnicode_DecodeFSDefault*() comment: it now uses the "surrogateescape"
   error handler (and not "replace")
 * Remove "The function is intended to be used for paths and file names only
   during bootstrapping process where the codecs are not set up." from
   PyUnicode_FSConverter() comment: it is used after the bootstrapping and for
   other purposes than file names

14 years agoMerged revisions 81163 via svnmerge from
Victor Stinner [Fri, 14 May 2010 14:36:18 +0000 (14:36 +0000)]
Merged revisions 81163 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81163 | victor.stinner | 2010-05-14 16:20:07 +0200 (ven., 14 mai 2010) | 2 lines

  Doc: replace PEP xxx by :pep:`xxx` to create a link on the PEP
........

14 years agoIssue #4653: fix typo in flush_std_files()
Victor Stinner [Fri, 14 May 2010 00:59:09 +0000 (00:59 +0000)]
Issue #4653: fix typo in flush_std_files()

Don't call sys.stderr.flush() if sys has no stderr attribute or if
sys.stderr==None.

14 years agoMerged revisions 81154 via svnmerge from
Brett Cannon [Fri, 14 May 2010 00:33:40 +0000 (00:33 +0000)]
Merged revisions 81154 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81154 | brett.cannon | 2010-05-13 17:21:48 -0700 (Thu, 13 May 2010) | 15 lines

  subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
  interpreter shutdown semantics. Same issue goes for the methods that __del__
  called. Now all the methods capture the global objects it needs as default
  values to private parameters (could have stuck them on the class object itself,
  but since the objects have nothing directly to do with the class that seemed
  wrong).

  There is no test as making one that works is hard. This patch was
  verified against a consistently failing test in Mercurial's test suite, though,
  so it has been tested in some regard.

  Closes issue #5099. Thanks to Mary Stern for the bug report and Gabriel
  Genellina for writing another patch for the same issue and attempting to write
  a test.
........

14 years agoMerged revisions 81152 via svnmerge from
Brett Cannon [Fri, 14 May 2010 00:04:56 +0000 (00:04 +0000)]
Merged revisions 81152 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81152 | brett.cannon | 2010-05-13 16:59:41 -0700 (Thu, 13 May 2010) | 3 lines

  test_site was failing under darwin for non-framework builds because a test was
  assuming framework-specific site-packages directories were being used.
........

14 years agoMerged revisions 81145 via svnmerge from
Benjamin Peterson [Thu, 13 May 2010 21:16:51 +0000 (21:16 +0000)]
Merged revisions 81145 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81145 | benjamin.peterson | 2010-05-13 16:14:10 -0500 (Thu, 13 May 2010) | 1 line

  rip out mention of types.ListType #8703
........

14 years agoMake PyErr_Occurred return NULL if there is no current thread. Previously it
Jeffrey Yasskin [Thu, 13 May 2010 18:31:05 +0000 (18:31 +0000)]
Make PyErr_Occurred return NULL if there is no current thread.  Previously it
would Py_FatalError, which called PyErr_Occurred, resulting in a semi-infinite
recursion.

Fixes issue 3605.

14 years agoBlocked revisions 81137 via svnmerge
Victor Stinner [Thu, 13 May 2010 16:23:09 +0000 (16:23 +0000)]
Blocked revisions 81137 via svnmerge

........
  r81137 | victor.stinner | 2010-05-13 18:22:15 +0200 (jeu., 13 mai 2010) | 4 lines

  Fix verb tense in skip message.

  Ooops, merge also r80334 (patch by r.david.murray)
........

14 years agoBlocked revisions 81135 via svnmerge (r81135 is a merge of r80163 from py3k)
Victor Stinner [Thu, 13 May 2010 16:20:26 +0000 (16:20 +0000)]
Blocked revisions 81135 via svnmerge (r81135 is a merge of r80163 from py3k)

........
  r81135 | victor.stinner | 2010-05-13 18:18:14 +0200 (jeu., 13 mai 2010) | 6 lines

  Issue #8422, test_genericpath: skip the creation of a directory with an invalid
  UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8
  string).

  Merge r80163 from py3k branch.
........

14 years agoRemove unnecessary assignments.
Mark Dickinson [Thu, 13 May 2010 11:52:22 +0000 (11:52 +0000)]
Remove unnecessary assignments.

14 years agoMerged revisions 81130 via svnmerge from
Senthil Kumaran [Thu, 13 May 2010 03:37:23 +0000 (03:37 +0000)]
Merged revisions 81130 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81130 | senthil.kumaran | 2010-05-13 08:55:21 +0530 (Thu, 13 May 2010) | 3 lines

  Fix Issue8657 - adding git and git+ssh as know schemes.
........

14 years agoMerged revisions 81126 via svnmerge from
Mark Dickinson [Wed, 12 May 2010 19:54:51 +0000 (19:54 +0000)]
Merged revisions 81126 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81126 | mark.dickinson | 2010-05-12 20:53:36 +0100 (Wed, 12 May 2010) | 1 line

  Fix unused variable in test_factorial.
........