Commit Graph

4334 Commits

Author SHA1 Message Date
Benjamin Peterson de368717da Merged revisions 87952-87954 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87952 | benjamin.peterson | 2011-01-12 09:24:27 -0600 (Wed, 12 Jan 2011) | 1 line

  move this test to test_descr; it's not abc specific
........
  r87953 | benjamin.peterson | 2011-01-12 09:25:02 -0600 (Wed, 12 Jan 2011) | 1 line

  oops, wrong class
........
  r87954 | benjamin.peterson | 2011-01-12 09:34:01 -0600 (Wed, 12 Jan 2011) | 1 line

  don't segfault on deleting __abstractmethods__ #10892
........
2011-01-12 15:42:34 +00:00
Benjamin Peterson 477ba919c1 don't segfault on deleting __abstractmethods__ #10892 2011-01-12 15:34:01 +00:00
Alexander Belopolsky ef4a03fffe Issue #5109: array.array constructor will now use fast code when
initial data is provided in an array object with correct type.
2011-01-11 21:44:00 +00:00
Ned Deily 9a1383e380 #10820: Fix OS X framework installs to support version-specific
scripts (implemented in #10679).
2011-01-10 22:14:25 +00:00
Terry Reedy 8663e346dc Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'. 2011-01-10 21:49:11 +00:00
Terry Reedy aacfd4a0cf Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'. 2011-01-10 21:27:49 +00:00
Antoine Pitrou a4815caa7c Issue #10872: The repr() of TextIOWrapper objects now includes the mode
if available.

(at Georg's request)
2011-01-09 20:38:15 +00:00
Georg Brandl 7fdc746a81 Merged revisions 87876-87877 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r87876 | georg.brandl | 2011-01-09 08:38:51 +0100 (So, 09 Jan 2011) | 1 line

  #10869: do not visit root node twice in ast.increment_lineno().
........
  r87877 | georg.brandl | 2011-01-09 08:50:48 +0100 (So, 09 Jan 2011) | 1 line

  Add missing line.
........
2011-01-09 07:55:46 +00:00
Georg Brandl 619e7ba814 #10869: do not visit root node twice in ast.increment_lineno(). 2011-01-09 07:38:51 +00:00
R. David Murray 389af00371 Merged revisions 87873 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87873 | r.david.murray | 2011-01-08 21:35:24 -0500 (Sat, 08 Jan 2011) | 12 lines

  #5871: protect against header injection attacks.

  This makes Header.encode throw a HeaderParseError if it winds up
  formatting a header such that a continuation line has no leading
  whitespace and looks like a header.  Since Header accepts values
  containing newlines and preserves them (and this is by design), without
  this fix any program that took user input (say, a subject in a web form)
  and passed it to the email package as a header was vulnerable to header
  injection attacks.  (As far as we know this has never been exploited.)

  Thanks to Jakub Wilk for reporting this vulnerability.
........
2011-01-09 02:48:04 +00:00
R. David Murray 5b2d9ddf69 #5871: protect against header injection attacks.
This makes Header.encode throw a HeaderParseError if it winds up
formatting a header such that a continuation line has no leading
whitespace and looks like a header.  Since Header accepts values
containing newlines and preserves them (and this is by design), without
this fix any program that took user input (say, a subject in a web form)
and passed it to the email package as a header was vulnerable to header
injection attacks.  (As far as we know this has never been exploited.)

Thanks to Jakub Wilk for reporting this vulnerability.
2011-01-09 02:35:24 +00:00
Victor Stinner 3ec899fc0d NEWS: merge #1777412 and #10827 entries 2011-01-08 16:37:47 +00:00
Victor Stinner f7d019ec9a Issue #1777412: document the change in the NEWS file 2011-01-08 16:31:24 +00:00
Antoine Pitrou 67b212e608 Issue #10859: Make `contextlib.GeneratorContextManager` officially
private by renaming it to `_GeneratorContextManager`.
2011-01-08 09:55:31 +00:00
Raymond Hettinger 23f9fc3448 Issue #10042: Fixed the total_ordering decorator to handle cross-type
comparisons that could lead to infinite recursion.
2011-01-08 07:01:56 +00:00
R. David Murray 9253214fd9 #10686: recode non-ASCII headers to 'unknown-8bit' instead of ?s.
This applies only when generating strings from non-RFC compliant binary
input; it makes the existing recoding behavior more consistent (ie:
now no data is lost when recoding).
2011-01-07 23:25:30 +00:00
R. David Murray 6f0022d84a Fix formatting of values with embedded newlines when rfc2047 encoding
Before this patch if a value being encoded had an embedded newline,
the line following the newline would have no leading whitespace,
and the whitespace it did have was encoded into the word.  Now
the existing whitespace gets turned into a blank, the way it does
in other header reformatting, and the _continuation_ws gets added
at the beginning of the encoded line.
2011-01-07 21:57:25 +00:00
Antoine Pitrou 5b6fc63998 Merged revisions 87834 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87834 | antoine.pitrou | 2011-01-07 22:43:59 +0100 (ven., 07 janv. 2011) | 5 lines

  Issue #8020: Avoid a crash where the small objects allocator would read
  non-Python managed memory while it is being modified by another thread.
  Patch by Matt Bandy.
........
2011-01-07 21:49:25 +00:00
Antoine Pitrou 3be412d971 Put NEWS entry in the right section. 2011-01-07 21:47:02 +00:00
Antoine Pitrou b7fb2e25fb Issue #8020: Avoid a crash where the small objects allocator would read
non-Python managed memory while it is being modified by another thread.
Patch by Matt Bandy.
2011-01-07 21:43:59 +00:00
Alexander Belopolsky c64708ae48 Issue #10827: Changed the rules for 2-digit years. The time.asctime
function will now format any year when time.accept2dyear is false and
will accept years >= 1000 otherwise.  The year range accepted by
time.mktime and time.strftime is still system dependent, but
time.mktime will now accept full range supported by the OS. Conversion
of 2-digit years to 4-digit is deprecated.
2011-01-07 19:59:19 +00:00
Victor Stinner 89e3436606 Issue #10841: set binary mode on files; the parser translates newlines
On Windows, set the binary mode on stdin, stdout, stderr and all
io.FileIO objects (to not translate newlines, \r\n <=> \n). The Python parser
translates newlines (\r\n => \n).
2011-01-07 18:47:22 +00:00
Brett Cannon 63eef1e0dd Get --coverage to be an acceptable flag for test.regrtest again. 2011-01-06 22:32:41 +00:00
Martin v. Löwis c83bc3c1fb Remove buffer API from stable ABI for now, see #10181. 2011-01-06 19:15:47 +00:00
Antoine Pitrou ff17385fbd Merged revisions 87802 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87802 | antoine.pitrou | 2011-01-06 19:25:55 +0100 (jeu., 06 janv. 2011) | 6 lines

  Issue #7858: Raise an error properly when os.utime() fails under Windows
  on an existing file.

  (this does not seem to be easily testable)
........
2011-01-06 18:29:05 +00:00
Antoine Pitrou e85da7aa4f Issue #7858: Raise an error properly when os.utime() fails under Windows
on an existing file.

(this does not seem to be easily testable)
2011-01-06 18:25:55 +00:00
David Malcolm 8ad4cd90e9 Merged revisions 87796 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87796 | david.malcolm | 2011-01-06 12:01:36 -0500 (Thu, 06 Jan 2011) | 6 lines

  Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
  timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
  support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
  only be present on OS X; the former is the correct one for Linux with GCC.
........
2011-01-06 17:36:32 +00:00
Antoine Pitrou 59bf738874 Merged revisions 87797 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87797 | antoine.pitrou | 2011-01-06 18:17:04 +0100 (jeu., 06 janv. 2011) | 4 lines

  Issue #3839: wsgiref should not override a Content-Length header set by
  the application.  Initial patch by Clovis Fabricio.
........
2011-01-06 17:18:32 +00:00
Antoine Pitrou b715fac819 Issue #3839: wsgiref should not override a Content-Length header set by
the application.  Initial patch by Clovis Fabricio.
2011-01-06 17:17:04 +00:00
David Malcolm f1397ad399 Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
only be present on OS X; the former is the correct one for Linux with GCC.
2011-01-06 17:01:36 +00:00
Antoine Pitrou ca023cab4d Issue #1677694: Refactor and improve test_timeout. Original patch by
Björn Lindqvist.
2011-01-06 09:05:22 +00:00
Victor Stinner 4bd81725f2 Issue #10492: bdb.Bdb.run() only traces the execution of the code
And not the compilation (if the input is a string).
2011-01-06 00:49:38 +00:00
Antoine Pitrou dc51a3ca84 Fix mistake in NEWS 2011-01-05 22:43:26 +00:00
Antoine Pitrou 600232b562 Issue #7995: When calling accept() on a socket with a timeout, the returned
socket is now always non-blocking, regardless of the operating system.
2011-01-05 21:03:42 +00:00
Antoine Pitrou 452196fef1 Issue #5485: Add tests for the UseForeignDTD method of expat parser objects.
Patch by Jean-Paul Calderone and Sandro Tosi.
2011-01-05 18:44:14 +00:00
Victor Stinner 8786d3d0dc Issue #10756: add the author, Andreas Stührk 2011-01-05 03:56:22 +00:00
Victor Stinner 358e11d928 Issue #10756: atexit normalizes the exception before displaying it. 2011-01-05 03:54:25 +00:00
R. David Murray f9844c8292 Merged revisions 87750 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87750 | r.david.murray | 2011-01-04 20:39:32 -0500 (Tue, 04 Jan 2011) | 5 lines

  #10790: make append work when output codec is different from input codec

  There's still a bug here (the encode call shouldn't use the 'errors'
  paramter), but I'll fix that later.
........
2011-01-05 01:47:38 +00:00
R. David Murray 477efb3944 #10790: make append work when output codec is different from input codec
There's still a bug here (the encode call shouldn't use the 'errors'
paramter), but I'll fix that later.
2011-01-05 01:39:32 +00:00
Alexander Belopolsky b9588b528a Issue #8013: time.asctime and time.ctime no longer call system asctime
and ctime functions.  The year range for time.asctime is now 1900
through maxint.  The range for time.ctime is the same as for
time.localtime.  The string produced by these functions is longer than
24 characters when year is greater than 9999.
2011-01-04 16:34:30 +00:00
Victor Stinner dc5554008f Issue #9015, #9611: stdprinter.write() clamps the length to 2^31-1 on Windows 2011-01-04 13:15:39 +00:00
Victor Stinner c3a51ecb85 Issue #10819: SocketIO.name property returns -1 when its closed, instead of
raising a ValueError, to fix repr().
2011-01-04 11:00:45 +00:00
Victor Stinner 8848c7a37f Issue #8650: zlib.compress() and zlib.decompress() raise an OverflowError if
the input buffer length doesn't fit into an unsigned int (length bigger than
2^32-1 bytes).
2011-01-04 02:07:36 +00:00
Victor Stinner b3c9e073fc Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file
doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int
(length bigger than 2^31-1).
2011-01-04 02:07:34 +00:00
Gregory P. Smith 4b129d23f6 Merged revisions 87710 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87710 | gregory.p.smith | 2011-01-03 13:06:12 -0800 (Mon, 03 Jan 2011) | 4 lines

  issue6643 - Two locks held within the threading module on each thread instance
  needed to be reinitialized after fork().  Adds tests to confirm that they are
  and that a potential deadlock and crasher bug are fixed (platform dependant).
