summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Backport fix for SF808594: leak on lambda with duplicate arguments.Jeremy Hylton2003-09-221-15/+16
|
* Backport:Neal Norwitz2003-06-291-0/+6
| | | | | | Fix SF #762455, segfault when sys.stdout is changed in getattr Note: in 2.2, the problem was an infinite loop (at least for me).
* Backport fix for SF bug 734869 and sundry compiler cleanups.Jeremy Hylton2003-05-222-26/+33
|
* Patch #708604: Check more function results.Martin v. Löwis2003-05-031-7/+37
|
* Patch #716969: Detect thread creation failure.Martin v. Löwis2003-04-192-9/+9
|
* Patch #711835: Remove unnecessary lock operations.Martin v. Löwis2003-04-181-8/+4
|
* Backport:Guido van Rossum2003-04-101-3/+2
| | | | | | | | | PyErr_NormalizeException(): in the type==NULL test, we should simply return. Setting an exception can mess with the exception state, and continuing is definitely wrong (since type is dereferenced later on). Some code that calls this seems to be prepared for a NULL exception type, so let's be safe rather than sorry and simply assume there's nothing to normalize in this case.
* Patch #710576: Implement per-interpreter-state codec registries.Martin v. Löwis2003-03-303-70/+44
|
* Backport 2.220,Neal Norwitz2003-03-231-0/+2
| | | | SF patch #708201, unchecked return value in import.c by Jason Harper
* Partial backport of 2.11: better error messages on import failures.Jack Jansen2003-02-251-2/+10
| | | | Fixes #652590.
* Backport 2.217 and 2.218:Guido van Rossum2003-02-131-6/+55
| | | | | | Provide access to the import lock, fixing SF bug #580952. This is mostly from SF patch #683257, but I had to change unlock_import() to return an error value to avoid fatal error.
* Backport SF #660455 fix.Guido van Rossum2003-02-121-1/+2
|
* Backport 2.12: Fix for SF #639945, 64-bit bug on AIX when loadingNeal Norwitz2003-01-101-3/+2
| | | | dynamic modules
* Backport Neil Schemenauer's fix for SF #529750,Neal Norwitz2002-11-201-4/+0
| | | | | | | Circular reference makes Py_Init crash Modified to keep _Py_ResetReferences() API, but make it a no-op. It's not called now (for 2.3 it was completely removed).
* Initialize tick_counter to 0. Found by Neal Norwitz.Guido van Rossum2002-10-081-0/+1
|
* Backport:Michael W. Hudson2002-10-071-34/+1
| | | | | | | | | | | | | | 2002/08/11 12:23:04 lemburg Python/bltinmodule.c 2.262 2002/08/11 12:23:04 lemburg Objects/unicodeobject.c 2.162 2002/08/11 12:23:03 lemburg Misc/NEWS 1.461 2002/08/11 12:23:03 lemburg Lib/test/test_unicode.py 1.65 2002/08/11 12:23:03 lemburg Include/unicodeobject.h 2.39 Add C API PyUnicode_FromOrdinal() which exposes unichr() at C level. u'%c' will now raise a ValueError in case the argument is an integer outside the valid range of Unicode code point ordinals. Closes SF bug #593581.
* Backport my checkin of revision 2.264 of Python/compile.c:Michael W. Hudson2002-10-071-3/+3
| | | | | | Clamp code objects' tp_compare result to [-1, 1]. Bugfix candidate.
* This is Armin Rigo's patch:Michael W. Hudson2002-10-072-9/+18
| | | | | | [ 617309 ] getframe hook (Psyco #1) Forward port candidate.
* This is Armin Rigo's patch:Michael W. Hudson2002-10-071-0/+1
| | | | | | [ 617311 ] Tiny profiling info (Psyco #2) Forward port candidate.
* This is Armin Rigo's patch:Michael W. Hudson2002-10-071-8/+15
| | | | | | [ 617312 ] debugger-controlled jumps (Psyco #3) Forward port candidate, I guess.
* Patch #618347: Work around Solaris pthread.h bug.Martin v. Löwis2002-10-041-2/+2
|
* Fix for the recursion_level bug Armin Rigo reported in sfMichael W. Hudson2002-10-021-0/+4
| | | | | | | patch #617312, both on the trunk and the 22-maint branch. Also added a test case, and ported the test_trace I wrote for HEAD to 2.2.2 (with all those horrible extra 'line' events ;-).
* Backport mhammond's 2.14:Michael W. Hudson2002-09-301-4/+10
| | | | | | Fix bug [ 549731 ] Unicode encoders appears to leak references. Python 2.2.1 bugfix candidate.
* Add encoding in LookupError. Fixes #615013.Martin v. Löwis2002-09-261-2/+2
|
* backport theller's checkin ofMichael W. Hudson2002-09-241-4/+4
| | | | | | revision 1.74 of marshal.c Whitespace normalization.
* backport theller's checkin ofMichael W. Hudson2002-09-241-6/+6
| | | | | | | | | | | | revision 1.73 of marshal.c Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000). See there for a description. Added test case. Bugfix candidate for 2.2.x, not sure about previous versions: probably low priority, because virtually no one runs debug builds.
* backport nowonder's checkin ofMichael W. Hudson2002-09-241-1/+1
| | | | | | | | | | | revision 2.265 of bltinmodule.c date: 2002/08/27 16:58:00; author: nowonder; state: Exp; lines: +1 -1 execfile should call PyErr_SetFromErrnoWithFilename instead of simply PyErr_SetFromErrno This closes bug 599163.
* Backported 1.39 and 1.40 from trunk:Guido van Rossum2002-09-231-0/+10
| | | | | | | | | | | | | | 1.39: Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz). The switch in Exception__str__ didn't clear the error if PySequence_Size() raised an exception. Added a case -1 which clears the error and falls through to the default case. 1.40: Two more cases of switch(PySequence_Size()) without checking for case -1. (Same problem as last checkin for SF bug 610610) Need to clear the error and proceed.
* SF bug # 557028, illegal use of malloc/freeNeal Norwitz2002-08-111-2/+2
| | | | This only applies to 2.2. Use PyMem_Malloc/Free instead of malloc/free.
* Remove calls to 2.1 GC API (they are noops).Neil Schemenauer2002-08-051-4/+2
|
* Patch #554716: Use __va_copy where available.Martin v. Löwis2002-07-282-0/+8
|
* Fix the docstring for sys.getrefcount().Fred Drake2002-06-201-2/+3
| | | | Closes SF bug #571759.
* PyModule_AddObject(): Added missing exceptions.Fred Drake2002-06-171-7/+14
| | | | Closes SF bug #523473.
* Backport:Guido van Rossum2002-06-121-2/+2
| | | | | | | | | | SF bug 567538: Generator can crash the interpreter (Finn Bock). This was a simple typo. Strange that the compiler didn't catch it! Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a why_code at all, but an opcode; but even though 'why' is declared as an enum, comparing it to an int is apparently not even worth a warning -- not in gcc, and not in VC++. :-(
* Fix SF #561858 Assertion with very long listsNeal Norwitz2002-06-011-0/+15
| | | | | | | | | | | | | | | | if co_stacksize was > 32767 (the maximum value which can be stored in 16 bits (signed)), the PyCodeObject would be written wrong. So on the second import (reading the .pyc) would cause a crash. Since we can't change the PYC magic, we go on (silently), but don't write the file. This means everything will work, but a .pyc will not be written and the file will need to be parsed on each import. I will backport.
* backport tim_one's patch:Anthony Baxter2002-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Repair widespread misuse of _PyString_Resize. Since it's clear people don't understand how this function works, also beefed up the docs. The most common usage error is of this form (often spread out across gotos): if (_PyString_Resize(&s, n) < 0) { Py_DECREF(s); s = NULL; goto outtahere; } The error is that if _PyString_Resize runs out of memory, it automatically decrefs the input string object s (which also deallocates it, since its refcount must be 1 upon entry), and sets s to NULL. So if the "if" branch ever triggers, it's an error to call Py_DECREF(s): s is already NULL! A correct way to write the above is the simpler (and intended) if (_PyString_Resize(&s, n) < 0) goto outtahere; Bugfix candidate. Original patch(es): python/dist/src/Python/bltinmodule.c:2.253
* This may well be my final checkin before 2.2.1.Michael W. Hudson2002-04-081-5/+5
| | | | | | | | | | | | If you think I've forgotten something, now is a good time to howl (although I won't read the howl for a good few hours 'cause I'm going home). backport lemburg's checkin of revision 2.158 of pythonrun.c Move Unicode finalization further down in the chain. Fixes bug #525620.
* Add bool(), True, False (as ints) for backwards compatibility.Guido van Rossum2002-04-081-0/+23
|
* Backport to 2.2.1:Guido van Rossum2002-03-291-1/+1
| | | | | | | | | | This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction). The fix makes it possible to call PyObject_GC_UnTrack() more than once on the same object, and then move the PyObject_GC_UnTrack() call to *before* the trashcan code is invoked. BUGFIX CANDIDATE!
* Backport to 2.2.1.Guido van Rossum2002-03-281-2/+10
| | | | | | | | | | | | | | Fix an issue that was reported in but unrelated to the main problem of SF bug 535905 (Evil Trashcan and GC interaction). The SETLOCAL() macro should not DECREF the local variable in-place and then store the new value; it should copy the old value to a temporary value, then store the new value, and then DECREF the temporary value. This is because it is possible that during the DECREF the frame is accessed by other code (e.g. a __del__ method or gc.collect()) and the variable would be pointing to already-freed memory. BUGFIX CANDIDATE!
* backport nascheme's checkin ofMichael W. Hudson2002-03-251-1/+1
| | | | | | revision 2.102 of sysmodule.c Fix wording of sys.exit docstring. Close SF bug 534113.
* backport tim_one's checkin ofMichael W. Hudson2002-03-111-5/+5
| | | | | | | | revision 2.248 of bltinmodule.c Docstring for filter(): Someone on the Tutor list reasonably complained that it didn't tell enough of the truth. Bugfix candidate (I guess -- it helps and it's harmless).
* backport tim_one's checkin ofMichael W. Hudson2002-03-051-14/+1
| | | | | | | | | | revision 2.22 of thread_nt.h SF patch 522961: Leak in Python/thread_nt.h, from Gerald S. Williams. A file-static "threads" dict mapped thread IDs to Windows handles, but was never referenced, and entries never got removed. This gets rid of the YAGNI-dict entirely. Bugfix candidate.
* Patch #50002: Display line information for bad \x escapes:Martin v. Löwis2002-03-034-17/+52
| | | | | | - recognize "SyntaxError"s by the print_file_and_line attribute. - add the syntaxerror attributes to all exceptions in compile.c. Fixes #221791
* SF #506611, fix sys.setprofile(), sys.settrace() core dumpsNeal Norwitz2002-03-031-2/+2
| | | | when no arguments are passed
* backport my checkin ofMichael W. Hudson2002-02-271-1/+1
| | | | | | | revision 1.16 of getcopyright.c date: 2002/02/27 13:29:46; author: mwh; state: Exp; lines: +1 -1 Add 2002 to PSF copyrights.
* Backport jackjansen's checkin of revision 2.37:Michael W. Hudson2002-02-231-0/+6
| | | | | | Workaround for what is probably a problem in Apple's gcc: <pthread.h> fails on a function pointer formal argument called "destructor", which is typedeffed as a different function pointer type in object.h.
* Fix a bunch of typos found by nnorwitz.Michael W. Hudson2002-02-062-5/+5
|
* It's merge time! (well, this is the last one for the moment)Michael W. Hudson2002-01-281-0/+3
| | | | | | | | | | | | | | | | | | | | | Backport gvanrossum's checkin of revision 2.236: A tentative fix for SF bug #503837 (Roeland Rengelink): type.__module__ problems (again?) This simply initializes the __module__ local in a class statement from the __name__ global. I'm not 100% sure that this is the correct fix, although it usually does the right thing. The problem is that if the class statement executes in a custom namespace, the __name__ global may be taken from __builtins__, in which case it would have the value __builtin__, or it may not exist at all (if the custom namespace also has a custom __builtins__), in which case the class statement will fail. Nevertheless, unless someone finds a better solution, this is a 2.2.1 bugfix too. (apparently noone has :()
* It's merge time!Michael W. Hudson2002-01-281-1/+4
| | | | | | Backport loewis' checkin of revision 2.7 (of dynload_hpux.c): Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.