]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Martin v. Löwis [Wed, 4 Oct 2006 05:48:05 +0000 (05:48 +0000)]
Fix integer negation and absolute value to not rely
on undefined behaviour of the C compiler anymore.
Barry Warsaw [Wed, 4 Oct 2006 02:05:15 +0000 (02:05 +0000)]
decode_rfc2231(): As Christian Robottom Reis points out, it makes no sense to
test for parts > 3 when we use .split(..., 2).
Andrew M. Kuchling [Tue, 3 Oct 2006 19:39:54 +0000 (19:39 +0000)]
[Backport r51252 | neal.norwitz]
It's very unlikely, though possible that source is not a string. Verify
that PyString_AsString() returns a valid pointer. (The problem can
arise when zlib.decompress doesn't return a string.)
Klocwork 346
Andrew M. Kuchling [Tue, 3 Oct 2006 19:33:56 +0000 (19:33 +0000)]
[backport r51253 | neal.norwitz]
Handle failures from lookup.
Klocwork 341-342
Andrew M. Kuchling [Tue, 3 Oct 2006 19:30:04 +0000 (19:30 +0000)]
[Backport r51033 | neal.norwitz]
Prevent memory leak on error.
Reported by Klocwork #36
Andrew M. Kuchling [Tue, 3 Oct 2006 19:27:00 +0000 (19:27 +0000)]
[Backport r50858 | neal.norwitz]
No functional change. Add comment and assert to describe why there
cannot be overflow which was reported by Klocwork. Discussed on
python-dev.
Andrew M. Kuchling [Tue, 3 Oct 2006 19:22:30 +0000 (19:22 +0000)]
[Backport r50782 | neal.norwitz]
nextlink can be NULL if teedataobject_new fails, so use XINCREF.
Ensure that dataobj is never NULL.
Reported by Klocwork #102
Andrew M. Kuchling [Tue, 3 Oct 2006 19:18:33 +0000 (19:18 +0000)]
[Partial backport of r50777 | neal.norwitz]
Handle more mem alloc issues found with failmalloc
[The other half of this patch affected Python/symtable.c, and wasn't
relevant for the 2.4 branch. --amk]
Andrew M. Kuchling [Tue, 3 Oct 2006 19:11:32 +0000 (19:11 +0000)]
[Backport r51443 | neal.norwitz]
Handle a few more error conditions.
Klocwork 301 and 302. Will backport.
Andrew M. Kuchling [Tue, 3 Oct 2006 19:08:48 +0000 (19:08 +0000)]
[Backport r51231 | neal.norwitz]
PyModule_GetDict() can fail, produce fatal errors if this happens on startup.
Klocwork #298-299.
Andrew M. Kuchling [Tue, 3 Oct 2006 19:07:06 +0000 (19:07 +0000)]
[Backport r51230 | neal.norwitz]
Check return of PyMem_MALLOC (garbage) is non-NULL.
Check seq in both portions of if/else.
Klocwork #289-290.
Andrew M. Kuchling [Tue, 3 Oct 2006 19:02:58 +0000 (19:02 +0000)]
[Backport r51229 | neal.norwitz]
Don't deref v if it's NULL.
Klocwork #214
Andrew M. Kuchling [Tue, 3 Oct 2006 18:55:06 +0000 (18:55 +0000)]
[Backport r50781 | neal.norwitz]
Fix memory leaks spotted by Klocwork #37.
Andrew M. Kuchling [Tue, 3 Oct 2006 18:52:07 +0000 (18:52 +0000)]
[Backport r50779 | neal.norwitz]
Move the initialization of size_a down below the check for a being NULL.
Reported by Klocwork #106.
[Slight change required: in 2.5 Py_ssize_t is used, but 2.4 uses int.]
Andrew M. Kuchling [Tue, 3 Oct 2006 18:43:28 +0000 (18:43 +0000)]
[Backport r50683 | neal.norwitz]
Stop INCREFing name, then checking if it's NULL. name (f_name) should never
be NULL so assert it. Fix one place where we could have passed NULL.
Reported by Klocwork #66.
Andrew M. Kuchling [Tue, 3 Oct 2006 18:40:23 +0000 (18:40 +0000)]
[Backport r50680 | neal.norwitz]
Handle a NULL name properly.
Andrew M. Kuchling [Tue, 3 Oct 2006 18:34:29 +0000 (18:34 +0000)]
[Backport r51256 | neal.norwitz]
Handle malloc failure.
Klocwork 281
Andrew M. Kuchling [Tue, 3 Oct 2006 18:32:25 +0000 (18:32 +0000)]
[Backport r50678 | neal.norwitz]
Fix memory leak under some conditions.
Reported by Klocwork, #98.
Andrew M. Kuchling [Tue, 3 Oct 2006 18:29:35 +0000 (18:29 +0000)]
[Backport r50677 | neal.norwitz]
Fix memory leaks in some conditions.
Reported by Klocwork #152.
Andrew M. Kuchling [Tue, 3 Oct 2006 18:25:19 +0000 (18:25 +0000)]
[Backport rev. 42545 by georg.brandl]
Make staticmethod and classmethod complain about keyword args.
Andrew M. Kuchling [Tue, 3 Oct 2006 14:07:53 +0000 (14:07 +0000)]
[Backport rev. 47010 by neal.norwitz]
Fix memory leak reported by valgrind while running test_subprocess
Andrew M. Kuchling [Tue, 3 Oct 2006 13:08:57 +0000 (13:08 +0000)]
[Backport rev. 51728 by neal.norwitz]
Patch #
1540470 , for OpenBSD 4.0. Backport candidate for 2.[34].
Andrew M. Kuchling [Tue, 3 Oct 2006 13:04:29 +0000 (13:04 +0000)]
[Backport rev. 51669 by brett.cannon]
Make sure memory is properly cleaned up in file_init.
Backport candidate.
Andrew M. Kuchling [Tue, 3 Oct 2006 12:58:52 +0000 (12:58 +0000)]
[Backport rev. 47171 by neal.norwitz]
Another problem reported by Coverity. Backport candidate.
Martin v. Löwis [Mon, 2 Oct 2006 15:24:15 +0000 (15:24 +0000)]
Guard uintptr_t test with HAVE_STDINT_H, test for
stdint.h.
Martin v. Löwis [Mon, 2 Oct 2006 14:56:30 +0000 (14:56 +0000)]
Fix test for uintptr_t. Fixes #
1568842 .
Georg Brandl [Sat, 30 Sep 2006 14:48:03 +0000 (14:48 +0000)]
Back out r52076, it's causing the buildbots to fail because of test_charmapcodec.
Georg Brandl [Sat, 30 Sep 2006 11:22:31 +0000 (11:22 +0000)]
Bug #
1446043 : correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
(backport from rev. 52075)
Georg Brandl [Sat, 30 Sep 2006 11:17:39 +0000 (11:17 +0000)]
Bug #
1556784 : allow format strings longer than 127 characters in
datetime's strftime function.
(backport from rev. 52072)
Georg Brandl [Sat, 30 Sep 2006 11:06:51 +0000 (11:06 +0000)]
Bug #
1560617 : in pyclbr, return full module name not only for classes,
but also for functions.
(backport from rev. 52069)
Georg Brandl [Sat, 30 Sep 2006 09:13:25 +0000 (09:13 +0000)]
Bug #
1566602 : correct failure of posixpath unittest when $HOME ends
with a slash.
(backport from rev. 52065)
Georg Brandl [Sat, 30 Sep 2006 08:43:35 +0000 (08:43 +0000)]
Patch #
1567691 : super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
(backport from rev. 52058)
Georg Brandl [Sat, 30 Sep 2006 07:24:53 +0000 (07:24 +0000)]
Bug #
1567375 : a minor logical glitch in example description.
(backport from rev. 52053)
Gregory P. Smith [Sat, 30 Sep 2006 06:09:07 +0000 (06:09 +0000)]
wording change
Andrew M. Kuchling [Fri, 29 Sep 2006 18:30:59 +0000 (18:30 +0000)]
[Backport rev. 46882 by neal.norwitz]
Fix the socket tests so they can be run concurrently. Backport candidate
Andrew M. Kuchling [Fri, 29 Sep 2006 18:23:33 +0000 (18:23 +0000)]
Typo fix from rev. 46879
Andrew M. Kuchling [Fri, 29 Sep 2006 18:22:07 +0000 (18:22 +0000)]
[Backport rev. 46878 by neal.norwitz]
Don't leak the list object if there's an error allocating the item
storage. Backport candidate.
Andrew M. Kuchling [Fri, 29 Sep 2006 17:57:58 +0000 (17:57 +0000)]
[Backport rev. 39743 by lemburg]
Bug fix for [
1331062 ] utf 7 codec broken.
Backport candidate.
Andrew M. Kuchling [Fri, 29 Sep 2006 17:52:32 +0000 (17:52 +0000)]
[Backport rev. 41696 by neal.norwitz]
Fix an int/long mismatch identified here:
http://www.tortall.net/mu/blog/2005/12/01
Pointed out from SF #
1365916 .
Backport candidate.
Andrew M. Kuchling [Fri, 29 Sep 2006 17:42:30 +0000 (17:42 +0000)]
[Backport rev39767 by nnorwitz]
Free coding spec (cs) if there was an error to prevent mem leak.
Maybe backport candidate.
[Bugfix seems applicable to 2.4 to me. --amk]
Andrew M. Kuchling [Fri, 29 Sep 2006 12:47:00 +0000 (12:47 +0000)]
[Backport rev.39739 by nnorwitz]
SF bug #
1328915 , try to word kill a bit more generically. Backport candidate.
Andrew M. Kuchling [Fri, 29 Sep 2006 12:44:26 +0000 (12:44 +0000)]
[Backport rev 39653 by nnorwitz]
SF Bug # 941346, AIX shared library fix
Since I can't test this, I'm just adding a comment. If we get access
to AIX boxes, we can test this and really resolve. Anyone from IBM
want to offer help?
Backport candidate I suppose.
Andrew M. Kuchling [Fri, 29 Sep 2006 12:41:36 +0000 (12:41 +0000)]
[Backport rev. 39645 by nnorwitz]
SF patch #
1227568 , bug #
1219273 , Expression AST node not documented.
Backport candidate if anyone cares.
Andrew M. Kuchling [Thu, 28 Sep 2006 17:16:25 +0000 (17:16 +0000)]
[Backport rev. 39135 by mwh]
Fix bug
[
1232517 ] OverflowError in time.utime() causes strange traceback
A needed error check was missing.
(Actually, this error check may only have become necessary in fairly
recent Python, not sure).
Backport candidate.
[A few lines below the code in 2.4 touched by the patch, there's already
a similar check of (intval == -1 && PyErr_Occurred()), so I think
this function can already report such errors, and therefore the fix
still applies. Perhaps Michael can clarify what he was referring to. --amk]
Andrew M. Kuchling [Thu, 28 Sep 2006 17:08:01 +0000 (17:08 +0000)]
[Backport rev.39030 by nascheme]
Add missing INCREF.
Andrew M. Kuchling [Thu, 28 Sep 2006 17:05:18 +0000 (17:05 +0000)]
[Backport rev. 39012 by mwh]
Add a missing incref.
Andrew M. Kuchling [Wed, 27 Sep 2006 19:37:27 +0000 (19:37 +0000)]
[Backport rev. 38534 by loewis]
[Possibly controversial because it adds a parameter to a method.
This parameter isn't documented, however, so arguably it's a private
detail, and the fix is necessary to make GzipFile.flush() behave more
similarly to regular file object.]
Patch #
1110248 : SYNC_FLUSH the zlib buffer for GZipFile.flush.
Partially fixes #
1110242 .
Andrew M. Kuchling [Wed, 27 Sep 2006 19:23:38 +0000 (19:23 +0000)]
Make examples do error checking on Py_InitModule
Andrew M. Kuchling [Wed, 27 Sep 2006 19:17:32 +0000 (19:17 +0000)]
[Backport of rev. 42093 by neal.norwitz]
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
Andrew M. Kuchling [Wed, 27 Sep 2006 19:04:53 +0000 (19:04 +0000)]
[Backport of rev. 51683 by neal.norwitz]
Bug #
1548092 : fix curses.tparm seg fault on invalid input. Needs
backport to 2.5.1 and earlier.
Andrew M. Kuchling [Wed, 27 Sep 2006 19:02:02 +0000 (19:02 +0000)]
[Backport rev.51254 from neal.norwitz]
Handle failure from PyModule_GetDict() (Klocwork 208).
Fix a bunch of refleaks in the init of the module. This would only be found
when running python -v.
Gregory P. Smith [Tue, 19 Sep 2006 17:23:50 +0000 (17:23 +0000)]
fix a bug with bsddb.DB.stat reversing its flags and txn keyword
arguments. (reported by Louis Zechtzer)
Neal Norwitz [Mon, 11 Sep 2006 04:18:06 +0000 (04:18 +0000)]
Backport 51850 from release25-maint branch.
As mentioned on python-dev, reverting patch #
1504333 because it introduced
an infinite loop in rev 47154.
This patch also adds a test to prevent the regression.
Hye-Shik Chang [Thu, 7 Sep 2006 13:06:10 +0000 (13:06 +0000)]
Backport from trunk r51737:
Fixed a few bugs on cjkcodecs:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
codepoints now.
Georg Brandl [Thu, 7 Sep 2006 06:02:23 +0000 (06:02 +0000)]
Remove bogus NEWS entry.
Georg Brandl [Wed, 6 Sep 2006 20:06:20 +0000 (20:06 +0000)]
Fix missing import of the types module in logging.config.
(backport from rev. 51785)
Georg Brandl [Wed, 6 Sep 2006 06:04:03 +0000 (06:04 +0000)]
Bug #
1551427 : fix a wrong NULL pointer check in the win32 version
of os.urandom().
(backport from rev. 51762)
Tim Peters [Tue, 5 Sep 2006 02:00:47 +0000 (02:00 +0000)]
Merge rev 51711 from the 2.5 branch.
i_divmod(): As discussed on Python-Dev, changed the overflow
checking to live happily with recent gcc optimizations that
assume signed integer arithmetic never overflows.
Thomas Wouters [Thu, 24 Aug 2006 18:55:01 +0000 (18:55 +0000)]
Backport trunk's revision 51565:
Fix SF bug #
1545837 : array.array borks on deepcopy.
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
Georg Brandl [Tue, 22 Aug 2006 08:25:33 +0000 (08:25 +0000)]
Backport rev 51448:
- Patch #
1541585 : fix buffer overrun when performing repr() on
a unicode string in a build with wide unicode (UCS-4) support.
Georg Brandl [Sat, 19 Aug 2006 07:48:06 +0000 (07:48 +0000)]
Patch #
1540329 : _hotshot.c fix backports.
Andrew M. Kuchling [Fri, 18 Aug 2006 13:56:50 +0000 (13:56 +0000)]
Minor edits
Georg Brandl [Fri, 18 Aug 2006 07:35:50 +0000 (07:35 +0000)]
Typo in tp_clear docs.
(backport from rev. 51368)
Georg Brandl [Fri, 18 Aug 2006 07:25:22 +0000 (07:25 +0000)]
Bug #
1541682 : Fix example in the "Refcount details" API docs.
Additionally, remove a faulty example showing PySequence_SetItem applied
to a newly created list object and add notes that this isn't a good idea.
(backport)
Georg Brandl [Mon, 14 Aug 2006 21:45:35 +0000 (21:45 +0000)]
Add an additional test: BZ2File write methods should raise IOError
when file is read-only.
(backport from rev. 51287)
Georg Brandl [Mon, 14 Aug 2006 21:42:58 +0000 (21:42 +0000)]
Patch #
1535500 : fix segfault in BZ2File.writelines and make sure it
raises the correct exceptions.
(backport from rev. 51285)
Matt Fleming [Sun, 13 Aug 2006 21:41:29 +0000 (21:41 +0000)]
Backport a patch applied to trunk that allows Python to compile with
NetBSD's bluetooth API.
Georg Brandl [Fri, 11 Aug 2006 07:35:51 +0000 (07:35 +0000)]
Fix typo.
Georg Brandl [Fri, 11 Aug 2006 07:32:53 +0000 (07:32 +0000)]
Backport whitespace-normalization-proofing test_cgi fix.
Georg Brandl [Fri, 11 Aug 2006 07:14:38 +0000 (07:14 +0000)]
Chris McDonough's patch to defend against certain DoS attacks on FieldStorage.
SF bug #
1112549 . (backport from rev. 51190)
Georg Brandl [Wed, 9 Aug 2006 07:15:29 +0000 (07:15 +0000)]
Backport fixes for #
1523610 (crashes in PyArg_ParseTuple):
rev. 51158 and rev. 50843.
Georg Brandl [Tue, 8 Aug 2006 20:13:16 +0000 (20:13 +0000)]
Bug #
1536660 : separate two words.
(backport from rev. 51153)
Georg Brandl [Tue, 8 Aug 2006 20:11:30 +0000 (20:11 +0000)]
Bug #
1536828 : typo: TypeType should have been StringType.
(backport from rev. 51151)
Thomas Heller [Tue, 8 Aug 2006 17:42:30 +0000 (17:42 +0000)]
memcmp() can return values other than -1, 0, and +1 but tp_compare
must not.
Andrew M. Kuchling [Mon, 7 Aug 2006 00:37:19 +0000 (00:37 +0000)]
[Patch #
1464056 ] Ensure that we use the panelw library when linking with ncursesw
Andrew M. Kuchling [Sun, 6 Aug 2006 22:10:11 +0000 (22:10 +0000)]
Update status of relative import
Georg Brandl [Sun, 6 Aug 2006 09:17:22 +0000 (09:17 +0000)]
Don't produce output in test_builtin.
(backport from rev. 51131)
Georg Brandl [Sun, 6 Aug 2006 08:23:59 +0000 (08:23 +0000)]
Bug #
1535165 : fixed a segfault in input() and raw_input() when
sys.stdin is closed.
(backport from rev. 51129)
Georg Brandl [Sun, 6 Aug 2006 07:08:16 +0000 (07:08 +0000)]
Bug #
1535182 : really test the xreadlines() method of bz2 objects.
(backport from rev. 51126)
Andrew M. Kuchling [Fri, 4 Aug 2006 21:14:22 +0000 (21:14 +0000)]
Fix mangled sentence
Fred Drake [Fri, 4 Aug 2006 05:16:04 +0000 (05:16 +0000)]
SF patch #
1534048 (bug #
1531003 ): fix typo in error message
Georg Brandl [Sun, 30 Jul 2006 20:18:54 +0000 (20:18 +0000)]
Bug #
1531349 : right <-> left glitch in __rop__ description.
(backport from rev. 50990)
Martin v. Löwis [Sun, 30 Jul 2006 14:11:03 +0000 (14:11 +0000)]
Drop usage of test -e in configure as it is not portable.
Fixes #
1439538
Martin v. Löwis [Sun, 30 Jul 2006 13:34:47 +0000 (13:34 +0000)]
Backport r50856:
Don't kill a normal instance of python running on windows when checking
to kill a cygwin instance. build\\python.exe was matching a normal
windows instance. Prefix that with a \\ to ensure build is a directory
and not PCbuild. As discussed on python-dev.
Martin v. Löwis [Sun, 30 Jul 2006 13:31:20 +0000 (13:31 +0000)]
Complain about missing VS 2003 in the error message
of msvccompiler, and mention Cygwin as an alternative.
Fixes #
1257728 .
Georg Brandl [Sun, 30 Jul 2006 11:08:48 +0000 (11:08 +0000)]
Bug #
1002398 : The documentation for os.path.sameopenfile now correctly
refers to file descriptors, not file objects.
(backport from rev. 50974)
Andrew M. Kuchling [Sat, 29 Jul 2006 19:52:08 +0000 (19:52 +0000)]
[Patch #
1068277 ] Clarify that os.path.exists() can return False depending on permissions.
Andrew M. Kuchling [Sat, 29 Jul 2006 14:05:17 +0000 (14:05 +0000)]
Update URL
Georg Brandl [Sat, 29 Jul 2006 08:51:25 +0000 (08:51 +0000)]
Bug #835255: The "closure" argument to new.function() is now documented.
(backport from rev. 50922)
Georg Brandl [Fri, 28 Jul 2006 18:30:50 +0000 (18:30 +0000)]
Patch #
1529686 : run test_iterlen and test_email_codecs in 2.4.
Barry Warsaw [Fri, 28 Jul 2006 03:18:56 +0000 (03:18 +0000)]
Backport r50840 to Python 2.4:
Forward port some fixes that were in email 2.5 but for some reason didn't
make it into email 4.0. Specifically, in Message.get_content_charset(),
handle RFC 2231 headers that contain an encoding not known to Python, or a
character in the data that isn't in the charset encoding. Also forward
port the appropriate unit tests.
Also, this resolves SF bug #
1414018 .
Gregory P. Smith [Fri, 28 Jul 2006 03:16:53 +0000 (03:16 +0000)]
- pybsddb Bug #
1527939 : bsddb module DBEnv dbremove and dbrename
methods now allow their database parameter to be None as the
sleepycat API allows.
also adds a testcase.
backport of trunk commit 50889 to 2.4.
Barry Warsaw [Fri, 28 Jul 2006 02:34:35 +0000 (02:34 +0000)]
Delete a misleading example. SF bug #
1481650 .
Tim Peters [Thu, 27 Jul 2006 23:56:12 +0000 (23:56 +0000)]
Merge rev 50882 from the trunk.
Bug #
1529297 : The rewrite of doctest for Python 2.4 unintentionally
lost that tests are sorted by name before being run. ``DocTestFinder``
has been changed to sort the list of tests it returns.
Andrew M. Kuchling [Thu, 27 Jul 2006 18:48:47 +0000 (18:48 +0000)]
Update URL
Andrew M. Kuchling [Wed, 26 Jul 2006 17:25:53 +0000 (17:25 +0000)]
[Bug #
1471938 ] Fix build problem on Solaris 8 by conditionalizing the use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment.
Martin v. Löwis [Mon, 24 Jul 2006 12:57:47 +0000 (12:57 +0000)]
Bug #
1524310 : Properly report errors from FindNextFile in os.listdir.
Barry Warsaw [Sun, 23 Jul 2006 17:04:35 +0000 (17:04 +0000)]
Oops, this time, really bump the email version number to 3.0.2.
Barry Warsaw [Sun, 23 Jul 2006 17:02:55 +0000 (17:02 +0000)]
Port r50754 to Python 2.4/email 3.0. Bump the email version number to 3.0.2.
Andrew MacIntyre [Sun, 23 Jul 2006 14:29:02 +0000 (14:29 +0000)]
Complete backport of rev 50787 that was started in rev 50788