Commit Graph

11694 Commits

Author SHA1 Message Date
Raymond Hettinger 4bbcb64d5d SF #1693079 Array module cannot pickle empty arrays 2007-04-02 17:03:46 +00:00
Neal Norwitz 93e9384402 Backport 54644:
SF #1685563, MSVCCompiler creates redundant and long PATH strings

If MSVCCompiler.initialize() was called multiple times, the path
would get duplicated.  On Windows, this is a problem because the
path is limited to 4k.  There's no benefit in adding a path multiple
times, so prevent that from occuring.  We also normalize the path
before checking for duplicates so things like /a and /a/ won't both
be stored.
2007-04-01 18:29:47 +00:00
Marc-André Lemburg 530698235d Bump the patch level version of distutils since there were a few bug fixes
since the 2.5.0 release.

Backport of r54615.
2007-03-31 21:02:43 +00:00
Neal Norwitz 65407fb734 Backport 54594:
Fix SF #1688393, sock.recvfrom(-24) crashes

Also fix some method names that were copied incorrectly (trunk fixed).
2007-03-31 18:56:11 +00:00
Martin v. Löwis a8ddae6149 Bug #978833: Revert r50844, as it broke _socketobject.dup. 2007-03-23 13:27:29 +00:00
Žiga Seilnacht e5df857cc3 Bug #1675967: re patterns pickled with older Python versions can
now be unpickled.
 (backport form rev. 54492)
2007-03-21 20:37:39 +00:00
Raymond Hettinger 7ed0a65831 Test and fix fromkeys optional argument. 2007-03-21 20:36:45 +00:00
Georg Brandl 9225f226a3 Bug #1684254: webbrowser now uses shlex to split any command lines
given to get(). It also detects when you use '&' as the last argument
and creates a BackgroundBrowser then.
 (backport -- this is a regression from 2.4 and therefore backported)
2007-03-21 11:52:38 +00:00
Georg Brandl 8a10ea4613 Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
 (backport from rev. 54480)
2007-03-21 09:00:55 +00:00
Raymond Hettinger f94e89c578 Extend work on rev 52962 and 53830 eliminating redundant PyObject_Hash() calls and fixing set/dict interoperability. 2007-03-20 21:45:04 +00:00
Collin Winter 7d9ac78384 Patch #1642547: Fix an error/crash when encountering syntax errors in complex if statements.
Backported from r54404.
2007-03-16 04:12:48 +00:00
Žiga Seilnacht c1b4e8e6e2 Patch #1462488: prevent a segfault in object_reduce_ex() by splitting
the implementation for __reduce__ and __reduce_ex__ into two separate
functions. Fixes bug #931877.
 (backport from rev. 54397)
2007-03-15 11:47:59 +00:00
Georg Brandl 7cd6ef0913 Also commit the patch ;) 2007-03-15 07:43:22 +00:00
Martin v. Löwis 7520df439a Patch #1559413: Fix test_cmd_line if sys.executable contains a space. 2007-03-14 20:02:38 +00:00
Žiga Seilnacht 94c887258c Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
name. Remove a reference leak that happened if the name could not be
converted to string.
 (backport from rev. 54378)
2007-03-14 12:34:30 +00:00
Georg Brandl 027ac24650 Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
 (backport from rev. 54376)
2007-03-14 08:27:57 +00:00
Barry Warsaw 924d148b98 SF bug #1582282; decode_header() incorrectly splits not-conformant RFC
2047-like headers where there is no whitespace between encoded words.  This
fix changes the matching regexp to include a trailing lookahead assertion that
the closing ?= must be followed by whitespace, newline, or end-of-string.
This also changes the regexp to add the MULTILINE flag.
2007-03-14 04:29:06 +00:00
Georg Brandl afa4f485dd Patch #1194449: correctly detect unbound methods in pydoc.
(backport from rev. 54365)
2007-03-13 22:16:43 +00:00
Martin v. Löwis 1300831c48 Patch #1449244: Support Unicode strings in
email.message.Message.{set_charset,get_content_charset}.
2007-03-13 10:24:14 +00:00
Georg Brandl 74fb211445 Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
 (backport from rev. 54331)
2007-03-13 10:19:35 +00:00
Georg Brandl 6cdcdbcdaa Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
 (backport from rev. 54329)
2007-03-13 10:07:01 +00:00
Collin Winter e19d7a3c0a Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Backported from r54291.
2007-03-12 16:49:23 +00:00
Barry Warsaw ef23d7000d Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in the
display name of an email address, e.g.

Foo
\tBar <foo@example.com>