........
2011-01-04 00:51:50 +00:00
Victor Stinner e6edec2371 Issue #9015, #9611: FileIO.readinto(), FileIO.write() and os.write() clamp the
length to 2^31-1 on Windows.
2011-01-04 00:29:35 +00:00
Antoine Pitrou 23683ef26d Issue #10333: Remove ancient GC API, which has been deprecated since
Python 2.2.
2011-01-04 00:00:31 +00:00
Gregory P. Smith 4d41968904 news for 6643 2011-01-03 21:09:23 +00:00
Antoine Pitrou 41d5866e56 Merged revisions 87704-87705 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87704 | antoine.pitrou | 2011-01-03 21:38:52 +0100 (lun., 03 janv. 2011) | 5 lines

  Issue #6293: Have regrtest.py echo back sys.flags.  This is done by default
  in whole runs and enabled selectively using `--header` when running an
  explicit list of tests.  Original patch by Collin Winter.
........
  r87705 | antoine.pitrou | 2011-01-03 21:40:07 +0100 (lun., 03 janv. 2011) | 3 lines

  Mention --randseed in option list
........
2011-01-03 20:47:02 +00:00
Antoine Pitrou 3c4402f879 Issue #6293: Have regrtest.py echo back sys.flags. This is done by default
in whole runs and enabled selectively using `--header` when running an
explicit list of tests.  Original patch by Collin Winter.
2011-01-03 20:38:52 +00:00
Antoine Pitrou 57ab4411c3 Merged revisions 84068,87558 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84068 | martin.v.loewis | 2010-08-15 17:47:25 +0200 (dim., 15 août 2010) | 2 lines

  Don't run pgen twice when using make -j.
........
  r87558 | victor.stinner | 2010-12-29 00:14:17 +0100 (mer., 29 déc. 2010) | 1 line

  Don't ignore pgen error (on "make Parser/pgen.stamp")
........
2011-01-03 19:11:48 +00:00
Antoine Pitrou a75c10526f Merged revisions 87698 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87698 | antoine.pitrou | 2011-01-03 19:53:50 +0100 (lun., 03 janv. 2011) | 4 lines

  Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in
  the configure script but use $GREP instead.  Patch by Fabian Groffen.
........
2011-01-03 18:56:50 +00:00
Antoine Pitrou f3fcd9f163 Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in
the configure script but use $GREP instead.  Patch by Fabian Groffen.
2011-01-03 18:53:50 +00:00
Antoine Pitrou f50a6b6b6d Merged revisions 87695 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87695 | antoine.pitrou | 2011-01-03 19:23:55 +0100 (lun., 03 janv. 2011) | 5 lines

  Issue #10806, issue #9905: Fix subprocess pipes when some of the standard
  file descriptors (0, 1, 2) are closed in the parent process.  Initial
  patch by Ross Lagerwall.
........
2011-01-03 18:36:36 +00:00
Antoine Pitrou c9c83ba896 Issue #10806, issue #9905: Fix subprocess pipes when some of the standard
file descriptors (0, 1, 2) are closed in the parent process.  Initial
patch by Ross Lagerwall.
2011-01-03 18:23:55 +00:00
Michael Foord 32e1d8340c Enable unittest.TestCase to be instantiated without providing a method name.
Changed unittestgui to show number of discovered tests in the status bar.
2011-01-03 17:00:11 +00:00
Michael Foord 90efac7f37 Issue 10502: addition of unittestgui to Tools/ 2011-01-03 15:39:49 +00:00
Amaury Forgeot d'Arc 32e8aab1fb Merged revisions 87666 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87666 | amaury.forgeotdarc | 2011-01-03 01:19:11 +0100 (lun., 03 janv. 2011) | 4 lines

  #8278: In the Windows implementation of stat() and utime(),
  use time_t instead of int.  This gives support for dates after 2038,
  at least when compiled with VS2003 or later, where time_t is 64bit.
........
2011-01-03 00:40:04 +00:00
Amaury Forgeot d'Arc a251a853c7 #8278: In the Windows implementation of stat() and utime(),
use time_t instead of int.  This gives support for dates after 2038,
at least when compiled with VS2003 or later, where time_t is 64bit.
2011-01-03 00:19:11 +00:00
Martin v. Löwis 9f6d48ba4e Issue #10798: Reject supporting concurrent.futures if the system has
too few POSIX semaphores.
2011-01-03 00:07:01 +00:00
Victor Stinner b6f424043d Issue #10807: Remove base64, bz2, hex, quopri, rot13, uu and zlib codecs from
the codec aliases. They are still accessible via codecs.lookup().
2011-01-02 19:50:36 +00:00
Antoine Pitrou f1cc81a97d Merged revisions 87639 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87639 | antoine.pitrou | 2011-01-02 20:34:03 +0100 (dim., 02 janv. 2011) | 4 lines

  Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD
  and DragonFly BSD.  Patch by Nicolas Joly.
