Commit Graph

3979 Commits

Author SHA1 Message Date
Nick Coghlan 5e76e94fd4 Merged revisions 80578 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80578 | nick.coghlan | 2010-04-29 00:29:06 +1000 (Thu, 29 Apr 2010) | 1 line

  Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module containing the exception under test (original patch by Lennart Regebro)
........
2010-06-12 13:42:46 +00:00
Victor Stinner 313a120ab6 Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode
filenames and enable os.fsencode().
2010-06-11 23:56:51 +00:00
Victor Stinner 0f35e2c0f4 Issue #8784: Set tarfile default encoding to 'utf-8' on Windows.
Note: file system encoding cannot be None anymore (since r81190, issue #8610).
2010-06-11 23:46:47 +00:00
Victor Stinner da0eca427a Issue #8966: If a ctypes structure field is an array of c_char, convert its
value to bytes instead of str (as done for c_char and c_char_p).
2010-06-11 21:50:30 +00:00
Antoine Pitrou cc0cfd3576 Merged revisions 81907 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81907 | antoine.pitrou | 2010-06-11 23:42:26 +0200 (ven., 11 juin 2010) | 5 lines

  Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
  the interpreter with characters outside the Basic Multilingual Plane
  (higher than 0x10000).
........
2010-06-11 21:46:32 +00:00
Alexander Belopolsky 177e8530cb Issue #3129: Trailing digits in format string are no longer ignored. 2010-06-11 16:04:59 +00:00
Mark Dickinson 9b88b916a9 Fix issue number typo. 2010-06-11 10:46:57 +00:00
Mark Dickinson 08ade6faa0 Issue #8188: Comparisons between Decimal objects and other numeric
objects (Fraction, float, complex, int) now all function as expected.
2010-06-11 10:44:52 +00:00
Mark Dickinson c73013127b Issue #8950: Make PyArg_Parse* with 'L' code raise for float inputs,
instead of warning.  This makes it consistent with the other integer
codes.
2010-06-10 16:05:10 +00:00
Victor Stinner 600d3bed6c Issue #8922: Normalize the encoding name in PyUnicode_AsEncodedString() to
enable shortcuts for upper case encoding name. Add also a shortcut for
"iso-8859-1" in PyUnicode_AsEncodedString() and PyUnicode_Decode().
2010-06-10 12:00:55 +00:00
Victor Stinner 3dcb5acdb0 Issue #8838, #8339: Remove codecs.charbuffer_encode() and "t#" parsing format
Remove last references to the "char buffer" of the buffer protocol from
Python3.
2010-06-08 22:54:19 +00:00
Alexander Belopolsky 9dd47b891d Added myself as a maintainer of time and datetime modules. 2010-06-08 17:06:48 +00:00
Benjamin Peterson 9530452e7d Merged revisions 81834 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81834 | benjamin.peterson | 2010-06-08 09:53:29 -0500 (Tue, 08 Jun 2010) | 1 line

  kill extra word
........
2010-06-08 14:57:22 +00:00
Stefan Krah a3ac44edbc Add note for r81830. 2010-06-08 14:00:52 +00:00
Benjamin Peterson 59a1b2f732 Merged revisions 81820 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81820 | benjamin.peterson | 2010-06-07 17:23:23 -0500 (Mon, 07 Jun 2010) | 1 line

  correctly overflow when indexes are too large
........
2010-06-07 22:31:26 +00:00
Victor Stinner 7f3652e371 Issue #8897: Fix sunau module, use bytes to write the header. Patch written by
Thomas Jollans.
2010-06-07 20:14:04 +00:00
Tarek Ziadé 7047eb7334 Merged revisions 81788 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81788 | tarek.ziade | 2010-06-06 22:05:20 +0200 (Sun, 06 Jun 2010) | 1 line

  Fixed #8909: now the doc details the size of the bitmap used in distutils' bdist_wininst
........
2010-06-06 20:18:42 +00:00
Alexander Belopolsky 69f3fd000d Merged revisions 81756 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81756 | alexander.belopolsky | 2010-06-05 10:54:26 -0400 (Sat, 05 Jun 2010) | 1 line

  Issue #8899: time.struct_time now has class and atribute docstrings.
........
2010-06-05 15:04:51 +00:00
Martin v. Löwis 2d5157eb91 Merged revisions 81701 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81701 | martin.v.loewis | 2010-06-04 21:39:07 +0200 (Fr, 04 Jun 2010) | 2 lines

  Issue #6470: Drop UNC prefix in FixTk.py
  Patch by Christop Gohlke and Amaury Forgeot d'Arc.
........
2010-06-04 19:50:26 +00:00
Martin v. Löwis cb081b838f Merged revisions 81697 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81697 | martin.v.loewis | 2010-06-04 20:04:42 +0200 (Fr, 04 Jun 2010) | 2 lines

  Issue #5464: Implement plural forms in msgfmt.py.
........
2010-06-04 18:14:42 +00:00
Martin v. Löwis ec78d0ae0e Merged revisions 81692 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81692 | martin.v.loewis | 2010-06-04 19:18:42 +0200 (Fr, 04 Jun 2010) | 3 lines

  Issue #8864: Define _XOPEN_SOURCE on Solaris for the
  multiprocessing module.
........
2010-06-04 17:20:56 +00:00
R. David Murray 7da8f06df0 #4768: store base64 encoded email body parts as text, not binary.
Patch and tests by Forest Bond.
2010-06-04 16:11:08 +00:00
Lars Gustäbel 2470ff19e6 Merged revisions 81663 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81663 | lars.gustaebel | 2010-06-03 11:56:22 +0200 (Thu, 03 Jun 2010) | 4 lines

  Issue #8833: tarfile created hard link entries with a size
  field != 0 by mistake. The associated testcase did not
  expose this bug because it was broken too.
........
2010-06-03 10:11:52 +00:00
R. David Murray 850fc85e69 Fix Charset.body_encode to encode to output_charset before calling base64mime.
This means that what gets encoded in base64 is the encoded version of the
unicode payload.  This bug was revealed by a forward port of the tests from
Issue 1368247, but the fix was completely different.

Note that the merge is only of the tests, the doc changes were inappropriate
since email5 expects unicode, not bytes.  I'm also not convinced that
quopri works correctly in email5, but that's a different issue.

Merged revisions 81658 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81658 | r.david.murray | 2010-06-02 18:03:15 -0400 (Wed, 02 Jun 2010) | 9 lines

  #1368247: make set_charset/MIMEText automatically encode unicode _payload.

  Fixes (mysterious, to the end user) UnicodeErrors when using utf-8 as
  the charset and unicode as the _text argument.  Also makes the way in
  which unicode gets encoded to quoted printable for other charsets more
  sane (it only worked by accident previously).  The _payload now is encoded
  to the charset.output_charset if it is unicode.
........
2010-06-03 01:58:28 +00:00
R. David Murray d35251dc19 #8845: expose sqlite3 inTransaction as RO in_transaction Connection attribute.
Patch by R. David Murray, unit tests by Shashwat Anand.
2010-06-01 01:32:12 +00:00
Alexander Belopolsky 1790bc43bf Issue #1289118: datetime.timedelta objects can now be multiplied by float
and divided by float and int objects.
2010-05-31 17:33:47 +00:00
Victor Stinner 33109a142b Issue #8837: Remove "O?" format of PyArg_Parse*() functions. The format is no
used anymore and it was never documented.
2010-05-28 21:55:10 +00:00
Martin v. Löwis 1a415762aa Merged revisions 81582 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81582 | martin.v.loewis | 2010-05-28 17:28:47 +0200 (Fr, 28 Mai 2010) | 2 lines

  Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
........
2010-05-28 15:44:20 +00:00
Alexander Belopolsky f03a616432 Merged revisions 81566 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81566 | alexander.belopolsky | 2010-05-27 16:55:27 -0400 (Thu, 27 May 2010) | 3 lines

  Issue #7150: Raise OverflowError if the result of adding or subtracting
  timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
........
2010-05-27 21:42:58 +00:00
Mark Dickinson 1ed21db0f5 Stefan Krah was missing from Misc/ACKS in the py3k branch. 2010-05-27 19:47:53 +00:00
Mark Dickinson 60438ba672 Merged revisions 81512 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81512 | brett.cannon | 2010-05-25 03:53:04 +0100 (Tue, 25 May 2010) | 1 line

  Make the contributor list alphabetical again.
........
2010-05-27 19:45:50 +00:00
Mark Dickinson f9a5a8e0af Issue #2844: Make int('42', n) consistently raise ValueError for
invalid integers n (including n = -909).
2010-05-26 20:07:58 +00:00
Giampaolo Rodolà a67299e757 Fix issue #8806: add SSL contexts support to ftplib 2010-05-26 18:06:04 +00:00
Brian Curtin 60853211da Fix #2810 - handle the case where some registry calls return
ERROR_MORE_DATA, requiring another call to get the remaining data.

Patch by Daniel Stutzbach
2010-05-26 17:43:50 +00:00
Victor Stinner 5f22e72e6d Merged revisions 81543 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81543 | victor.stinner | 2010-05-26 19:25:28 +0200 (mer., 26 mai 2010) | 2 lines

  Issue #7449: Skip test_socketserver if threading support is disabled
........
2010-05-26 17:33:03 +00:00
Victor Stinner 479736b31c Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer and
sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes API
2010-05-25 21:12:34 +00:00
Martin v. Löwis 0b2f5180d7 Merged revisions 81531 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81531 | martin.v.loewis | 2010-05-25 22:06:02 +0200 (Di, 25 Mai 2010) | 2 lines

  Add Alexander Belopolsky.
........
2010-05-25 20:07:11 +00:00
Tarek Ziadé a751499363 Made sysconfig a script that displays useful information - #8770 2010-05-25 09:44:36 +00:00
Victor Stinner e021f4b206 Recorded merge of revisions 81500-81501 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81500 | victor.stinner | 2010-05-24 23:33:24 +0200 (lun., 24 mai 2010) | 2 lines

  Issue #6662: Fix parsing of malformatted charref (&#bad;)
........
  r81501 | victor.stinner | 2010-05-24 23:37:28 +0200 (lun., 24 mai 2010) | 2 lines

  Add the author of the last fix (Issue #6662)
........
2010-05-24 21:46:25 +00:00
Mark Dickinson dc787d2055 Issue #8188: Introduce a new scheme for computing hashes of numbers
(instances of int, float, complex, decimal.Decimal and
fractions.Fraction) that makes it easy to maintain the invariant that
hash(x) == hash(y) whenever x and y have equal value.
2010-05-23 13:33:13 +00:00
Mark Dickinson 03721133a6 Remove duplicate NEWS entry. 2010-05-23 13:26:48 +00:00
Mark Dickinson b1d8e3229c #Issue 8540: Make Context._clamp attribute public in decimal module. 2010-05-22 18:35:36 +00:00
Victor Stinner a92ad7ee2c Merged revisions 81471-81472 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81471 | victor.stinner | 2010-05-22 15:37:56 +0200 (sam., 22 mai 2010) | 7 lines

  Issue #6268: More bugfixes about BOM, UTF-16 and UTF-32

   * Fix seek() method of codecs.open(), don't write the BOM twice after seek(0)
   * Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes
   * test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by
     Solaris or Windows, but does it really exist? I found it the in the issue.
........
  r81472 | victor.stinner | 2010-05-22 15:44:25 +0200 (sam., 22 mai 2010) | 4 lines

  Fix my last commit (r81471) about codecs

  Rememder: don't touch the code just before a commit
........
2010-05-22 16:59:09 +00:00
Victor Stinner 3fed0870a6 Merged revisions 81459 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81459 | victor.stinner | 2010-05-22 04:11:07 +0200 (sam., 22 mai 2010) | 3 lines

  Issue #6268: Fix seek() method of codecs.open(), don't read the BOM twice
  after seek(0)
........
2010-05-22 02:16:27 +00:00
Victor Stinner 7126dbc867 Issue #3798: sys.exit(message) writes the message to sys.stderr file, instead
of the C file stderr, to use stderr encoding and error handler
2010-05-21 23:45:42 +00:00
Georg Brandl 25106ce6e9 Merged revisions 81443 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81443 | georg.brandl | 2010-05-21 23:48:57 +0200 (Fr, 21 Mai 2010) | 1 line

  typo
........
2010-05-21 21:49:47 +00:00
Benjamin Peterson aada7b8f78 Merged revisions 81428-81429,81432-81433,81437 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81428 | benjamin.peterson | 2010-05-21 16:16:12 -0500 (Fri, 21 May 2010) | 1 line

  use addCleanup
........
  r81429 | benjamin.peterson | 2010-05-21 16:17:22 -0500 (Fri, 21 May 2010) | 1 line

  fix name
........
  r81432 | benjamin.peterson | 2010-05-21 16:31:24 -0500 (Fri, 21 May 2010) | 1 line

  ensure the last line has a trailing newline #8782
........
  r81433 | benjamin.peterson | 2010-05-21 16:32:49 -0500 (Fri, 21 May 2010) | 1 line

  remove debugging rubish
........
  r81437 | benjamin.peterson | 2010-05-21 16:35:44 -0500 (Fri, 21 May 2010) | 1 line

  simplify and modernize updatecache()
........
2010-05-21 21:45:06 +00:00
Benjamin Peterson 4ad6bd5482 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
........
2010-05-21 20:55:22 +00:00
Antoine Pitrou f978facc0e 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>`_.
........
2010-05-21 17:25:34 +00:00
Mark Dickinson cc6a982de8 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.
2010-05-21 14:55:26 +00:00
Victor Stinner f0feec2cb6 Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the correct
encoding
2010-05-21 10:52:08 +00:00
Antoine Pitrou b52187710e 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`.
2010-05-21 09:56:06 +00:00
Tarek Ziadé 06710a8421 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
........
2010-05-19 22:25:00 +00:00
Georg Brandl 8569e582f8 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.
........
2010-05-19 20:57:08 +00:00
Victor Stinner 7d79b8b771 Issue #8766: Initialize _warnings module before importing the first module.
Fix a crash if an empty directory called "encodings" exists in sys.path.
2010-05-19 20:40:50 +00:00
Victor Stinner 2ca03c1f7f 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).
2010-05-19 17:00:07 +00:00
Victor Stinner 9ca9c25bcd 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.
2010-05-19 16:53:30 +00:00
Victor Stinner b745a74c99 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).
2010-05-18 17:17:23 +00:00
Lars Gustäbel 1465cc2887 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.
2010-05-17 18:02:50 +00:00
Florent Xicluna c7b8e8682e 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.
........
2010-05-17 17:33:07 +00:00
Tarek Ziadé c16a85c46d 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.
........
2010-05-17 10:38:53 +00:00
Victor Stinner 372ac5e732 PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
of strict) error handler to escape surrogates
2010-05-17 01:26:01 +00:00
Victor Stinner f9faaad801 Issue #8477: ssl.RAND_egd() supports str with surrogates and bytes for the path 2010-05-16 21:36:37 +00:00
Victor Stinner 3800e1e961 Issue #8477: _ssl._test_decode_cert() supports str with surrogates and bytes
for the filename
2010-05-16 21:23:48 +00:00
Antoine Pitrou 152efa2ae2 Issue #8550: Add first class `SSLContext` objects to the ssl module. 2010-05-16 18:19:27 +00:00
Victor Stinner e125f1355a 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
........
2010-05-15 21:04:43 +00:00
Benjamin Peterson 0c3d21de05 fix one more runon 2010-05-15 17:43:57 +00:00
Mark Dickinson 4c8a9a2df3 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.
2010-05-15 17:02:38 +00:00
Victor Stinner ae6265f8d0 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.
2010-05-15 16:27:27 +00:00
Victor Stinner 59e62db0a3 Enable shortcuts for common encodings in PyUnicode_AsEncodedString() for any
error handler, not only the default error handler (strict)
2010-05-15 13:14:32 +00:00
Victor Stinner b744ba1d14 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.
2010-05-15 12:27:16 +00:00
Antoine Pitrou 53b2166f0b Merged revisions 81098 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81098 | antoine.pitrou | 2010-05-12 01:42:28 +0200 (mer., 12 mai 2010) | 5 lines

  Issue #8681: Make the zlib module's error messages more informative when
  the zlib itself doesn't give any detailed explanation.