Test case added by Barry.
2007-03-12 03:21:28 +00:00
Collin Winter 98d1a4d727 Patch #1678662: ftp.python.org does not exist. So the testcode in urllib.py must use a more
stable FTP.
Backported from r54278.
2007-03-12 01:57:49 +00:00
Vinay Sajip fbf1f3e602 Fix resource leak reported in SF #1516995. 2007-03-11 18:37:20 +00:00
Collin Winter 3e43bcc78e Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number.
Backport of r54271.
2007-03-11 16:04:01 +00:00
Georg Brandl d28d9c8221 Add missing "return" statements in exception handler.
(backport from rev. 54268)
2007-03-11 08:28:50 +00:00
Collin Winter 69fe9e478f Convert an assert to a raise so it works even in the presence of -O. 2007-03-10 14:35:22 +00:00
Georg Brandl 237458b2bf Revert rev. 54198, it's not really backwards compatible. 2007-03-10 08:06:14 +00:00
Collin Winter 86d8d3520d Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket. Fixed by patch #1545011.
Backported from r54253.
2007-03-10 03:31:44 +00:00
Thomas Heller 8bf469ddc1 Merged revisions 54248 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r54248 | thomas.heller | 2007-03-09 21:39:22 +0100 (Fr, 09 Mär 2007) | 7 lines

  Bug #1651235: When a tuple was passed to a ctypes function call,
  Python would crash instead of raising an error.

  The crash was caused by a section of code that should have been
  removed long ago, at that time ctypes had other ways to pass
  parameters to function calls.
........
2007-03-09 20:48:57 +00:00
Thomas Heller f7eed5e2d1 Merged revisions 54244 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r54244 | thomas.heller | 2007-03-09 20:21:28 +0100 (Fr, 09 Mär 2007) | 3 lines

  Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
  returned string up to the first NUL character.
........
2007-03-09 20:21:16 +00:00
Brett Cannon afd9b2b54d Manual backport of r54233. This will help prevent spurious Buildbot failures
by HTTPS connections that time out.
2007-03-09 04:57:00 +00:00
Raymond Hettinger 1622d82c08 SF #1637850: make_table in difflib did not work with unicode 2007-03-08 21:30:55 +00:00
Collin Winter 590af0a7c9 Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order. 2007-03-08 19:58:46 +00:00
Raymond Hettinger 154bc7c9bd SF 1676321: empty() returned wrong result 2007-03-08 19:23:25 +00:00
Georg Brandl 0c4f3fda50 Backport skipping fromtimestamp(negative value) tests on Windows (from rev. 54209) 2007-03-07 16:12:05 +00:00
Georg Brandl d480b3370b backport rev. 54207: add a few sanity checks in unittest.TestSuite.addTest(s). 2007-03-07 11:55:25 +00:00
Georg Brandl 84a0b8d4b6 Patch #1001604: glob.glob() now returns unicode filenames if it was
given a unicode argument and os.listdir() returns unicode filenames.
 (backport from rev. 54197)
2007-03-07 08:32:24 +00:00
Georg Brandl fd13ef9c9c Patch #812285: allow multiple auth schemes in AbstractBasicAuthHandler.
(backport from rev. 54195)
2007-03-07 07:39:13 +00:00
Walter Dörwald 05b5c7fe0e Backport checkin:
Patch for bug #1633621: if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.
2007-03-06 20:46:26 +00:00
Georg Brandl 62b1b001e6 Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.
 (backport from rev. 54177)
2007-03-06 19:00:09 +00:00
Georg Brandl ffb0a804c6 Patch #1638879: don't accept strings with embedded NUL bytes in long().
(backport from rev. 54173)
2007-03-06 18:44:35 +00:00
Georg Brandl 02d7cffb8f Patch #1646728: datetime.fromtimestamp fails with negative
fractional times.  With unittest.
  (backport from rev. 54167 by Guido)
2007-03-06 17:46:17 +00:00
Georg Brandl 1a74b4325c A test case for the defaultdict KeyError bug.
(backport from rev. 54162)
2007-03-06 13:35:08 +00:00
Georg Brandl 8da6f1b668 Patch #1672481: fix bug in idlelib.MultiCall.
(backport from rev. 54156)
2007-03-06 11:52:33 +00:00
Georg Brandl 0520e03d0f A test case for the fix in #1674228.
(backport from rev. 54154)
2007-03-06 11:51:27 +00:00
Georg Brandl 0ea891603d Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.
 (backport from rev. 54139)
