Commit Graph

4286 Commits

Author SHA1 Message Date
Ž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
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
Vinay Sajip fbf1f3e602 Fix resource leak reported in SF #1516995. 2007-03-11 18:37:20 +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
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
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
Georg Brandl 0c4f3fda50 Backport skipping fromtimestamp(negative value) tests on Windows (from rev. 54209) 2007-03-07 16:12:05 +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
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 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
Martin v. Löwis 626b2e992f Patch 1463026: Support default namespace in XMLGenerator.
Fixes #847665.
2007-02-12 12:21:41 +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 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
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
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
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
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
Raymond Hettinger 5b44cbe6d8 Fix zero-length corner case for iterating over a mutating deque. 2007-01-08 18:05:53 +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
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
Raymond Hettinger 5425a67331 Bug #1590891: random.randrange don't return correct value for big number 2006-12-20 07:43:59 +00:00
Raymond Hettinger 775ebe29a5 Backport fixes to set objects:
rev 52964 sf 1576657 KeyError unpacks tuple arguments
rev 52963 sf 1456209 obscure resizing vulnerability
rev 52962 redundant calls to PyObject_Hash()
2006-12-08 18:12:24 +00:00
Georg Brandl 25f58f6b5a Patch #1610437: fix a tarfile bug with long filename headers.
(backport from rev. 52938)
2006-12-06 22:21:23 +00:00
Walter Dörwald 9ff1d39402 Backport checkin:
Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))
SF bug #1601501.
2006-11-23 05:06:31 +00:00
Andrew M. Kuchling 90e23c4769 Add extra SHA tests 2006-11-20 13:31:09 +00:00