Commit Graph

14625 Commits

Author SHA1 Message Date
Victor Stinner 0dee1b859b Fix the new TestMain.test_decode() of test_base64 for Windows 2010-05-25 22:17:22 +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
Mark Dickinson f43c3d3363 Merged revisions 81527 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81527 | mark.dickinson | 2010-05-25 20:44:49 +0100 (Tue, 25 May 2010) | 1 line

  Fix a NameError in test_enumerate.
........
2010-05-25 19:46:20 +00:00
Mark Dickinson fb3dc94b8c Merged revisions 81525 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81525 | mark.dickinson | 2010-05-25 20:01:08 +0100 (Tue, 25 May 2010) | 3 lines

  Issue #8816: Extra tests for some built-in functions.  These tests are
  ports of IronPython tests.  Thanks Gregory Nofi.
........
2010-05-25 19:06:24 +00:00
Tarek Ziadé 16ed6cb91d added the list of public APIs in sysconfig 2010-05-25 09:47:06 +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
Steven Bethard 50fe593ae9 Merged revisions 81492 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81492 | steven.bethard | 2010-05-23 20:45:26 -0700 (Sun, 23 May 2010) | 1 line

  Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html
........
2010-05-24 03:47:38 +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
Benjamin Peterson 2243e5e57d Merged revisions 81479 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

................
  r81479 | benjamin.peterson | 2010-05-22 13:52:21 -0500 (Sat, 22 May 2010) | 13 lines

  Merged revisions 80937,81478 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r80937 | benjamin.peterson | 2010-05-07 14:10:58 -0500 (Fri, 07 May 2010) | 1 line

    remove redundant unicode call
  ........
    r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line

    ensure doctests have some future_features
  ........
................
2010-05-22 18:59:24 +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
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
Victor Stinner b369358ee4 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.
2010-05-21 20:13:12 +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
Victor Stinner 150016fd24 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)
2010-05-19 23:04:56 +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 e5a2673f9a 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.
........
2010-05-19 21:06:36 +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 5b08b4d230 Oops, add the new test_log.py for distutils test suite (missing part of r81359) 2010-05-19 17:15:50 +00:00
Victor Stinner 1802d3f388 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.
2010-05-19 17:11:19 +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
Stefan Krah 2eb4a07f9b 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.
........
2010-05-19 15:52:31 +00:00
Victor Stinner 93b5513cf1 Issue #6697: Fix a crash if a keyword contains a surrogate 2010-05-19 00:54:06 +00:00
Giampaolo Rodolà 82e02b5876 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.
........
2010-05-18 20:11:58 +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
Barry Warsaw 04b5684d00 Repair test failure. Bug 8727. 2010-05-18 14:15:20 +00:00
Victor Stinner c0983856c6 Fix test_main_invalid_unicode() of test_sys for ASCII locale encoding
It should fix sparc 3.x and 3.1 failures.
2010-05-17 19:57:40 +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 0f78a94f44 Inadvertently removed part of the comment in r81271. 2010-05-17 18:01:22 +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
Florent Xicluna 757445bee0 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.
........
2010-05-17 17:24:07 +00:00
Victor Stinner 7cf7d72263 Improve test_exit() error message to analyze sparc failures 2010-05-17 14:36:43 +00:00
Antoine Pitrou d7e4c1caa6 Typo (thanks Arfrever) 2010-05-17 14:13:10 +00:00
Tarek Ziadé c55f2d12cb 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
........
2010-05-17 11:01:57 +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
Antoine Pitrou d0919507f9 Try to fix buildbot failures with old OpenSSLs. 2010-05-17 10:30:00 +00:00
Victor Stinner e9fb319e68 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).
2010-05-17 08:58:51 +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 6baded49d0 Issue #6697: Fix a crash if code of "python -c code" contains surrogates 2010-05-17 01:13:37 +00:00
Victor Stinner f155f1f4ce Oops, my patch on subprocess is not merged yet: fix my previous commit on test_os 2010-05-17 00:18:34 +00:00
Victor Stinner c2d095f494 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
2010-05-17 00:14:53 +00:00
Antoine Pitrou 304740635b "xyzzy" is not a silly enough name for some OpenSSL versions to report an error 2010-05-16 23:46:26 +00:00
Antoine Pitrou 27ba6388ed Do not fail if ssl fails to import 2010-05-16 20:35:03 +00:00