........
2010-05-11 23:46:02 +00:00
Antoine Pitrou c09c92fd81 Merged revisions 81094 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81094 | antoine.pitrou | 2010-05-12 01:32:31 +0200 (mer., 12 mai 2010) | 6 lines

  Issue #8672: Add a zlib test ensuring that an incomplete stream can be
  handled by a decompressor object without errors (it returns incomplete
  uncompressed data).
........
2010-05-11 23:36:40 +00:00
Giampaolo Rodolà a467d38b91 adding myself to 'testing' interest area of maintainers.rst file 2010-05-11 14:00:04 +00:00
Mark Dickinson 81fece2d63 Issue #8657: Make the audioop module PY_SSIZE_T_CLEAN. 2010-05-11 13:34:35 +00:00
Mark Dickinson 85eacea31e Merged revisions 81045 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81045 | mark.dickinson | 2010-05-10 17:07:42 +0100 (Mon, 10 May 2010) | 3 lines

  Issue #8674: Fix incorrect and UB-inducing overflow checks in audioop
  module.  Thanks Tomas Hoger for the patch.
........
2010-05-10 16:27:45 +00:00
Giampaolo Rodolà bd576b75b7 Fix issue #4972: adds ftplib.FTP context manager protocol 2010-05-10 14:53:29 +00:00
Antoine Pitrou f95a1b3c53 Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

  Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Jean-Paul Calderone 6f137ca469 Merged revisions 81007 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line

  Skip signal handler re-installation if it is not necessary.  Issue 8354.
