Permalink
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also .
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
25
contributors
This comparison is big! We’re only showing the most recent
250
commits
Commits on Jun 14, 2006
objects of same type/of subclasses of the other. (backport from rev. 46952)
mime.types file for determining MIME types. (backport from rev. 46955)
Commits on Jun 17, 2006
Old url returned status code:301 Moved permanently. (Backport from r47005)
Commits on Jun 18, 2006
Commits on Jun 21, 2006
Commits on Jun 22, 2006
Commits on Jun 23, 2006
('[' and ']' were not accepted in unquoted attribute values)
Commits on Jun 27, 2006
…on at the same time as the 2.5 versions would break the 2.5 tests since the install dir was removed.
…ers. Exceptions now propagate to caller.
Commits on Jun 28, 2006
Fix bug #1512695: cPickle.loads could crash if it was interrupted with a KeyboardInterrupt since PyTuple_Pack was passed a NULL.
Commits on Jun 29, 2006
(modified patch by Sam Ruby; changed to use separate REs for start and end tags to reduce matching cost for end tags; extended tests; updated to avoid breaking previous changes to support IPv6 addresses in unquoted attribute values)
Commits on Jul 03, 2006
spec file generated by bdist_rpm.
Commits on Jul 05, 2006
(backport from rev. 47241)
(backport from rev. 47244)
Commits on Jul 15, 2006
Bug #15187702 : ext/win-cookbook.html has a broken link to distutils
Commits on Jul 16, 2006
Commits on Jul 23, 2006
backport of rev 50787.
Commits on Jul 24, 2006
Commits on Jul 26, 2006
… 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.
Commits on Jul 27, 2006
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.
Commits on Jul 28, 2006
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.
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.
Commits on Jul 29, 2006
(backport from rev. 50922)
…ding on permissions.
Commits on Jul 30, 2006
refers to file descriptors, not file objects. (backport from rev. 50974)
of msvccompiler, and mention Cygwin as an alternative. Fixes #1257728.
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.
Fixes #1439538
(backport from rev. 50990)
Commits on Aug 04, 2006
Commits on Aug 06, 2006
(backport from rev. 51126)
sys.stdin is closed. (backport from rev. 51129)
(backport from rev. 51131)
Commits on Aug 07, 2006
Commits on Aug 08, 2006
(backport from rev. 51151)
(backport from rev. 51153)
Commits on Aug 09, 2006
rev. 51158 and rev. 50843.
Commits on Aug 11, 2006
…dStorage. SF bug #1112549. (backport from rev. 51190)
Commits on Aug 13, 2006
NetBSD's bluetooth API.
Commits on Aug 14, 2006
raises the correct exceptions. (backport from rev. 51285)
when file is read-only. (backport from rev. 51287)
Commits on Aug 18, 2006
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)
(backport from rev. 51368)
Commits on Aug 19, 2006
Commits on Aug 22, 2006
- Patch #1541585: fix buffer overrun when performing repr() on a unicode string in a build with wide unicode (UCS-4) support.
Commits on Aug 24, 2006
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.)
Commits on Sep 05, 2006
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.
Commits on Sep 06, 2006
of os.urandom(). (backport from rev. 51762)
(backport from rev. 51785)
Commits on Sep 07, 2006
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.
Commits on Sep 11, 2006
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.
Commits on Sep 19, 2006
arguments. (reported by Louis Zechtzer)
Commits on Sep 27, 2006
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.
Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier.
Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
[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.
Commits on Sep 28, 2006
Add a missing incref.
Add missing INCREF.
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]
Commits on Sep 29, 2006
SF patch #1227568, bug #1219273, Expression AST node not documented. Backport candidate if anyone cares.
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.
SF bug #1328915, try to word kill a bit more generically. Backport candidate.
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]
Fix an int/long mismatch identified here: http://www.tortall.net/mu/blog/2005/12/01 Pointed out from SF #1365916. Backport candidate.
Bug fix for [ 1331062 ] utf 7 codec broken. Backport candidate.
Don't leak the list object if there's an error allocating the item storage. Backport candidate.
Fix the socket tests so they can be run concurrently. Backport candidate
Commits on Sep 30, 2006
(backport from rev. 52053)
keyword arguments any more (previously they accepted them, but didn't use them). (backport from rev. 52058)
with a slash. (backport from rev. 52065)
but also for functions. (backport from rev. 52069)
datetime's strftime function. (backport from rev. 52072)
to encodings.search_function() contains a dot. (backport from rev. 52075)
Commits on Oct 02, 2006
Commits on Oct 03, 2006
Another problem reported by Coverity. Backport candidate.
Make sure memory is properly cleaned up in file_init. Backport candidate.
Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34].
Fix memory leak reported by valgrind while running test_subprocess
Make staticmethod and classmethod complain about keyword args.
Fix memory leaks in some conditions. Reported by Klocwork #152.
Fix memory leak under some conditions. Reported by Klocwork, #98.
Handle malloc failure. Klocwork 281
Handle a NULL name properly.
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.
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.]
Fix memory leaks spotted by Klocwork #37.
Don't deref v if it's NULL. Klocwork #214
Check return of PyMem_MALLOC (garbage) is non-NULL. Check seq in both portions of if/else. Klocwork #289-290.
PyModule_GetDict() can fail, produce fatal errors if this happens on startup. Klocwork #298-299.
Handle a few more error conditions. Klocwork 301 and 302. Will backport.
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]
nextlink can be NULL if teedataobject_new fails, so use XINCREF. Ensure that dataobj is never NULL. Reported by Klocwork #102
No functional change. Add comment and assert to describe why there cannot be overflow which was reported by Klocwork. Discussed on python-dev.
Prevent memory leak on error. Reported by Klocwork #36
Handle failures from lookup. Klocwork 341-342
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
Commits on Oct 04, 2006
…sense to test for parts > 3 when we use .split(..., 2).
on undefined behaviour of the C compiler anymore.
* unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c.
(unsigned long vs. unsigned int).
I'm not sure why this code allocates this string for the error message. I think it would be better to always use snprintf and have the format limit the size of the name appropriately (like %.200s). Klocwork #340
Handle malloc and fopen failures more gracefully. Klocwork 180-181
Move/copy assert for tstate != NULL before first use. Verify that PyEval_Get{Globals,Locals} returned valid pointers. Klocwork 231-232
Verify verdat which is returned from malloc is not NULL. Ensure we don't pass NULL to free. Klocwork #306 (at least the first part, checking malloc)
Try to handle a malloc failure. I'm not entirely sure this is correct. There might be something else we need to do to handle the exception. Klocwork # 212-213 [I think this needs more work; a malloc() failure will cause a match to fail, but nothing raises MemoryError. I'll work on this on the trunk and backport. --amk]
Commits on Oct 05, 2006
Really address the issue of where to place the assert for leftblock. (Followup of Klocwork 274)
Fix segfault when doing string formatting on subclasses of long if __oct__, __hex__ don't return a string. Klocwork 308
cpathname could be NULL if it was longer than MAXPATHLEN. Don't try to write the .pyc to NULL. Check results of PyList_GetItem() and PyModule_GetDict() are not NULL. Klocwork 282, 283, 285
Move the assert which checks for a NULL pointer first. Klocwork #274.
If _stat_float_times is false, we will try to INCREF ival which could be NULL. Return early in that case. The caller checks for PyErr_Occurred so this should be ok. Klocwork #297
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then add 'if (PyErr_Occurred())' checks to various places so that NULL is returned properly.
Handle allocation failures gracefully. Found with failmalloc. Many (all?) of these could be backported.
applied to pyarena.c, compile.c, and symtable.c, which were different in 2.4.] Fix more memory allocation issues found with failmalloc.
…ymtable.c, and _elementtree.c weren't applicable] Klocwork made another run and found a bunch more problems. This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
but looks correct on a casual inspection and hasn't been modified in the trunk. Does anyone want to review further?] Ensure we don't write beyond errText. I think I got this right, but it definitely could use some review to ensure I'm not off by one and there's no possible overflow/wrap-around of bytes_left. Reported by Klocwork #1. Fix a problem if there is a failure allocating self->db. Found with failmalloc.
Reported by Klocwork #151. v2 can be NULL if exception2 is NULL. I don't think that condition can happen, but I'm not sure it can't either. Now the code will protect against either being NULL.
It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222.
this code is only used if WITHOUT_COMPLEX is *not* defined, which is the common case for Python builds.] This code is actually not used unless WITHOUT_COMPLEX is defined. However, there was no error checking that PyFloat_FromDouble returned a valid pointer. I believe this change is correct as it seemed to follow other code in the area. Klocwork # 292.
Handle a whole lot of failures from PyString_FromInternedString(). Should fix most of Klocwork 234-272. [Backport r51400 | neal.norwitz] Move initialization of interned strings to before allocating the object so we don't leak op. (Fixes an earlier patch to this code) Klockwork #350
you find that Python does print "MemoryError". There's no traceback and no indication of which line of code is responsible, but it's better than a segfault.] Handle NULL nodes while parsing. I'm not entirely sure this is correct. There might be something else that needs to be done to setup the error. Klocwork #295.
PyFunction_SetDefaults() is documented as taking None or a tuple. A NULL would crash the PyTuple_Check(). Now make NULL return a SystemError. Reported by Klocwork #73.
backported.] Use sizeof(buffer) instead of duplicating the constants to ensure they won't be wrong. The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1 to strncat. strncat copies n+1 bytes from src (not dest). Reported by Klocwork #58.
Commits on Oct 06, 2006
- remove Sleepycat name now that they have been bought
Patch #1357836: Prevent an invalid memory read from test_coding in case the done flag is set. In that case, the loop isn't entered. I wonder if rather than setting the done flag in the cases before the loop, if they should just exit early. This code looks like it should be refactored. Backport candidate (also the early break above if decoding_fgets fails)
Fix #132 from Coverity, retval could have been derefed if a continue inside a try failed.
Remove dead code (reported by HP compiler). Can probably be backported if anyone cares.
Commits on Oct 08, 2006
Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault when encoding non-BMP unicode characters. (Submitted by Ray Chason)
…kes away the need for the out-of-tree universal binary support that was used to build the 2.4.3 installer. Missing here relative to that tree are some changes to IDLE, IMHO those patches aren't appropriate for the 2.4 branch and users are better of using 2.5's IDLE.
Commits on Oct 09, 2006
Fix three nits found by Coverity, adding null checks and comments. [This commit only makes two changes. One change in the original patch is just adding a comment, and another adds a 'base != NULL' check to silence Coverity, but a comment adds that that base is never going to be NULL. I didn't backport that change. --amk]
Fix problems found by Coverity. _ssl.c: under fail: self is DECREF'd, but it would have been NULL. _csv.c: I'm not sure if lineterminator could have been anything other than a string. However, other string method calls are checked, so check this one too.
Fix problems found by Coverity. longobject.c: also fix an ssize_t problem <a> could have been NULL, so hoist the size calc to not use <a>. [The ssize_t change isn't needed for 2.4. The other changes in this revision are to modules not present in 2.4. --amk]
- reset errno before calling confstr - use confstr() doc to simplify checks afterwards - Correct implementation and documentation of os.confstr. Add a simple test case. I've yet to figure out how to provoke a None return I can test. - Address issues brought up by MvL on python-checkins. I tested this with valgrind on amd64. The man pages I found for diff architectures are inconsistent on this. I'm not entirely sure this change is correct for all architectures either. Perhaps we should just over-allocate and not worry about it? The change to return None instead of "" in case of unconfigured values has not been backported.
fixing an unlikely crash bug in dict resizing, SF bug 1456209. The rest of rev 46589 changes whether Python suppresses exceptions during some dict-related comparisons. While I think that's a good idea, it does change visible behavior at times, and there was already some complaining about that on the trunk. Not a good idea for backporting. The part of 46589 checked in here can at worst stop segfaults, and I doubt anyone will gripe about that ;-)
Windows builbot's "build" step to the start of its "test" step. This is poke-and-hope. The hope is that compilation failures on Windows will become visible to the buildbot (bsddb has apparently been failing to compile in 2.4 on Windows "for some time" now, but the buildbots haven't noticed that).
about truly wrong code. Checkin comment from 51262: Can't return NULL from a void function. If there is a memory error, about the best we can do is call PyErr_WriteUnraisable and go on. We won't be able to do the call below either, so verify delstr is valid.
Commits on Oct 10, 2006
#1494314: Fix a regression with high-numbered sockets in 2.4.3. This means that select() on sockets > FD_SETSIZE (typically 1024) work again. The patch makes sockets use poll() internally where available.
_bsddb on Windows (Martin recently repaired that -- thanks!).
Commits on Oct 11, 2006
Commits on Oct 17, 2006
Repair so that it's back to how it was in 2.4.3. Needs to be forward-ported to 2.5 branch and trunk.
Commits on Oct 18, 2006
Commits on Oct 26, 2006
…eported by David Faure.
Commits on Oct 27, 2006
… sys.callstats() match its docstring.
…awn*, os.popen2, and the popen2 and commands modules
Commits on Nov 07, 2006
Commits on Nov 20, 2006
Commits on Nov 29, 2006
Commits on Dec 11, 2006
Commits on Dec 20, 2006
Commits on Jan 11, 2007
Commits on Jan 23, 2007
SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomize When running the interpreter in an environment that would cause it to set stdout/stderr/stdin's encoding, having a sitecustomize that would replace them with something other than PyFile objects would crash the interpreter. Fix it by simply ignoring the encoding-setting for non-files. This could do with a test, but I can think of no maintainable and portable way to test this bug, short of adding a sitecustomize.py to the buildsystem and have it always run with it (hmmm....)
Commits on Feb 11, 2007
Commits on Feb 17, 2007
Commits on Feb 25, 2007
Don't use a fixed temporary name (gdbm). Don't use our own temp name creation (dbm).
Commits on May 15, 2007
the traceback inadvertently or maliciously closing the comment and injecting HTML into the error page. (backport from rev. 55348)
Commits on May 25, 2007
Commits on Jun 05, 2007
Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified.
Commits on Jul 26, 2007
- be more strict about the build environment - update some of the 3th party libraries (later patchlevels)
Commits on Aug 03, 2007
Commits on Aug 16, 2007
Commits on Oct 24, 2007
Commits on Jan 19, 2008
- Issue #1336: fix a race condition in subprocess.Popen if the garbage collector kicked in at the wrong time that would cause the process to hang when the child wrote to stderr.
Commits on Mar 02, 2008
problems: 52448, 52468, 52472, 52475, 52646, 52797, 52802, 52863, 52999, 53001, 53101, 53371, 53373, 53383, 53384, 53736, 53812, 53921, 55578, 55580, 55581, 55772, 55775, 56557, 57093, 57094, 58630, 60114
Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code.
Commits on Jul 28, 2008
to the signed max value similar to 2.5 and trunk. Issue #2620: Overflow checking when allocating or reallocating memory was not always being done properly in some python types and extension modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have all been updated to perform better checks and places in the code that would previously leak memory on the error path when such an allocation failed have been fixed.
Commits on Jul 31, 2008
Commits on Nov 12, 2008
overflows in the imageop and rgbimgmodule modules.
zlib.decompressobj().flush(val) when val is not positive.
…ned size parameter but was not verifying that it was greater than zero. Values less than zero will now raise a SystemError and return NULL to indicate a bug in the calling C code. CVE-2008-1887. backport r62261, r62271
… could segfault as a result. CVE-2008-4864. backport r66689
Commits on Nov 17, 2008
Commits on Nov 18, 2008
Backport of r67266
Commits on Nov 30, 2008
Commits on Dec 13, 2008
Issue #4469: Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms.
Commits on Dec 16, 2008
Commits on Dec 20, 2008
Commits on Nov 27, 2009
Commits on Dec 11, 2009
Commits on Jan 28, 2010
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.