........
2011-01-02 19:38:30 +00:00
Antoine Pitrou c224458ef6 Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD
and DragonFly BSD.  Patch by Nicolas Joly.
2011-01-02 19:34:03 +00:00
Georg Brandl 5ba11de845 #10801: In zipfile, support different encodings for the header and the filenames. Patch by MvL, test by Eli Bendersky. 2011-01-01 10:09:32 +00:00
Georg Brandl d30a0dd681 Fix issue references. 2011-01-01 10:07:30 +00:00
Terry Reedy 554e6fa86d Issue 6285: add NEWS entry for 3.2. 2011-01-01 02:54:11 +00:00
Raymond Hettinger 8dff4bada7 Typo. 2010-12-31 23:23:06 +00:00
Raymond Hettinger a673b1fd0e Fix OrderedDict.setdefault() to work for subclasses that define __missing__(). 2010-12-31 23:16:17 +00:00
Georg Brandl 59b44721e3 Remove mentions of the Demo directory. 2010-12-30 22:12:40 +00:00
Michael Foord 6f17e2df29 Issue 10786: unittest.TextTestRunner default stream no longer bound at import time 2010-12-30 19:36:29 +00:00
Terry Reedy 74901007a5 Minor clarification 2010-12-29 19:02:07 +00:00
Senthil Kumaran e5f8e849c8 Merged revisions 87564 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87564 | senthil.kumaran | 2010-12-29 14:25:42 +0800 (Wed, 29 Dec 2010) | 3 lines

  Fix Issue 10753 - Don't quote ;=, in the PATH_INFO envvar.
........
2010-12-29 06:29:58 +00:00
Senthil Kumaran 299fa4cb21 Fix Issue 10753 - Don't quote ;=, in the PATH_INFO envvar. 2010-12-29 06:25:42 +00:00
Victor Stinner de3aa7fc62 Issue #10783: rephrase the changelog (new try) 2010-12-29 02:44:42 +00:00
Victor Stinner ece98d6e08 Issue #10783: rephrase the changelog (NEWS, What's new) 2010-12-28 23:35:10 +00:00
Terry Reedy bb53bb40e6 Issue 10738: Fix webbrowser.Opera.raise_opts value. 2010-12-28 19:50:27 +00:00
Terry Reedy dad532f7de Issue 10738: Fix webbrowser.Opera.raise_opts value. 2010-12-28 19:30:19 +00:00
R. David Murray daa7ba038b Merged revisions 87550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87550 | r.david.murray | 2010-12-28 13:54:13 -0500 (Tue, 28 Dec 2010) | 8 lines

  #9824: encode , and ; in cookie values so that browsers don't split on them

  There is a small chance of backward incompatibility here, but only for
  non-SimpleCookie applications reading SimpleCookie generated cookies.  Even
  then, any such ap is likely to be handling escaped values already, and it would
  take a fairly perverse implementation of unescaping to fail to unescape these
  newly escaped chars, so the risk seems minimal.
........
2010-12-28 18:56:33 +00:00
R. David Murray e05ca2aff4 #9824: encode , and ; in cookie values so that browsers don't split on them
There is a small chance of backward incompatibility here, but only for
non-SimpleCookie applications reading SimpleCookie generated cookies.  Even
then, any such ap is likely to be handling escaped values already, and it would
take a fairly perverse implementation of unescaping to fail to unescape these
newly escaped chars, so the risk seems minimal.
2010-12-28 18:54:13 +00:00
Georg Brandl 8aa7e999b5 Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833. 2010-12-28 18:30:18 +00:00
Brian Curtin 3b4499c5c7 Fix #9333. The symlink function is always available now, raising OSError
when the user doesn't hold the symbolic link privilege rather than hiding it.
2010-12-28 14:31:47 +00:00
Victor Stinner da9ec995f6 Issue #10783: struct.pack() doesn't encode implicitly unicode to UTF-8
* Replace "bytes" by "bytes object" in struct error messages
 * Document the API change in What's new in Python 3.2
 * Fix test_wave
 * Remove also ugly implicit conversions in test_struct
2010-12-28 13:26:42 +00:00
Georg Brandl 68eb464bc7 Add news entry and clarify another. 2010-12-28 11:02:12 +00:00
Georg Brandl 780d5e08c4 #10768: fix ScrolledText widget construction, and make the example work from the interactive shell. 2010-12-28 10:56:20 +00:00
Georg Brandl 90b20675bd #10777: fix iteration over dict keys while mutating the dict. 2010-12-28 10:38:33 +00:00
Georg Brandl ff52f76019 #10679: install idle, pydoc, 2to3 scripts with X.Y suffix for make altinstall; create symlinks for make install. 2010-12-28 09:51:43 +00:00
Victor Stinner 92be939695 Issue #10780: PyErr_SetFromWindowsErrWithFilename() and
PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the
filesystem encoding instead of UTF-8.
2010-12-28 00:28:21 +00:00
Victor Stinner cb428f0162 Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
2010-12-27 20:10:36 +00:00
Vinay Sajip 67981ec536 Issue #10626: test_logging now preserves logger disabled states. 2010-12-27 18:34:25 +00:00
Vinay Sajip 60b4df15d6 Issue #10774: test_logging now removes temp files created during tests. 2010-12-27 11:18:52 +00:00
R. David Murray 6cb252fa14 Merged revisions 87497 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87497 | r.david.murray | 2010-12-26 14:54:29 -0500 (Sun, 26 Dec 2010) | 7 lines

  #5258/#10642: print fn, line, traceback and continue when .pth file is broken

  If a .pth file contained an error, it could cause a traceback in site.py,
  terminating its processing.  In 2.7 and 3.2, the interpreter will then not
  start.  Previously, a message would print saying to use -v to get the
  traceback.  In either case, the traceback generated for a failed .pth file did
  not include the .pth filename, making it difficult to debug the problem.  Now
  site.py reports not only the .pth filename but also the line number causing the
  error, and just skips the remainder of the file.
........
2010-12-26 22:24:54 +00:00
R. David Murray b4ca59b783 #5258/#10642: print fn, line, traceback and continue when .pth file is broken
If a .pth file contained an error, it could cause a traceback in site.py,
terminating its processing.  In 2.7 and 3.2, the interpreter will then not
start.  Previously, a message would print saying to use -v to get the
traceback.  In either case, the traceback generated for a failed .pth file did
not include the .pth filename, making it difficult to debug the problem.  Now
site.py reports not only the .pth filename but also the line number causing the
error, and just skips the remainder of the file.
2010-12-26 19:54:29 +00:00
Victor Stinner 667d4b577f Issue #10763: subprocess.communicate() closes stdout and stderr if both are
pipes (bug specific to Windows).

Improve also the unit test: write a portable unit test.
2010-12-25 22:40:32 +00:00
R. David Murray dfd7eb0ba2 #1693546: don't add quotes around RFC 2231 encoded values.
The RFC is bit hard to understand on this point, but the examples
clearly show that parameter values that are encoded according
to its charset/language rules don't have surrounding quotes, and
the ABNF does not allow for quotes.  So when we produce such
encoded values, we no longer add quotes.
2010-12-24 22:36:49 +00:00
Raymond Hettinger 1e7efdf2a0 Add news entry for 87471. 2010-12-24 10:04:00 +00:00
R. David Murray 4a62e89728 #1155362: allow hh:mm:ss-uuuu like we allow hh:mm:ss+uuuu in parsedate_tz
Original patch by Thomas Herve.
2010-12-23 20:35:46 +00:00
R. David Murray 30f9c8c684 Merged revisions 87430 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87430 | r.david.murray | 2010-12-21 16:53:37 -0500 (Tue, 21 Dec 2010) | 9 lines

  #4871: check that zipfile password is bytes, and give useful error message.

  Previously passing a string in as the password would fail either with
  an assertion error or a TypeError with a confusing error message.
  Note that a string can't be accepted since zipfile has no way to
  guess what encoding should be used to turn it into bytes.

  Patch by Victor Stinner.
