Commit Graph

11668 Commits

Author SHA1 Message Date
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
Andrew M. Kuchling df6994db84 [Patch #1600491 from Jim Jewett] Describe how to build help files on Windows 2006-12-19 15:19:14 +00:00
Andrew M. Kuchling 0faf90acc4 [Patch #1617413 from Dug Song] Fix HTTP Basic authentication via HTTPS 2006-12-19 15:12:23 +00:00
Andrew M. Kuchling a75d31619c [Patch #1599256 from David Watson] check that os.fsync is available before using it 2006-12-14 18:59:07 +00:00
Vinay Sajip 4d7ad63210 Stripped whitespace from comma-separated values read from config file 2006-12-14 08:41:39 +00:00
Georg Brandl 9e2423ae8f Move errno imports back to individual functions.
(backport from rev. 52996)
2006-12-11 07:56:43 +00:00
Georg Brandl 2bcf0154d5 Patch #1608267: fix a race condition in os.makedirs() is the directory
to be created is already there.
 (backport from rev. 52972)
2006-12-09 09:10:18 +00:00
Thomas Heller db386544ed Print the results of ctypes.util.find_library("c") and
ctypes.util.find_library("m") so that we can see if it works on the
buildbots.
2006-12-08 20:44:19 +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
Matthias Klose fa713e18f6 - Fix build failure on kfreebsd and on the hurd. 2006-12-03 17:13:54 +00:00
Raymond Hettinger 1c305dbf97 Fix nit in comment. 2006-12-02 01:57:21 +00:00
Georg Brandl 2286441a81 Bug #1603321: make pstats.Stats accept Unicode file paths.
(backport from rev. 52845)
2006-11-26 19:27:51 +00:00
Thomas Heller 558e56d599 Fix bug #1598620: A ctypes structure cannot contain itself.
Backport from trunk.
2006-11-24 19:00:39 +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
Neal Norwitz 88b5d2bf30 Oops, convert tabs to spaces 2006-11-21 05:49:41 +00:00
Neal Norwitz 5890a6a8a6 Backport of 52811:
Bug #1599782: Fix segfault on bsddb.db.DB().type().

The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.
2006-11-21 05:29:34 +00:00
Andrew M. Kuchling bb4e6dcff5 Jython compatibility fix: if uu.decode() opened its output file, be sure to
close it.
2006-11-20 13:39:57 +00:00
Andrew M. Kuchling 90e23c4769 Add extra SHA tests 2006-11-20 13:31:09 +00:00
Martin v. Löwis 0e64202fd7 Patch #1472877: Fix Tix subwidget name resolution. 2006-11-18 18:42:22 +00:00
Martin v. Löwis e350c840b3 Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.
2006-11-18 18:05:57 +00:00
Martin v. Löwis ce9212f018 Patch #1538878: Don't make tkSimpleDialog dialogs transient if
the parent window is withdrawn. This mirrors what dialog.tcl
does.
2006-11-18 18:00:34 +00:00
Andrew M. Kuchling 830358af09 Remove locking of individual message files in MH.pack().
[Backport of rev52776 from the trunk.]
2006-11-17 16:16:28 +00:00
Georg Brandl dd3bffb679 Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
 (backport from rev. 52765)
2006-11-16 17:08:48 +00:00
Martin v. Löwis 962e4317bc Patch #1360200: Use unmangled_version RPM spec field to deal with
file name mangling.
2006-11-12 18:56:18 +00:00
Martin v. Löwis 867ef13436 Patch #1359217: Ignore 2xx response before 150 response. 2006-11-12 18:48:30 +00:00
Phillip J. Eby 511350bee9 Fix SF#1566719: not creating site-packages (or other target directory) when
installing .egg-info for a project that contains no modules or packages,
while using --root (as in bdist_rpm).  (Backport from trunk)
2006-11-10 17:13:29 +00:00