2007-03-05 22:28:13 +00:00
Georg Brandl 131069b3a0 Fix a bug in test_dict and test_userdict, found at the PyPy sprint.
(backport from rev. 54114)
2007-03-04 17:19:02 +00:00
Raymond Hettinger d882e36f45 Fix constantification of None. 2007-03-02 19:19:05 +00:00
Thomas Wouters 25e7cfa4b9 Backported r51621 from p3yk:
Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
2007-02-25 22:15:04 +00:00
Raymond Hettinger 1bff796983 Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash(). 2007-02-19 03:04:45 +00:00
Martin v. Löwis 497380f48c Revert r53672. 2007-02-18 08:54:32 +00:00
Vinay Sajip 0c2552c073 Minor fix for currentframe (SF #1652788). 2007-02-17 01:37:50 +00:00
Martin v. Löwis ef67690eac Patch #685268: Consider a package's __path__ in imputil. 2007-02-13 08:35:01 +00:00
Martin v. Löwis 626b2e992f Patch 1463026: Support default namespace in XMLGenerator.
Fixes #847665.
2007-02-12 12:21:41 +00:00
Skip Montanaro 4a67a67416 backport: fix trace.py --ignore-dir 2007-02-11 18:41:56 +00:00
Martin v. Löwis 523539de5e Bug #1600860: Search for shared python library in LIBDIR, not
lib/python/config, on "linux" and "gnu" systems.
2007-02-09 12:37:12 +00:00
Martin v. Löwis 2e8b602ac1 Bug #1653736: Complain about keyword arguments to time.isoformat. 2007-02-08 09:13:51 +00:00
Raymond Hettinger 0bafda4546 Fix docstring bug 2007-02-08 01:37:18 +00:00
Raymond Hettinger 9f0e1ea964 Do not let overflows in enumerate() and count() pass silently. 2007-02-07 23:57:05 +00:00
Raymond Hettinger 127ef44c7b Bug #1575169: operator.isSequenceType() now returns False for subclasses of dict. 2007-02-07 22:12:01 +00:00
Raymond Hettinger 113776c411 Check for a common user error with defaultdict(). 2007-02-07 21:40:49 +00:00
Raymond Hettinger 20dcf1cb9d SF #1615701: make d.update(m) honor __getitem__() and keys() in dict subclasses 2007-02-07 20:01:28 +00:00
Peter Astrand 39e23b2bfa Applied patch 1124861.3.patch to solve bug #1124861: Automatically create pipes on Windows, if GetStdHandle fails. Backport from rev 53646. 2007-02-06 15:41:46 +00:00
Georg Brandl cd7a78e0a4 [Patch #783050 from Patrick Lynch] The emulation of forkpty() is incorrect;
the master should close the slave fd.

Added a test to test_pty.py that reads from the master_fd after doing
a pty.fork(); without the fix it hangs forever instead of raising an
exception.  (<crossing fingers for the buildbots>)

Backport from trunk rev. 53146.
2007-01-31 07:48:49 +00:00
Georg Brandl 20aa477a2d Patch #1638243: the compiler package is now able to correctly compile
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
 (backport from rev. 53575)
2007-01-27 17:43:07 +00:00
Brett Cannon 6d8e5ad09d Backport fix for bug #1643943. 2007-01-25 23:22:24 +00:00
Brett Cannon 75ba075110 If you created a weakref in an object's __del__ method to itself it would
segfault the interpreter during weakref clean up.  Now any new weakrefs created
after __del__ is run are removed silently.

Fixes bug #1377858 and the weakref_in_del crasher for new-style classes.
Classic classes are still affected.
2007-01-23 22:41:20 +00:00
Georg Brandl 1e4bb44048 Bug #1627316: handle error in condition/ignore pdb commands more gracefully.
(backport from rev. 53524)
2007-01-22 21:23:45 +00:00
Georg Brandl 742e39296a Bug #1249573: fix rfc822.parsedate not accepting a certain date format
(backport from rev. 53522)
2007-01-22 21:10:43 +00:00
Andrew M. Kuchling f446a9b00a [Bug #1633678] Improve pattern used for mbox 'From' lines; add a simple test 2007-01-22 20:49:44 +00:00
Andrew M. Kuchling a0a133bea8 Make comment match the code 2007-01-22 20:31:15 +00:00
Peter Astrand bb6a0edce1 Avoid O(N**2) bottleneck in _communicate_(). Fixes #1598181. Backport from rev. 53295. 2007-01-21 15:45:25 +00:00
Georg Brandl 962e9165aa Patch #1627441: close sockets properly in urllib2.
(backport from rev. 53511)
2007-01-21 10:35:14 +00:00
Georg Brandl 8e932e7d68 Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
 (backport from rev. 53509)
2007-01-21 10:28:56 +00:00
Raymond Hettinger 3b77d3d9a7 SF# 1635892: Fix docs for betavariate's input parameters . 2007-01-19 18:03:13 +00:00
Thomas Heller 225755dc36 Merged revisions 53402 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r53402 | thomas.heller | 2007-01-12 21:17:34 +0100 (Fr, 12 Jan 2007) | 6 lines

  patch #1610795: BSD version of ctypes.util.find_library, by Martin
  Kammerhofer.

  Backported from trunk.
........
2007-01-17 19:53:24 +00:00
Peter Astrand 29794ecd43 Fix for bug #1634343: allow specifying empty arguments on Windows 2007-01-13 22:37:11 +00:00
Raymond Hettinger 535989ecb6 SF #1486663 -- Allow keyword args in subclasses of set() and frozenset(). 2007-01-11 18:21:04 +00:00
Matthias Klose 9e031c7c9d - idle: Honor the "Cancel" action in the save dialog (Debian bug #299092). 2007-01-11 11:42:43 +00:00
Thomas Heller 5131925034 Change the ctypes version number to "1.0.2". 2007-01-10 20:07:29 +00:00
Thomas Heller 346085eb87 Merged revisions 53316 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r53316 | thomas.heller | 2007-01-09 20:19:33 +0100 (Di, 09 Jan 2007) | 4 lines

  Verify the sizes of the basic ctypes data types against the struct
  module.

  Backport from trunk.
........
2007-01-09 19:52:31 +00:00
Raymond Hettinger 5b44cbe6d8 Fix zero-length corner case for iterating over a mutating deque. 2007-01-08 18:05:53 +00:00
Vinay Sajip f96725af8b Backported changes from trunk:
Made func argument in LogRecord.__init__ optional.
Improved performance of _fixupChildren.
2007-01-08 10:12:29 +00:00
Vinay Sajip 977061142d Backported change from trunk:
Made SysLogHandler more resilient in the face of syslogd failures.
2007-01-08 10:11:58 +00:00
Peter Astrand 6cdc34672c Re-implemented fix for #1531862 once again, in a way that works with Python 2.2. Fixes bug #1603424. 2007-01-07 09:00:11 +00:00
Andrew M. Kuchling 3b015c46a5 [Bug #1622533] Make docstrings raw strings because they contain control characters (\0, \1) 2007-01-05 14:24:36 +00:00
Gregory P. Smith 1a050f5f52 support linking the _bsddb extension module against BerkeleyDB 4.5
[backport of r53252]
2007-01-05 02:09:06 +00:00
Martin v. Löwis bea1c70144 Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
to avoid relying on atexit.
2007-01-04 21:06:57 +00:00
Raymond Hettinger ca516d21ab Fix stability of heapq's nlargest() and nsmallest(). 2007-01-04 17:53:16 +00:00
Raymond Hettinger 9cdf70399f For sets with cyclical reprs, emit '...' instead of recursing. 2006-12-29 18:49:13 +00:00
Thomas Wouters 04e820443b Backport trunk checkin r51565:
Fix SF bug #1545837: array.array borks on deepcopy. array.__deepcopy__()
needs to take an argument, even if it doesn't actually use it.
2006-12-29 14:42:17 +00:00
Neal Norwitz e38ecee5c3 SF bug #1623890, fix argument name in docstring 2006-12-29 03:01:06 +00:00
Lars Gustäbel f9a2c63c79 Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
Backport from rev. 53161.
2006-12-27 10:36:58 +00:00
Lars Gustäbel 12e087a1b1 Patch #1262036: Prevent TarFiles from being added to themselves under
certain conditions.

(backport from rev. 53155)

Moved message from my previous change to the right place in
Misc/NEWS.
2006-12-23 18:13:57 +00:00
Lars Gustäbel aedb92e59c Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
work correctly together with readline().

(backport from rev. 53153)
2006-12-23 16:51:47 +00:00
Andrew M. Kuchling 60775f29de [Patch #827559 from Chris Gonnerman] Make SimpleHTTPServer redirect when a directory URL is missing the trailing slash; this lets relative links work. 2006-12-22 19:08:41 +00:00
Andrew M. Kuchling bbad84b41a [Bug #737202; fix from Titus Brown] Make CGIHTTPServer work for scripts in sub-directories 2006-12-22 13:28:43 +00:00
Raymond Hettinger 5425a67331 Bug #1590891: random.randrange don't return correct value for big number 2006-12-20 07:43:59 +00:00