........
2010-12-21 21:57:54 +00:00
R. David Murray 8d855d8304 #4871: check that zipfile password is bytes, and give useful error message.
Previously passing a string in as the password would fail either with
an assertion error or a TypeError with a confusing error message.
Note that a string can't be accepted since zipfile has no way to
guess what encoding should be used to turn it into bytes.

Patch by Victor Stinner.
2010-12-21 21:53:37 +00:00
Antoine Pitrou 6cfc5124f2 Merged revisions 87427 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87427 | antoine.pitrou | 2010-12-21 22:20:59 +0100 (mar., 21 déc. 2010) | 3 lines

  Issue #10750: The `raw` attribute of buffered IO objects is now read-only.
........
2010-12-21 21:26:09 +00:00
Antoine Pitrou 7f8f41808b Issue #10750: The `raw` attribute of buffered IO objects is now read-only. 2010-12-21 21:20:59 +00:00
Raymond Hettinger 8ebe27f300 Deprecate assertDictContainsSubset() 2010-12-21 19:24:26 +00:00
Senthil Kumaran 7bc0d872dd Issue3243 - Support iterable bodies in httplib. Patch contributions by Xuanji Li and Chris AtLee. 2010-12-19 10:49:52 +00:00
Georg Brandl 8a60e94802 Bump to 3.2b2. 2010-12-19 10:30:28 +00:00
Georg Brandl aedd2899c2 #6075: make idle work with both Carbon AquaTk and Cocoa AquaTk. Patch by Kevin Walzer and Ned Deily. 2010-12-19 10:10:32 +00:00
Michael Foord b3468f79ef Issue 10611. Issue 9857. Improve the way exception handling, including test skipping, is done inside TestCase.run 2010-12-19 03:19:47 +00:00
Ezio Melotti addc6f5a21 #10573: use actual/expected consistently in unittest methods. The order of the args of assertCountEqual is also changed. 2010-12-18 20:00:04 +00:00
R. David Murray 63563cdf9d #9286: Fix the rfc822 parser to preserve whitespace in address local part.
Such addresses are not RFC compliant except under the 'obsolete syntax'
rules, but before this fix the whitespace was dropped from the input,
concatenating the pieces.  That breaks one of the principles of the
email package, that of preserving the input as much as possible.
It also denies the application program the opportunity to apply its
own heuristics to interpretation of such non-compliant addresses.

It is possible users of the email package were depending on the local
part always being a single token, so this fix will not be backported.
2010-12-18 18:25:38 +00:00
Antoine Pitrou ff1bbba92a Merged revisions 87373,87381 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87373 | senthil.kumaran | 2010-12-18 17:55:23 +0100 (sam., 18 déc. 2010) | 3 lines

  Fix Issue6791 - Limit the HTTP header readline with _MAXLENGTH. Patch by Antoine Pitrou
........
  r87381 | antoine.pitrou | 2010-12-18 18:59:18 +0100 (sam., 18 déc. 2010) | 3 lines

  NEWS entry for r87373
........
2010-12-18 18:04:38 +00:00
Antoine Pitrou 2b37ce7f30 NEWS entry for r87373 2010-12-18 17:59:18 +00:00
R. David Murray 28b77ece82 Merged revisions 87374 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87374 | r.david.murray | 2010-12-18 12:19:10 -0500 (Sat, 18 Dec 2010) | 8 lines

  #10404: Use ctl-button-1 for context menus on OSX Idle.

  This provides access to the context menus where they previously could
  not be accessed due to the way OSX Tk binds buttons.  It also
  improves platform consistency.

  Patch by Ned Deily.
........
2010-12-18 17:21:30 +00:00
R. David Murray b68a7bc70c #10404: Use ctl-button-1 for context menus on OSX Idle.
This provides access to the context menus where they previously could
not be accessed due to the way OSX Tk binds buttons.  It also
improves platform consistency.

Patch by Ned Deily.
2010-12-18 17:19:10 +00:00
Ezio Melotti 9d254f7092 Merged revisions 87368 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87368 | ezio.melotti | 2010-12-18 15:59:43 +0100 (Sat, 18 Dec 2010) | 1 line

  #5587: add a repr to dict_proxy objects.  Patch by David Stanek and Daniel Urban.
........
2010-12-18 15:06:45 +00:00
Ezio Melotti ac53ab64a6 #5587: add a repr to dict_proxy objects. Patch by David Stanek and Daniel Urban. 2010-12-18 14:59:43 +00:00
Steven Bethard fd311a712d Add subparser aliases for argparse. Resolves issue 9324. Approved by Georg for beta2 on the tracker. 2010-12-18 11:19:23 +00:00
R. David Murray 52d1b4e62f #9907: call rl_initialize early when using editline on OSX
editline rl_initialize apparently discards any mappings done before it
is called, which makes tab revert to file completion instead of inserting
a tab.  So now on OSX we call rl_initialize first if we are using
readline, and then re-read the users .editrc (if any) afterward so they
can still override our defaults.

Patch by Ned Deily, modified by Ronald Oussoren.
2010-12-18 03:48:32 +00:00
Łukasz Langa 71b37a5d6d 100% test coverage, better mapping protocol compatibility, some minor bugfixes 2010-12-17 21:56:32 +00:00
Martin v. Löwis 0e74cacdff Upgrade to sqlite3 3.7.4. 2010-12-17 21:04:09 +00:00
Martin v. Löwis 910a4edbcd Upgrade Tcl/Tk to 8.5.9. 2010-12-17 20:43:27 +00:00
Antoine Pitrou bc7f20cea4 Merged revisions 87341 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87341 | antoine.pitrou | 2010-12-17 18:42:16 +0100 (ven., 17 déc. 2010) | 4 lines

  Issue #4188: Avoid creating dummy thread objects when logging operations
  from the threading module (with the internal verbose flag activated).
........
2010-12-17 17:44:45 +00:00
Antoine Pitrou 401edd69cf Issue #4188: Avoid creating dummy thread objects when logging operations
from the threading module (with the internal verbose flag activated).
2010-12-17 17:42:16 +00:00
Antoine Pitrou 988dbd7bc2 Issue #10711: Remove HTTP 0.9 support from http.client. The `strict`
parameter to HTTPConnection and friends is deprecated.
2010-12-17 17:35:56 +00:00
Senthil Kumaran 3396e8671d Merged revisions 87329 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87329 | senthil.kumaran | 2010-12-17 12:48:45 +0800 (Fri, 17 Dec 2010) | 3 lines

  Fix Issue9721 - urljoin behavior when the relative url starts with ';'
........
2010-12-17 04:54:43 +00:00
Senthil Kumaran dca5b86233 Fix Issue9721 - urljoin behavior when the relative url starts with ';' 2010-12-17 04:48:45 +00:00
Antoine Pitrou 20f0fb68aa Issue #10710: `Misc/setuid-prog.c` is removed from the source tree. 2010-12-16 18:25:24 +00:00
Antoine Pitrou 3022ce1a14 Merged revisions 87317 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87317 | antoine.pitrou | 2010-12-16 17:48:36 +0100 (jeu., 16 déc. 2010) | 4 lines

  Issue #10714: Limit length of incoming request in http.server to 65536 bytes
  for security reasons.  Initial patch by Ross Lagerwall.
........

