summaryrefslogtreecommitdiff
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Undefine the Yield macro after including Python_ast.h where it may cause ↵Kristján Valur Jónsson2007-05-022-0/+4
| | | | conflicts with winbase.h on Windows.
* Fix various minor issues discovered with static analysis using Visual Studio ↵Kristján Valur Jónsson2007-04-212-11/+3
| | | | | | 2005 Team System. Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
* Revert 54813 for 2.5.1 release. Can be applied after 2.5 branch is unfrozen.Neal Norwitz2007-04-161-1/+1
|
* SF #1701207: svnversion_init assertion failedNeal Norwitz2007-04-161-2/+0
| | | | | | Revert bogus asserts (added to the wrong place) from rev 52501. Approved by Anthony.
* Fix a bug when using the __lltrace__ opcode tracer, and a problem sith ↵Kristján Valur Jónsson2007-04-131-1/+1
| | | | signed chars in frameobject.c which can occur with opcodes > 127
* Patch #1682205: a TypeError while unpacking an iterable is no longerGeorg Brandl2007-03-211-5/+3
| | | | | masked by a generic one with the message "unpack non-sequence". (backport from rev. 54480)
* Patch #1642547: Fix an error/crash when encountering syntax errors in ↵Collin Winter2007-03-161-14/+26
| | | | | | complex if statements. Backported from r54404.
* Inline PyImport_GetModulesReloading(). Backport from r54368.Collin Winter2007-03-131-10/+8
|
* Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. ↵Collin Winter2007-03-123-2/+41
| | | | | | Fixed by patch #922167. Backported from r54291.
* Bug #1674503: close the file opened by execfile() in an error condition.Georg Brandl2007-03-061-2/+2
| | | | (backport)
* Patch #1674228: when assigning a slice (old-style), check for theGeorg Brandl2007-03-051-1/+1
| | | | | sq_ass_slice instead of the sq_slice slot. (backport from rev. 54139)
* Fix constantification of None.Raymond Hettinger2007-03-021-5/+9
|
* Fix SF bug #1669182. Handle string exceptions even if unraisable (ie in ↵Neal Norwitz2007-02-261-1/+5
| | | | __del__).
* Backport 53901 and 53902 to prevent crash when there is an error decoding ↵Neal Norwitz2007-02-251-0/+2
| | | | unicode filenames
* Make PyTraceBack_Here use the current thread, not theMartin v. Löwis2007-01-231-1/+1
| | | | frame's thread state. Fixes #1579370.
* Backport trunk revision 53527:Thomas Wouters2007-01-232-6/+9
| | | | | | | | | | | | | 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....)
* update to (c) years to include 2007Anthony Baxter2007-01-061-1/+1
|
* Backport:Neal Norwitz2007-01-051-1/+2
| | | | | | Prevent crash on shutdown which can occur if we are finalizing and the module dict has been cleared already and some object raises a warning (like in a __del__).
* Backport of r52862.Armin Rigo2006-11-291-1/+3
|
* Backport 52621:Neal Norwitz2006-11-041-0/+1
| | | | Bug #1588287: fix invalid assertion for `1,2` in debug builds.
* Backport 52504:Neal Norwitz2006-10-281-1/+4
| | | | | | Fix bug #1565514, SystemError not raised on too many nested blocks. It seems like this should be a different error than SystemError, but I don't have any great ideas and SystemError was raised in 2.4 and earlier.
* Backport 52501:Neal Norwitz2006-10-281-0/+4
| | | | | | | | Add some asserts. In sysmodule, I think these were to try to silence some warnings from Klokwork. They verify the assumptions of the format of svn version output. The assert in the thread module helped debug a problem on HP-UX.
* [Bug #1542016] Report PCALL_POP value. This makes the return value of ↵Andrew M. Kuchling2006-10-271-2/+2
| | | | | | | sys.callstats() match its docstring. Backport candidate. Though it's an API change, this is a pretty obscure portion of the API.
* [Backport of r52452]Martin v. Löwis2006-10-271-53/+75
| | | | | | | Patch #1549049: Rewrite type conversion in structmember. Fixes #1545696 and #1566140. The new warnings have been omitted in the backport.
* Fix #1569998: no break inside try statement (outside loop) allowed.Georg Brandl2006-10-081-1/+13
| | | | (backport from rev. 52129)
* Patch #1542451: fix crash with continue in nested try/finallyGeorg Brandl2006-10-081-4/+10
| | | | (backport from rev. 51439)
* Forward-port of r52136: a review of overflow-detecting code.Armin Rigo2006-10-046-27/+37
| | | | | | | | | | | | | | | | | | | | | | | * 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. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
* Backport rev. 51972:Georg Brandl2006-09-251-2/+24
| | | | | | | Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)). These tests should be improved. Hopefully this fixes variations when flipping back and forth between fpdef and fplist.
* Backport rev. 51987: superfluous semicola.Georg Brandl2006-09-251-1/+1
|
* Building with HP's cc on HP-UX turned up a couple of problems.Neal Norwitz2006-09-111-1/+6
| | | | | | | | | | | | | _PyGILState_NoteThreadState was declared as static inconsistently. Make it static as it's not necessary outside of this module. Some tests failed because errno was reset to 0. (I think the tests that failed were at least: test_fcntl and test_mailbox). Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS. This only affected debug builds. This needs to be ported to HEAD. I'll try to remember to do that tomorrow. (Anyone, feel free to port it.)
* Properly handle a NULL returned from PyArena_New().Neal Norwitz2006-09-111-2/+4
| | | | Klocwork #364. Will port to head.
* Bug #1550983: emit better error messages for erroneous relativeGeorg Brandl2006-09-061-2/+3
| | | | | imports (if not in package and if beyond toplevel package). (backport from rev. 51765)
* Bug #1520864 (again): unpacking singleton tuples in list comprehensions andNeal Norwitz2006-09-052-5/+14
| | | | | | | generator expressions (x for x, in ... ) works again. Sigh, I only fixed for loops the first time, not list comps and genexprs too. I couldn't find any more unpacking cases where there is a similar bug lurking.
* Fix SF #1552093, eval docstring typo (3 ps in mapping)Neal Norwitz2006-09-051-1/+1
|
* Backport 51443:Neal Norwitz2006-08-211-0/+5
| | | | | | Handle a few more error conditions. Klocwork 301 and 302. Will backport.
* cpathname could be NULL if it was longer than MAXPATHLEN. Don't tryNeal Norwitz2006-08-131-1/+6
| | | | | | | | to write the .pyc to NULL. Check results of PyList_GetItem() and PyModule_GetDict() are not NULL. Klocwork 282, 283, 285
* Move/copy assert for tstate != NULL before first use.Neal Norwitz2006-08-131-1/+7
| | | | | | Verify that PyEval_Get{Globals,Locals} returned valid pointers. Klocwork 231-232
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-121-9/+9
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
* PyModule_GetDict() can fail, produce fatal errors if this happens on startup.Neal Norwitz2006-08-121-0/+4
| | | | Klocwork #298-299.
* Whoops, how did that get in there. :-) Revert all the parts of 51227 that ↵Neal Norwitz2006-08-122-12/+0
| | | | were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
* Check returned pointer is valid.Neal Norwitz2006-08-122-0/+12
| | | | Klocwork #233
* This code is actually not used unless WITHOUT_COMPLEX is defined.Neal Norwitz2006-08-121-0/+8
| | | | | | | | 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.
* It's highly unlikely, though possible for PyEval_Get*() to return NULLs.Neal Norwitz2006-08-121-2/+2
| | | | | | So be safe and do an XINCREF. Klocwork # 221-222.
* Even though _Py_Mangle() isn't truly public anyone can call it andNeal Norwitz2006-08-121-2/+2
| | | | | | | | | | there was no verification that privateobj was a PyString. If it wasn't a string, this could have allowed a NULL pointer to creep in below and crash. I wonder if this should be PyString_CheckExact? Must identifiers be strings or can they be subclasses? Klocwork #275
* Klocwork made another run and found a bunch more problems.Neal Norwitz2006-08-122-1/+8
| | | | | | | 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).
* Followup to bug #1069160.Tim Peters2006-08-101-12/+27
| | | | | | PyThreadState_SetAsyncExc(): internal correctness changes wrt refcount safety and deadlock avoidance. Also added a basic test case (relying on ctypes) and repaired the docs.
* Concatenation on a long string breaks (SF #1526585).Armin Rigo2006-08-091-3/+9
|
* Introduce an upper bound on tuple nesting depth inGeorg Brandl2006-08-091-0/+3
| | | | C argument format strings; fixes rest of #1523610.
* Bug #1535165: fixed a segfault in input() and raw_input() whenGeorg Brandl2006-08-061-1/+1
| | | | sys.stdin is closed.
* On Windows, make PyErr_Warn an exported function again.Thomas Heller2006-08-041-1/+1
|