........
2010-05-09 03:18:57 +00:00
Benjamin Peterson e87c0fcd16 add news for r81005 2010-05-08 19:52:49 +00:00
Mark Dickinson 0381e3f16a Issue #8644: Improve accuracy of timedelta.total_seconds, by doing intermediate
computations with integer arithmetic instead of floating point.
td.total_seconds() now agrees with td / timedelta(seconds = 1).

Thanks Alexander Belopolsky for the patch.
2010-05-08 14:35:02 +00:00
Victor Stinner 449c466e7d Issue #8514: Add os.fsencode() function (Unix only): encode a string to bytes
for use in the file system, environment variables or the command line.
2010-05-08 11:10:09 +00:00
Ronald Oussoren 4cda46ab91 Merged revisions 80967 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80967 | ronald.oussoren | 2010-05-08 12:29:06 +0200 (Sat, 08 May 2010) | 4 lines

  Issue #8084: ensure that the --user directory
  conforms to platforms standars on OSX when
  using a python framework.
........
2010-05-08 10:49:43 +00:00
Antoine Pitrou 8956271f11 Merged revisions 80926 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80926 | antoine.pitrou | 2010-05-07 18:50:34 +0200 (ven., 07 mai 2010) | 5 lines

  Issue #8571: Fix an internal error when compressing or decompressing a
  chunk larger than 1GB with the zlib module's compressor and decompressor
  objects.