(also backport some tests)
2010-12-16 17:03:16 +00:00
Antoine Pitrou c492437922 Issue #10714: Limit length of incoming request in http.server to 65536 bytes
for security reasons.  Initial patch by Ross Lagerwall.
2010-12-16 16:48:36 +00:00
Łukasz Langa 1ac0d7a7d3 Acknowledged renaming of SafeConfigParser to ConfigParser. 2010-12-16 01:42:36 +00:00
Raymond Hettinger 48f3bd331c Nits 2010-12-16 00:30:53 +00:00
Antoine Pitrou 810023db3e Issue #8844: Regular and recursive lock acquisitions can now be interrupted
by signals on platforms using pthreads.  Patch by Reid Kleckner.
2010-12-15 22:59:16 +00:00
Éric Araujo 5d899dddb2 Merged revisions 87280 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87280 | eric.araujo | 2010-12-15 22:07:22 +0100 (mer., 15 déc. 2010) | 2 lines

  Fix build_ext with VS 8.0.  Patch by Hirokazu Yamamoto (#9558).
........
2010-12-15 21:12:12 +00:00
Éric Araujo 60532bd6b6 Fix build_ext with VS 8.0. Patch by Hirokazu Yamamoto (#9558). 2010-12-15 21:07:22 +00:00
Raymond Hettinger 96f3410ebe Issue 10667: Fast path for collections.Counter 2010-12-15 16:30:37 +00:00
Antoine Pitrou 00c6b62939 Issue #10706: Remove outdated script runtests.sh. Either `make test`
or `python -m test` should be used instead.
2010-12-15 15:33:18 +00:00
R. David Murray 800dfee91a Merged revisions 87251 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87251 | r.david.murray | 2010-12-14 18:06:25 -0500 (Tue, 14 Dec 2010) | 4 lines

  #4236: avoid possible Fatal Error when import is called from __del__

  Patch by Simon Cross, crasher test code by Martin von Löwis.
........
2010-12-14 23:30:42 +00:00
R. David Murray ce4b170c5a #4236: avoid possible Fatal Error when import is called from __del__
Patch by Simon Cross, crasher test code by Martin von Löwis.
2010-12-14 23:06:25 +00:00
R. David Murray d8fec5ff08 Merged revisions 87238 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87238 | r.david.murray | 2010-12-14 11:20:53 -0500 (Tue, 14 Dec 2010) | 7 lines

  #775964: skip YP/NIS entries instead of failing the test

  Also includes doc updates mentioning that these entries may not
  be retrievable via getgrnam and getgrgid.

  Patch by Bobby Impollonia.
........
2010-12-14 16:24:18 +00:00
R. David Murray ec07331eea #775964: skip YP/NIS entries instead of failing the test
Also includes doc updates mentioning that these entries may not
be retrievable via getgrnam and getgrgid.

Patch by Bobby Impollonia.
2010-12-14 16:20:53 +00:00
Gregory P. Smith b740e76af0 Merged revisions 87233 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87233 | gregory.p.smith | 2010-12-14 06:38:00 -0800 (Tue, 14 Dec 2010) | 4 lines

  Issue #1731717: Fixed the problem where subprocess.wait() could cause an
  OSError exception when The OS had been told to ignore SIGCLD in our process
  or otherwise not wait for exiting child processes.
........
2010-12-14 15:16:24 +00:00
Gregory P. Smith e85db2bbb8 Issue #1731717: Fixed the problem where subprocess.wait() could cause an
OSError exception when The OS had been told to ignore SIGCLD in our process
or otherwise not wait for exiting child processes.
2010-12-14 14:38:00 +00:00
R. David Murray 6b2af997d4 Merged revisions 87230 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87230 | r.david.murray | 2010-12-14 09:16:20 -0500 (Tue, 14 Dec 2010) | 7 lines

  #10695: use %s not %d so that a string 'port' does not cause a debug traceback

  Passing the port as a string value works fine in regular mode, but
  if you turned debug on it would throw an error trying to print the
  port number, which is surprising and confusing.
........
2010-12-14 14:27:27 +00:00
R. David Murray 32ef70c827 #10695: use %s not %d so that a string 'port' does not cause a debug traceback
Passing the port as a string value works fine in regular mode, but
if you turned debug on it would throw an error trying to print the
port number, which is surprising and confusing.
2010-12-14 14:16:20 +00:00
Gregory P. Smith 8edd99d085 Issue #6559: fix the subprocess.Popen pass_fds implementation. Add a unittest.
Issue #7213: Change the close_fds default on Windows to better match the new
default on POSIX.  True when possible (False if stdin/stdout/stderr are
supplied).

Update the documentation to reflect all of the above.
2010-12-14 13:43:30 +00:00
R. David Murray ccb9d05b6c Merged revisions 87217 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87217 | r.david.murray | 2010-12-13 18:51:19 -0500 (Mon, 13 Dec 2010) | 5 lines

  #1078919: make add_header automatically do RFC2231 encoding when needed.

  Also document the use of three-tuples if control of the charset
  and language is desired.
........
2010-12-13 23:57:01 +00:00
R. David Murray 7ec754b7da #1078919: make add_header automatically do RFC2231 encoding when needed.
Also document the use of three-tuples if control of the charset
and language is desired.
2010-12-13 23:51:19 +00:00
Gregory P. Smith f86aa7c3d2 Mention the subprocess.Popen close_fds default change. Fixup *s to -s. 2010-12-13 08:07:14 +00:00
Nick Coghlan 6b22f3fa17 Issue #10188 (partial resolution): tidy up some behaviour in the new tempfile.TemporaryDirectory context manager 2010-12-12 15:24:21 +00:00
Benjamin Peterson 28a4dce6a8 remove (un)transform methods 2010-12-12 01:33:04 +00:00
R. David Murray 07c1bd7457 Merged revisions 85678 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85678 | r.david.murray | 2010-10-17 21:14:06 -0400 (Sun, 17 Oct 2010) | 5 lines

  #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY.

  Patch by Sébastien Sablé.  This solves a test_mmap failure on AIX.
........
2010-12-11 02:05:32 +00:00
Vinay Sajip 5a27d40186 logging: added handler of last resort. 2010-12-10 11:42:57 +00:00
Vinay Sajip 129fd04440 test.support: Added TestHandler and Matcher classes for better support of assertions about logging. 2010-12-10 08:19:38 +00:00
Ronald Oussoren a85b671cb6 Merged revisions 87119 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87119 | ronald.oussoren | 2010-12-07 16:28:10 +0100 (Tue, 07 Dec 2010) | 2 lines

  Fix for issue #10107: Without this patch IDLE on OSX doesn't warn about unsaved files when quitting.
........
2010-12-07 15:31:07 +00:00
Ronald Oussoren 10e05e17a3 Fix for issue #10107: Without this patch IDLE on OSX doesn't warn about unsaved files when quitting. 2010-12-07 15:28:10 +00:00
Benjamin Peterson 9b4e27e8c6 add news note 2010-12-07 03:47:37 +00:00
Georg Brandl 41ea8ae667 Bump to 3.2b1. 2010-12-04 19:09:24 +00:00
Éric Araujo 1215915045 Use proper plural forms in argparse (#4391) 2010-12-04 17:31:49 +00:00
Victor Stinner 13d49ee7d6 Issue #10601: sys.displayhook uses 'backslashreplace' error handler on
UnicodeEncodeError.
2010-12-04 17:24:33 +00:00
R. David Murray cd4f758407 Merged revisions 85086 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85086 | r.david.murray | 2010-09-28 21:08:05 -0400 (Tue, 28 Sep 2010) | 4 lines

  #7110: have regrtest print test failures and tracebacks to stderr not stdout.

  Patch by Sandro Tosi.
........
2010-12-04 17:15:21 +00:00
Georg Brandl cbc79c76a8 Add display/undisplay pdb commands. 2010-12-04 16:21:42 +00:00
Georg Brandl 44f2b640ff #7245: Add a SIGINT handler on continue in pdb that allows to break a program again by pressing Ctrl-C. 2010-12-04 16:00:47 +00:00
Mark Dickinson 0169af1534 Merged revisions 87032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines

  Issue #10596: Fix float.__mod__ to have the same behaviour as
  float.__divmod__ with respect to signed zeros.
........
2010-12-04 13:04:18 +00:00
Mark Dickinson 33154388f9 Backout broken backport. (Sorry.) 2010-12-04 12:42:18 +00:00
Mark Dickinson 11e77ffcbc Merged revisions 87032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines

  Issue #10596: Fix float.__mod__ to have the same behaviour as
  float.__divmod__ with respect to signed zeros.
........
2010-12-04 12:38:19 +00:00
Mark Dickinson d2a9b20efa Issue #10596: Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
2010-12-04 12:25:30 +00:00
Georg Brandl 1acb746d79 Add the "interact" pdb command from pdb++. 2010-12-04 11:20:26 +00:00
Georg Brandl 732324a3f8 #7905: Actually respect the keyencoding parameter to shelve.Shelf. 2010-12-04 11:12:43 +00:00
Georg Brandl c29cc6a8f2 #1569291: speed up array.repeat() by making only O(log n) memcpy() calls; the code follows unicode_repeat. 2010-12-04 11:02:04 +00:00
Georg Brandl 9d8711964f #1772833: add -q command line option. 2010-12-04 10:47:18 +00:00
Georg Brandl 8334fd9285 Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile. 2010-12-04 10:26:46 +00:00
Hirokazu Yamamoto 427d3149eb Fixed several corner case issues on os.stat/os.lstat related to reparse
points. (Windows)

- Set S_IEXEC via final path name not link name.
- Set S_IFLNK also via FindFirstFile (when CreateFile fails)
2010-12-04 10:16:05 +00:00
Senthil Kumaran 5399281600 Merged revisions 87014 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87014 | senthil.kumaran | 2010-12-04 17:44:30 +0800 (Sat, 04 Dec 2010) | 3 lines

  Add the NEWS entry for issue7904
........
2010-12-04 09:50:37 +00:00
Senthil Kumaran 10064e9d7a Add the NEWS entry for issue7904 2010-12-04 09:44:30 +00:00
Georg Brandl d9e833c70a #6045: provide at least get() and setdefault() for all dbm modules. 2010-12-04 09:14:36 +00:00
Alexander Belopolsky 942af5a9a4 Issue #10557: Fixed error messages from float() and other numeric
types.  Added a new API function, PyUnicode_TransformDecimalToASCII(),
which transforms non-ASCII decimal digits in a Unicode string to their
ASCII equivalents.
2010-12-04 03:38:46 +00:00
Michael Foord 37d120aeb4 Issue 10620: Specifying test modules by path instead of module name to 'python -m unittest' 2010-12-04 01:11:21 +00:00
Terry Reedy 4b9b197518 Issue #10534: add NEWS entry for r86983 and r87000. 2010-12-03 22:50:06 +00:00
Martin v. Löwis 4d0d471a80 Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
Antoine Pitrou c4df784514 Issue #10272: The ssl module now raises socket.timeout instead of a generic
SSLError on socket timeouts.
2010-12-03 19:59:41 +00:00
Éric Araujo bb48a8b59a Allow translators to reorder placeholders in localizable messages from
argparse (#10528).

There is no unit test; I checked with xgettext that no more warnings
were emitted.  Steven approved the change.
2010-12-03 19:41:00 +00:00
Antoine Pitrou 976157f9f3 Merged revisions 86981,86984 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86981 | antoine.pitrou | 2010-12-03 19:41:39 +0100 (ven., 03 déc. 2010) | 5 lines

  Issue #10478: Reentrant calls inside buffered IO objects (for example by
  way of a signal handler) now raise a RuntimeError instead of freezing the
  current process.
........
  r86984 | antoine.pitrou | 2010-12-03 20:14:17 +0100 (ven., 03 déc. 2010) | 3 lines

  Add an "advanced topics" section to the io doc.
........
2010-12-03 19:21:49 +00:00
Éric Araujo a9c7a8fa5b Fix incorrect use of gettext in argparse (#10497).
Steven, the maintainer of argparse, agreed to have this committed
without tests for now, since the fix is obvious.  See the bug log.
2010-12-03 19:19:17 +00:00
Antoine Pitrou f3b68b3f98 Issue #10478: Reentrant calls inside buffered IO objects (for example by
way of a signal handler) now raise a RuntimeError instead of freezing the
current process.
2010-12-03 18:41:39 +00:00
Łukasz Langa b6a6f5f886 Issue 10499: Modular interpolation in configparser 2010-12-03 16:28:00 +00:00
Nick Coghlan 37ee850b10 Issue 2690: Add support for slicing and negative indices to range objects (includes precalculation and storage of the range length).
Refer to the tracker issue for the language moratorium implications of this change
2010-12-03 14:26:13 +00:00
Michael Foord 3ab34ccae3 Factor out common code from lib/test/__main__.py and lib/test/regrtest.py into a function. 2010-12-03 12:27:40 +00:00
Vinay Sajip 615615291f logging: Added getLogRecordFactory/setLogRecordFactory with docs and tests. 2010-12-03 11:50:38 +00:00
Georg Brandl 9bd45f995f #10549: fix interface of docclass() for text documenter. 2010-12-03 09:58:38 +00:00
Nick Coghlan 7bb30b72d8 Improve Pydoc interactive browsing (#2001). Patch by Ron Adam.
* A -b option to start an enhanced browsing session.
* Allow -b and -p options to be used together.
* Specifying port 0 will pick an arbitrary unused socket port.
* A new browse() function to start the new server and browser.
* Show Python version information in the header.
* A *Get* field which takes the same input as the help() function.
* A *Search* field which replaces the Tkinter search box.
* Links to *Module Index*, *Topics*, and *Keywords*.
* Improved source file viewing.
* An HTMLDoc.filelink() method.
* The -g option and the gui() and serve() functions are deprecated.
2010-12-03 09:29:11 +00:00
Georg Brandl 9af2a6e56f Rewrap NEWS (Builbot test commit.) 2010-12-03 09:18:37 +00:00
Georg Brandl f8de3fea12 #10360: catch TypeError in WeakSet.__contains__, just like WeakKeyDictionary does. 2010-12-03 07:55:44 +00:00
Georg Brandl d80d5f4ee8 #940286: pydoc.Helper.help() ignores input/output init parameters. 2010-12-03 07:47:22 +00:00
Nick Coghlan 4c4c0f2fe6 Partially revert r78719 - it removed a check that is still needed in some cases (i.e. this will allow Michael to add the test.__main__ support that broke the buildbots previously) 2010-12-03 07:44:33 +00:00
Georg Brandl 1e5c5f8f7d #1745035: add limits for command and data size to smtpd; patch by Savio Sena. 2010-12-03 07:38:22 +00:00
Georg Brandl 106a54d764 Move entries from "core" section to where they belong. 2010-12-03 07:37:16 +00:00
R. David Murray b579dba119 #1486713: Add a tolerant mode to HTMLParser.
The motivation for adding this option is that the the functionality it
provides used to be provided by sgmllib in Python2, and was used by,
for example, BeautifulSoup.  Without this option, the Python3 version
of BeautifulSoup and the many programs that use it are crippled.

The original patch was by 'kxroberto'.  I modified it heavily but kept his
heuristics and test.  I also added additional heuristics to fix #975556,
#1046092, and part of #6191.  This patch should be completely backward
compatible:  the behavior with the default strict=True is unchanged.
2010-12-03 04:06:39 +00:00
Brian Curtin 79cdb661f5 Fix #10554. Added context manager support to Popen objects.
Added a few common Popen uses to the tests like we've done for a few other
instances of adding context managers. Eventually the entire test suite
could be converted to use the context manager format.
2010-12-03 02:46:02 +00:00
Michael Foord 5074df623b Issue 7911: unittest.TestCase.longMessage defaults to True for improved failure messages by default 2010-12-03 00:53:09 +00:00
Daniel Stutzbach 98338227a7 Issue9915: speeding up sorting with a key 2010-12-02 21:55:33 +00:00
R. David Murray a0b44b5adb #8989: add 'domain' keyword to make_msgid.
Patch by Adrian von Bidder.
2010-12-02 21:47:19 +00:00
Brian Curtin 52173d4959 Fix #9333. Expose os.symlink on Windows only when usable.
In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege
is an account privilege that is required to be held by the user. Not only
must the privilege be enabled for the account, the activated privileges for
the currently running application must be adjusted to enable the requested
privilege.

Rather than exposing an additional function to be called prior to the user's
first os.symlink call, we handle the AdjustTokenPrivileges Windows API call
internally and only expose os.symlink when the privilege escalation was
successful.

Due to the change of only exposing os.symlink when it's available, we can
go back to the original test skipping methods of checking via `hasattr`.
2010-12-02 18:29:18 +00:00
Georg Brandl 02524629f3 #7475: add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2. 2010-12-02 18:06:51 +00:00
Terry Reedy 5a22b65117 Issue 9299 Add exist_ok parameter to os.makedirs to suppress 'File exists' exception. Patch by Ray Allen. 2010-12-02 07:05:56 +00:00
Nick Coghlan b2ddf7979d Issue #9573: os.fork now works when triggered as a side effect of import (the wisdom of actually relying on this remains questionable!) 2010-12-02 04:11:46 +00:00
R. David Murray 78a1a15c20 Merged revisions 86925 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86925 | r.david.murray | 2010-12-01 21:58:07 -0500 (Wed, 01 Dec 2010) | 4 lines

  #10464: fix netrc handling of lines with embedded '#" characters.

  Patch by Xuanji Li.
........
2010-12-02 03:10:43 +00:00
R. David Murray d2bb830edc #10464: fix netrc handling of lines with embedded '#" characters.
Patch by Xuanji Li.
2010-12-02 02:58:07 +00:00
Raymond Hettinger 482ba77245 Add itertools.accumulate(). 2010-12-01 22:48:00 +00:00
Alexander Belopolsky 41e422a4ff Issue #4113: Added custom __repr__ method to functools.partial. 2010-12-01 20:05:49 +00:00
Ezio Melotti ed3a7d2d60 #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex. 2010-12-01 02:32:32 +00:00
Ezio Melotti f10c400b91 Fix test failure in debug builds and add NEWS entry for r86908 2010-12-01 01:45:53 +00:00
Antoine Pitrou 715f3cd10d Issue #8685: Speed up set difference `a - b` when source set `a` is
much larger than operand `b`.  Patch by Andrew Bennetts.
2010-11-30 22:23:20 +00:00
Nick Coghlan 9fc443cf59 Issue 9873: the URL parsing functions now accept ASCII encoded byte sequences in addition to character strings 2010-11-30 15:48:08 +00:00
Georg Brandl 71c23d4473 Include structseq.h in Python.h, and remove now-redundant includes in individual sources. 2010-11-30 09:30:54 +00:00
Nick Coghlan 234515afe5 Issue 10586: change the new functools.lru_cache implementation to expose the maximum and current cache sizes through the public statistics API. This API is now a single function that returns a named tuple. 2010-11-30 06:19:46 +00:00
Raymond Hettinger 101f09e72f Issue #10323: Predictable final state for slice(). 2010-11-30 03:09:05 +00:00
Raymond Hettinger 69b34bfe9c Issue #10323: Predictable final state for slice(). 2010-11-30 02:49:29 +00:00
Alexander Belopolsky fdb32c15e4 Merged revisions 86857 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86857 | raymond.hettinger | 2010-11-28 22:56:12 -0500 (Sun, 28 Nov 2010) | 1 line

  Issue #10565:  Iterator ABC should require both __next__ and __iter__.
........
2010-11-30 01:01:02 +00:00
Senthil Kumaran 5170c81662 Merged revisions 86861 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86861 | senthil.kumaran | 2010-11-29 19:54:17 +0800 (Mon, 29 Nov 2010) | 5 lines

  Fix #10561 - Fix pdb behavior. Delete the breakpoints by breakpoint number.
  Handle multiple breakpoints at same line. Update docs/test.
  Patch by Xavier de Gaye.
........
2010-11-29 12:27:45 +00:00
Senthil Kumaran 6f1070485f Fix #10561 - Fix pdb behavior. Delete the breakpoints by breakpoint number.
Handle multiple breakpoints at same line. Update docs/test.
Patch by Xavier de Gaye.
2010-11-29 11:54:17 +00:00
Raymond Hettinger ead22227cc Issue #10565: Iterator ABC should require both __next__ and __iter__. 2010-11-29 03:56:12 +00:00
Benjamin Peterson 68eb3718d9 point in the general direction of 3.1.4 2010-11-28 04:50:12 +00:00
Antoine Pitrou e71362d3de Issue #10518: Bring back the callable() builtin.
Approved by Guido (BDFL) and Georg (RM).
2010-11-27 22:00:11 +00:00
Benjamin Peterson 5757429130 3.1.3 final version bump 2010-11-27 14:46:13 +00:00
Raymond Hettinger 6e165b30de Issue 10242: unittest.assertItemsEqual makes too many assumptions. 2010-11-27 09:31:37 +00:00
Matthias Klose 55aa2f39a3 Merged revisions 85645 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85645 | matthias.klose | 2010-10-17 15:22:33 +0200 (Sun, 17 Oct 2010) | 2 lines

  - Accept Oracle Berkeley DB 5.0 and 5.1 as backend for the dbm extension.
........
2010-11-26 11:56:26 +00:00
Georg Brandl d62ecbf0ba Merged revisions 85728,85731,85735,85766-85771,85773,85777 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r85728 | georg.brandl | 2010-10-19 20:54:25 +0200 (Di, 19 Okt 2010) | 1 line

  #10092: Properly reset locale in Locale*Calendar classes.  The context manager was buggy because setlocale() returns the *new* locale, not the old.  Also add a test for this.
........
  r85731 | georg.brandl | 2010-10-19 23:07:16 +0200 (Di, 19 Okt 2010) | 1 line

  Be consistent in the spelling of thread-safe(ty).
........
  r85735 | georg.brandl | 2010-10-20 08:50:19 +0200 (Mi, 20 Okt 2010) | 1 line

  Fix r85728: use "" to mean the system default locale, which should work on more systems.
........
  r85766 | georg.brandl | 2010-10-21 09:40:03 +0200 (Do, 21 Okt 2010) | 1 line

  #10159: sort completion matches before comparing to dir() result.
........
  r85767 | georg.brandl | 2010-10-21 14:49:28 +0200 (Do, 21 Okt 2010) | 1 line

  #9095, #8912, #8999: add support in patchcheck for Mercurial checkouts, C file reindenting, and docs whitespace fixing.
........
  r85768 | georg.brandl | 2010-10-21 14:59:14 +0200 (Do, 21 Okt 2010) | 1 line

  #9919: fix off-by-one error in lineno command in Misc/gdbinit; also add newline to its output.
........
  r85769 | georg.brandl | 2010-10-21 15:01:23 +0200 (Do, 21 Okt 2010) | 1 line

  Fix missing import.
........
  r85770 | georg.brandl | 2010-10-21 15:29:10 +0200 (Do, 21 Okt 2010) | 1 line

  #3077: fix h2py substitution of character literals.
........
  r85771 | georg.brandl | 2010-10-21 15:34:51 +0200 (Do, 21 Okt 2010) | 1 line

  #1203650: allow larger list of files in windows makefile for freeze.
........
  r85773 | georg.brandl | 2010-10-21 15:45:52 +0200 (Do, 21 Okt 2010) | 1 line

  #4829: better error message for invalid file mode
........
  r85777 | georg.brandl | 2010-10-21 17:44:51 +0200 (Do, 21 Okt 2010) | 1 line

  Add .hgeol file for the Mercurial EOL extension.
........
2010-11-26 08:52:36 +00:00
Georg Brandl c524cff3d3 Merged revisions 85530,85532-85534,85538-85543,85546-85548 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r85530 | georg.brandl | 2010-10-15 17:32:05 +0200 (Fr, 15 Okt 2010) | 1 line

  Refrain from using inline suites.
........
  r85532 | georg.brandl | 2010-10-15 18:03:02 +0200 (Fr, 15 Okt 2010) | 1 line

  #7771: reference to documentation of dictview methods and operations.
........
  r85533 | georg.brandl | 2010-10-15 18:07:41 +0200 (Fr, 15 Okt 2010) | 1 line

  #9683: remove broken dead code dealing with nested arguments removed from Py3k, and update the docs and docstrings accordingly.
........
  r85534 | georg.brandl | 2010-10-15 18:19:43 +0200 (Fr, 15 Okt 2010) | 1 line

  #9801: document how list and dict proxies created by Managers behave w.r.t. mutable items.
........
  r85538 | georg.brandl | 2010-10-15 18:35:46 +0200 (Fr, 15 Okt 2010) | 1 line

  #7303: add documentation for useful pkgutil functions and classes.
........
  r85539 | georg.brandl | 2010-10-15 18:42:14 +0200 (Fr, 15 Okt 2010) | 1 line

  Fix issue references.
........
  r85540 | georg.brandl | 2010-10-15 18:42:37 +0200 (Fr, 15 Okt 2010) | 1 line

  #6798: fix wrong docs for the arguments to several trace events.
........
  r85541 | georg.brandl | 2010-10-15 18:53:24 +0200 (Fr, 15 Okt 2010) | 1 line

  #4968: updates to inspect.is* function docs.
........
  r85542 | georg.brandl | 2010-10-15 19:01:15 +0200 (Fr, 15 Okt 2010) | 1 line

  #7790: move table of struct_time members to the actual description of struct_time.
........
  r85543 | georg.brandl | 2010-10-15 19:03:02 +0200 (Fr, 15 Okt 2010) | 1 line

  #4785: document strict argument of JSONDecoder, plus add object_pairs_hook in the docstrings.
........
  r85546 | georg.brandl | 2010-10-15 19:58:45 +0200 (Fr, 15 Okt 2010) | 1 line

  #5762: fix handling of empty namespace in minidom, which would result in AttributeError on toxml().
........
  r85547 | georg.brandl | 2010-10-15 20:00:35 +0200 (Fr, 15 Okt 2010) | 1 line

  #6098: Refrain from claiming DOM level 3 conformance in minidom.
........
  r85548 | georg.brandl | 2010-10-15 21:46:19 +0200 (Fr, 15 Okt 2010) | 1 line

  #10072: assume a bit less knowledge of the FTP protocol in the ftplib docs.
........
2010-11-26 08:42:45 +00:00
Georg Brandl aba9796c5e Merged revisions 85450-85455,85460-85465 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r85450 | georg.brandl | 2010-10-14 08:35:53 +0200 (Do, 14 Okt 2010) | 1 line

  #7642: update to os.system() docs.
........
  r85451 | georg.brandl | 2010-10-14 08:41:42 +0200 (Do, 14 Okt 2010) | 1 line

  #3865: add note about benchmarking with profilers, and move licensing stuff to bottom of document.
........
  r85452 | georg.brandl | 2010-10-14 08:43:22 +0200 (Do, 14 Okt 2010) | 1 line

  #10046: small correction to atexit docs.
........
  r85453 | georg.brandl | 2010-10-14 08:46:08 +0200 (Do, 14 Okt 2010) | 1 line

  #6825: small correction to split() docs.
........
  r85454 | georg.brandl | 2010-10-14 08:48:47 +0200 (Do, 14 Okt 2010) | 1 line

  Mention 2to3.
........
  r85455 | georg.brandl | 2010-10-14 08:59:45 +0200 (Do, 14 Okt 2010) | 1 line

  #1710703: write zipfile structures also in the case of closing a new, but empty, archive.
........
  r85460 | georg.brandl | 2010-10-14 09:24:28 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_import under -O or -OO.
........
  r85461 | georg.brandl | 2010-10-14 09:29:08 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix lib2to3 fixer fix_operator when running under -OO.
........
  r85462 | georg.brandl | 2010-10-14 09:32:52 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_xml_etree under -OO.
........
  r85463 | georg.brandl | 2010-10-14 09:34:56 +0200 (Do, 14 Okt 2010) | 1 line

  Better check for "any optimize option given".
........
  r85464 | georg.brandl | 2010-10-14 09:42:27 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_compileall under -O and -OO.
........
  r85465 | georg.brandl | 2010-10-14 10:08:56 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_cmd_line_script under -O and -OO.
........
2010-11-26 08:37:46 +00:00
Eric Smith 984bb58000 Issue #7094: Add alternate ('#') flag to __format__ methods for float, complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon. 2010-11-25 16:08:06 +00:00
Terry Reedy 99f9637de8 Issue 2986: Add autojunk paramater to SequenceMatcher to turn off heuristic. Patch by Terry Reedy, Eli Bendersky, and Simon Cross 2010-11-25 06:12:34 +00:00
Ezio Melotti 3188b2082e Merged revisions 86737 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86737 | ezio.melotti | 2010-11-25 00:02:18 +0200 (Thu, 25 Nov 2010) | 1 line

  Add NEWS entry for r86732 and fix double function in the table.
........
2010-11-24 22:04:22 +00:00
Ezio Melotti 17f9b3d289 Add NEWS entry for r86732 and fix double function in the table. 2010-11-24 22:02:18 +00:00
Brian Curtin 1b9df39620 Fix #8879. Add os.link support to Windows.
Additionally, the st_ino attribute of stat structures was not being filled
in. This was left out of the fix to #10027 and was noticed due to
test_tarfile failing when applying the patch for this issue. An earlier
version of the fix to #10027 included st_ino, but that attribute got lost
in the shuffle of a few review/fix cycles. All tests pass.
2010-11-24 20:24:31 +00:00
Brian Curtin f5e76d01ea Fix #10027. st_nlink not set on Windows calls to os.stat/lstat.
Note: This patch has no tests because as of now there is no way to create
links. #8879 adds that and the tests will go in there. I've manually observed
that existing links on my system function properly with this.
2010-11-24 13:14:05 +00:00
Łukasz Langa e61602fc84 information on Issue #9846 2010-11-23 00:19:53 +00:00
Ezio Melotti 2baf1a69f4 #9424: add a DeprecationWarning for assertEquals, assertNotEquals, assertAlmostEquals, assertNotAlmostEquals, and assert_ 2010-11-22 12:56:58 +00:00
Martin v. Löwis 362976539f Issue #10459: Update CJK character names to Unicode 5.1. 2010-11-22 10:52:58 +00:00
Martin v. Löwis 5cbc71e50a Issue #10459: Update CJK character names to Unicode 6.0. 2010-11-22 09:00:02 +00:00
Senthil Kumaran c8f7bdf326 Merged revisions 86679 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86679 | senthil.kumaran | 2010-11-22 13:08:13 +0800 (Mon, 22 Nov 2010) | 3 lines

  Fix - s/urllib2/urllib.request/
........
2010-11-22 05:11:05 +00:00
Senthil Kumaran 249d7e3c2e Fix - s/urllib2/urllib.request/ 2010-11-22 05:08:13 +00:00
Senthil Kumaran d17ebdba4a Merged revisions 86676 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86676 | senthil.kumaran | 2010-11-22 12:48:26 +0800 (Mon, 22 Nov 2010) | 4 lines

  Fix Issue4493 - urllib2 adds '/' to the path component of url, when it does not
  starts with one. This behavior is exhibited by browser and other clients.
........
2010-11-22 04:53:57 +00:00
Senthil Kumaran c295862ce0 Fix Issue4493 - urllib2 adds '/' to the path component of url, when it does not
starts with one. This behavior is exhibited by browser and other clients.
2010-11-22 04:48:26 +00:00
Brian Curtin f213d2317c Backport the distutils part of r83399 to fix #7645. 2010-11-22 02:04:33 +00:00
Brian Curtin 44c1db05fb Merged revisions 86651 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86651 | brian.curtin | 2010-11-21 17:45:10 -0600 (Sun, 21 Nov 2010) | 5 lines

  Fix #6378. Start IDLE using the proper version of Python based on the directory
  tree that idle.bat resides in.

  Works with any/all versions of Python installed concurrently.
........
2010-11-21 23:48:14 +00:00
Brian Curtin f991642efe Fix #6378. Start IDLE using the proper version of Python based on the directory
tree that idle.bat resides in.

Works with any/all versions of Python installed concurrently.
2010-11-21 23:45:10 +00:00
Michael Foord 086f30815c Issue 10470: 'python -m unittest' launches test discovery by default.(If you need to pass options to test discovery the discover subcommand must still be specified explicitly.) 2010-11-21 21:28:01 +00:00
Senthil Kumaran e4dad4f8e2 Fix issue3709 - BaseHTTPRequestHandler will buffer the headers and write only on end_headers call. 2010-11-21 14:36:14 +00:00
Raymond Hettinger d325c4b233 Revert r86517 2010-11-21 04:08:28 +00:00
Nick Coghlan e0f04659cd Issue #10220: Add inspect.getgeneratorstate(). Initial patch by Rodolpho Eckhardt 2010-11-21 03:44:04 +00:00
Ezio Melotti 19f2aeba67 Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line

  #9424: Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 01:30:29 +00:00
Benjamin Peterson 0b458d52f9 count() should return integers #10474 2010-11-20 22:35:41 +00:00
R. David Murray 650f147298 #10453: compileall now uses argparse instead of getopt, so -h works.
Patch by Michele Orrù.
2010-11-20 21:18:51 +00:00