Commit Graph

36487 Commits

Author SHA1 Message Date
Brett Cannon d3a81df178 Backport of r59082 (doctest and using __loader__.get_data()). 2007-11-21 00:58:54 +00:00
Christian Heimes 946a51c187 Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress 2007-11-21 00:44:57 +00:00
Brett Cannon 6b5c14fe78 Remove an old SF reference. 2007-11-19 18:56:54 +00:00
Walter Dörwald f481598cd0 Backport r59049:
Fix for #1444: utf_8_sig.StreamReader was (indirectly through decode())
calling codecs.utf_8_decode() with final==True, which falled with incomplete
byte sequences. Fix and test by James G. Sack.
2007-11-19 12:43:39 +00:00
Walter Dörwald ad91c78698 Backport r59047: Fix typo in comment. 2007-11-19 12:23:44 +00:00
Guido van Rossum e15fab4298 Backport revision 58471, replace PyErr_Print() with PyErr_Clear(). 2007-11-15 20:39:53 +00:00
Amaury Forgeot d'Arc c572dc3752 Backport for issue1265 (pdb bug with "with" statement).
When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set.  This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.

It is necessary to save/restore the exception around the call to the trace
function.

This happens a lot with py3k: isinstance() of an ABCMeta instance runs
    def __instancecheck__(cls, instance):
        """Override for isinstance(instance, cls)."""
        return any(cls.__subclasscheck__(c)
                   for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.

And the problem can be reproduced in 2.5 with pure python code.
2007-11-13 22:43:05 +00:00
Guido van Rossum f5ccd459d7 News about list_repeat() fix. 2007-11-13 05:23:21 +00:00
Guido van Rossum 809123c61f Issue 1704621. Fix segfaults in list_repeat() and list_inplace_repeat().
The C changes aren't quite the same as the patch given there; the test is.
2007-11-12 20:04:41 +00:00
Christian Heimes 50bbcc27e3 Fixed #1254: pdb fails to launch some script. 2007-11-12 17:28:45 +00:00
Walter Dörwald ad7363bed1 Backport r58942:
Fix TextCalendar.prweek(). This closes issue #1427.
2007-11-12 10:03:39 +00:00
Christian Heimes d66350ad58 Fix for #1427: Error in standard module calendar
merge -r58935:58936 ../trunk
2007-11-12 01:25:08 +00:00
Fred Drake c2e0e077fb when talking about an imminent 2.5.2c1, the build should identify itself
as being some form of 2.5.2 (this is admittedly a bit conservative);
we can make this 2.5.2c1 when making the release
2007-11-09 16:53:20 +00:00
Nick Coghlan e53fcfd7d3 Fix issue #1705170 (backport from trunk) 2007-11-07 12:26:40 +00:00
Gregory P. Smith 2e49f781cb * fix failing test_recno.py - backport from trunk.
* bump _bsddb patch version number.
2007-11-07 07:25:20 +00:00
Guido van Rossum e6a6f39cc7 Backport r58892.
Add missing "return NULL" in overflow check in PyString_Repr().
2007-11-07 01:19:49 +00:00
Gregory P. Smith a1e5387ec5 Backport r58868:
Fixes Issue 1385: The hmac module now computes the correct hmac when using
  hashes with a block size other than 64 bytes (such as sha384 and sha512).
2007-11-06 00:32:04 +00:00
Skip Montanaro ca74140051 Note change to get_dialect semantics in 2.5. 2007-11-04 15:57:43 +00:00
Georg Brandl 1dcb9c93fd Backport r58709 from trunk:
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
Also fixes #1098.
2007-11-02 22:46:38 +00:00
Gregory P. Smith 2c3e0d94b2 Backport r58757, r58758, r58759.
Undoes incorrect dbtables fix and errant strdup introduced as
described below:

r58757 | gregory.p.smith | 2007-11-01 14:08:14 -0700 (Thu, 01 Nov 2007) | 4 lines

Fix bug introduced in revision 58385.  Database keys could no longer
have NULL bytes in them.  Replace the errant strdup with a
malloc+memcpy.  Adds a unit test for the correct behavior.

r58758 | gregory.p.smith | 2007-11-01 14:15:36 -0700 (Thu, 01 Nov 2007) | 3 lines

Undo revision 58533 58534 fixes.  Those were a workaround for
a problem introduced by 58385.

r58759 | gregory.p.smith | 2007-11-01 14:17:47 -0700 (Thu, 01 Nov 2007) | 2 lines

false "fix" undone as correct problem was found and fixed.
2007-11-01 21:22:40 +00:00
Georg Brandl bf75c5133d #1364: os.lstat is available on Windows too, as an alias to os.stat. 2007-11-01 17:19:36 +00:00
Raymond Hettinger cf81e06959 Sets are marshalable. 2007-10-31 22:16:25 +00:00
Raymond Hettinger 9afdaffa33 Clarify the reasons why pickle is almost always better than marshal 2007-10-31 22:02:21 +00:00
Matthias Klose 9b12e0019e - Build using system ffi library on arm*-linux*, pass --with-system-ffi to CONFIG_ARGS 2007-10-25 06:38:01 +00:00
Matthias Klose e467dbc3d0 - Build using system ffi library on arm*-linux*. 2007-10-24 20:34:07 +00:00
Vinay Sajip 5d512fa2e4 Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__() 2007-10-24 10:49:50 +00:00
Neal Norwitz 4b2a6dbf60 Backport 58618:
Issue 1307 by Derek Shockey, fix the same bug for RCPT.
2007-10-24 03:52:50 +00:00
Neal Norwitz 4aa5f4bc5a Bug #1313, fix typo (wrong variable name) in example. 2007-10-23 05:42:38 +00:00
Neal Norwitz 1046af6f59 Backport 58594:
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
2007-10-23 05:35:11 +00:00
Georg Brandl 35a9f908c8 Backport r58545. 2007-10-19 17:39:18 +00:00
Georg Brandl 051aa77305 Backport r58542. 2007-10-19 12:34:20 +00:00
Gregory P. Smith dd4b025ad8 Backport 58539: squelch the warning that this test is intended to raise. 2007-10-19 07:35:22 +00:00
Gregory P. Smith 0dcc3cc949 Backport 58532, 58533, 58534:
- Fix bsddb.dbtables: Don't randomly corrupt newly inserted rows by
   picking a rowid string with null bytes in it.  Such rows could not
   later be deleted, modified or individually selected.  Existing
   bsdTableDb databases created with such rows are out of luck.
 - Use mkdtemp for the test_dbtables test database environment and
   clean it up afterwards using shutil.rmtree.
2007-10-18 17:15:20 +00:00
Gregory P. Smith 574e1ba814 Backport 58450: fix uncollectable reference leak in bsddb.db.DBShelf.append 2007-10-13 23:05:54 +00:00
Georg Brandl 57da2de9b1 Fix email example. 2007-10-13 13:19:45 +00:00
Gregory P. Smith 137bdfa27a Merge trunk 58434:
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic.  Also adds a test case for RECNO dbs
to test_dbshelve.
2007-10-12 18:49:36 +00:00
Brett Cannon 8012e9c2f7 Silence a compiler warning about a function definition not being a prototype. 2007-10-12 17:41:08 +00:00
Martin v. Löwis d79fa9e504 Bug #1216: Restore support for Visual Studio 2002. 2007-10-12 08:58:48 +00:00
Thomas Heller d6f638188f Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
2007-10-12 06:53:32 +00:00
Neal Norwitz 163048ed12 Backport 58424:
Fix Coverity 185-186:  If the passed in FILE is NULL, uninitialized memory
would be accessed.
2007-10-12 03:59:09 +00:00
Gregory P. Smith 7d9c00ec4f Backport 58385 from trunk: fix a double free bug in the _bsddb module
on DBCursor.get (and a friends) when passing in a string key.
2007-10-09 07:25:24 +00:00
Gregory P. Smith 381e1a46cd Backport rev 58343: fix DBSequence.get_key() to not crash/fail/etc. 2007-10-06 16:05:18 +00:00
Gregory P. Smith 76ee2272ff Backport 58348: use a reliable host in the test. 2007-10-06 15:55:25 +00:00
Gregory P. Smith 4a08ec3db3 Backport 58344: allow BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module 2007-10-06 08:11:29 +00:00
Neal Norwitz c9f22b954f Backport 58332: Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
2007-10-05 05:05:24 +00:00
Neal Norwitz 14f848bb22 Backport 58330:
Fix Coverity #158: Check the correct variable.
2007-10-05 03:45:42 +00:00
Fred Drake 0ac4b27be8 move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
2007-10-05 03:12:00 +00:00
Georg Brandl 2f2bd3efd5 #1196: document default radix for int(). 2007-09-24 17:58:18 +00:00
Georg Brandl cdceeb814d Fix -- being converted to - in HTML. #1186. 2007-09-24 17:56:12 +00:00
Georg Brandl dfecfdb23e Fix #1169: remove docstrings in functions for -OO.
(backport from rev. 58204)
2007-09-19 06:37:26 +00:00