........
2010-05-07 17:04:02 +00:00
Benjamin Peterson 225168ed56 rephrase 2010-05-06 22:29:53 +00:00
Victor Stinner 84ae118006 Issue #8603: Create a bytes version of os.environ for Unix
Create os.environb mapping and os.getenvb() function, os.unsetenv() encodes str
argument to the file system encoding with the surrogateescape error handler
(instead of utf8/strict) and accepts bytes, and posix.environ keys and values
are bytes.
2010-05-06 22:05:07 +00:00
Giampaolo Rodolà 8d2dc85154 Merged revisions 80875 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80875 | giampaolo.rodola | 2010-05-06 19:57:06 +0200 (gio, 06 mag 2010) | 1 line

  Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__
........
2010-05-06 18:06:30 +00:00
Mark Dickinson b2153e9d08 Merged revisions 80832 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80832 | mark.dickinson | 2010-05-05 23:23:58 +0100 (Wed, 05 May 2010) | 2 lines

  Issue #8625:  Turn off gcc optimization in debug builds.
........
2010-05-05 22:31:36 +00:00
Tarek Ziadé ae4d5c6b64 Merged revisions 80830 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80830 | tarek.ziade | 2010-05-06 00:15:31 +0200 (Thu, 06 May 2010) | 1 line

  Fixed #4265: shutil.copyfile() was leaking file descriptors when disk fills
........
2010-05-05 22:27:31 +00:00
Victor Stinner de629d46f2 Issue #8390: tarfile uses surrogateespace as the default error handler
(instead of replace in read mode or strict in write mode)
2010-05-05 21:43:57 +00:00
Barry Warsaw 83d8998390 Bug 7755: audiotest.au is arguably copyrighted material, but definitely makes
Debian unhappy.  The actual contents of the audio clip are unimportant, so
replace it with something that we know is okay.  Guido likes woodpeckers.
2010-05-05 16:18:31 +00:00
Ronald Oussoren ac764d3d5f Merged revisions 80784 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80784 | ronald.oussoren | 2010-05-05 16:48:37 +0200 (Wed, 05 May 2010) | 9 lines

  The C function used by uuid.uuid4 is broken on
  OSX 10.6 in that after os.fork() the parent and
  child generate the same sequence of UUIDs.

  This patch falls back to the the Python implementation
  on OSX 10.6 or later.

  Fixes issue #8621.
........
2010-05-05 15:32:33 +00:00
Marc-André Lemburg 177ab08f96 Merged revisions 80782 via svnmerge from
svn+pythonssh://pythondev@svn.python.org/python/trunk

........
  r80782 | marc-andre.lemburg | 2010-05-05 15:30:01 +0200 (Wed, 05 May 2010) | 3 lines

  Update the NEWS entry for issue #8211.
........
2010-05-05 13:32:59 +00:00
Mark Dickinson c69160e808 Merged revisions 80753 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80753 | mark.dickinson | 2010-05-04 15:25:50 +0100 (Tue, 04 May 2010) | 10 lines

  Issue #8567: Fix incorrect precedence of signals in Decimal module.

  When a Decimal operation raises multiple signals and more than one of
  those signals is trapped, the specification determines the order in
  which the signals should be handled.  In many cases this order wasn't
  being followed, leading to the wrong Python exception being raised.
  This commit fixes those cases, and adds extra tests.  The tests are
  only enabled when EXTENDEDERRORTESTS is True, since they involve
  rerunning each Decimal testcase several times.
........
2010-05-04 14:35:33 +00:00
Jesus Cea 6a792298e7 Deprecate OSF* support 2010-05-03 21:18:48 +00:00
Antoine Pitrou 6be8876623 Merged revisions 80720 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines

  Issue #7865: The close() method of :mod:`io` objects should not swallow
  exceptions raised by the implicit flush().  Also ensure that calling
  close() several times is supported.  Patch by Pascal Chambon.
........
2010-05-03 16:48:20 +00:00
Antoine Pitrou 6e20a1bdf0 Merged revisions 80704 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80704 | antoine.pitrou | 2010-05-02 21:51:14 +0200 (dim., 02 mai 2010) | 4 lines

  Issue #4687: Fix accuracy of garbage collection runtimes displayed with
  gc.DEBUG_STATS.
........
2010-05-02 19:59:47 +00:00
Victor Stinner f58087ba29 Issue #8533: revert r80694; try a different fix: regrtest uses backslashreplace
error handler for stdout to avoid UnicodeEncodeError (write non-ASCII character
to stdout using ASCII encoding)
2010-05-02 17:24:51 +00:00
Ronald Oussoren 4d39f6e09a Merged revisions 80698 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80698 | ronald.oussoren | 2010-05-02 11:48:21 +0200 (Sun, 02 May 2010) | 3 lines

  For for issue #7192: with this patch webbrowser.get("firefox")
  works on OSX
........
2010-05-02 09:54:35 +00:00
Victor Stinner 0d80a5874a Issue #8533: Write tracebacks and failed tests to sys.stderr instead of
sys.stdout to avoid UnicodeEncodeError (use backslashreplace error handler)
2010-05-02 09:37:08 +00:00