summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Use symbolic METH_VARARGS instead of 1 for ml_flagsNeal Norwitz2002-03-312-20/+20
|
* Remove the CACHE_HASH and INTERN_STRINGS preprocessor symbols.Tim Peters2002-03-291-2/+0
|
* Call PyObject_GC_UnTrack before putting an object on the list of trash.Neil Schemenauer2002-03-291-2/+2
|
* add comment reminding people about class hierarchy in Doc/lib/libexcs.texSkip Montanaro2002-03-281-0/+5
|
* Fix an issue that was reported in but unrelated to the main problem ofGuido van Rossum2002-03-281-2/+10
| | | | | | | | | | | | | 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!
* Introduce two new flag bits that can be set in a PyMethodDef methodFred Drake2002-03-281-0/+7
| | | | | | | | | | | | | | | | | | | descriptor, as used for the tp_methods slot of a type. These new flag bits are both optional, and mutually exclusive. Most methods will not use either. These flags are used to create special method types which exist in the same namespace as normal methods without having to use tedious construction code to insert the new special method objects in the type's tp_dict after PyType_Ready() has been called. If METH_CLASS is specified, the method will represent a class method like that returned by the classmethod() built-in. If METH_STATIC is specified, the method will represent a static method like that returned by the staticmethod() built-in. These flags may not be used in the PyMethodDef table for modules since these special method types are not meaningful in that case; a ValueError will be raised if these flags are found in that context.
* Change sys_exit to use METH_VARARGS.Neal Norwitz2002-03-271-2/+5
| | | | sys.exit() now requires 0-1 arguments. Previously 2+ arguments were allowed.
* I've been waiting 8 years for KSR to re-emerge from bankruptcy. If theyTim Peters2002-03-251-4/+0
| | | | ever do, they can damn well #define _POSIX_THREADS their own damn selves.
* SF bug 480215: softspace confused in nested printTim Peters2002-03-241-10/+12
| | | | | | | | | | This fixes the symptom, but PRINT_ITEM has no way to know what (if anything) PyFile_WriteObject() writes unless the object being printed is a string. When the object isn't a string, this fix retains the guess that softspace should be set after PyFile_WriteObject(). We might want to say that it's the job of filelike-object write methods to leave the file's softspace in the correct state. That would probably be better -- but everyone relies on PRINT_ITEM to guess for them now.
* Fix wording of sys.exit docstring. Close SF bug 534113.Neil Schemenauer2002-03-231-1/+1
|
* Disable the parser hacks that enabled the "yield" keyword using a futureNeil Schemenauer2002-03-222-11/+15
| | | | statement.
* Re-enable GC of generator objects.Neil Schemenauer2002-03-181-6/+6
|
* Document that _POSIX_SEMAPHORES is predefined.Martin v. Löwis2002-03-171-0/+4
|
* Patch #525532: Add support for POSIX semaphores.Martin v. Löwis2002-03-171-0/+119
|
* Patch #504224: add plan9 threads include to thread.c.Martin v. Löwis2002-03-091-0/+4
|
* Patch #494045: patches errno and stat to cope on plan9.Martin v. Löwis2002-03-092-16/+36
|
* Docstring for filter(): Someone on the Tutor list reasonably complainedTim Peters2002-03-091-5/+5
| | | | | that it didn't tell enough of the truth. Bugfix candidate (I guess -- it helps and it's harmless).
* 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
* SF patch 522961: Leak in Python/thread_nt.h, from Gerald S. Williams.Tim Peters2002-02-281-14/+1
| | | | | | | 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.
* Add 2002 to PSF copyrights.Michael W. Hudson2002-02-271-1/+1
| | | | | Doc/README is odd; it assigns some copyright to the PSF in 2000, when I didn't think it existed...
* OS/2 EMX port changes (Python part of patch #450267):Andrew MacIntyre2002-02-264-3/+140
| | | | | | | | | Python/ dynload_shlib.c // EMX port emulates dlopen() etc. for DL extensions import.c // changes to support 8.3 DLL name limit (VACPP+EMX) // and case sensitive import semantics importdl.h thread_os2.h
* Move some opcodes to top of big eval_frame switch statement. SkipNeil Schemenauer2002-02-171-44/+45
| | | | | things_to_do block for a few common opcodes that don't do any real work. Closes SF patch #512256.
* LOAD_FAST: rearrange branches to favor the expected case, and getTim Peters2002-02-121-10/+7
| | | | rid of a redundant NULL-pointer check in the expected case.
* Removed a spurious }. (How did it get there in the first place??)Jack Jansen2002-02-111-2/+0
|
* Fix to the UTF-8 encoder: it failed on 0-length input strings.Marc-André Lemburg2002-02-071-1/+20
| | | | | | | | | | | | | | Fix for the UTF-8 decoder: it will now accept isolated surrogates (previously it raised an exception which causes round-trips to fail). Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for marshalling Unicode objects, so we better make sure it works for all Unicode code points, including isolated surrogates). Bumped the PYC magic in a non-standard way -- please review. This was needed because the old PYC format used illegal UTF-8 sequences for isolated high surrogates which now raise an exception.
* Got rid of an extra level of {} and funny formatting that was stillJack Jansen2002-02-011-58/+56
| | | | there because of the NeXT history.
* A new dynload_next, which actually only works on OSX but isn't renamed yet.Jack Jansen2002-02-011-112/+56
| | | | | | | | | | By default every module is imported in its own namespace, but this can be changed by defining USE_DYLD_GLOBAL_NAMESPACE. In a future version this define will be replaced by a runtime setting, but that needs a bit more thought. This code is largely based on code and feedback from Steven Majewski, Marcel Prastawa, Manoj Plakal and other on pythonmac-sig.
* Fix missing space between words. Bugfix candidate.Neal Norwitz2002-01-291-1/+1
|
* Fix spelling mistakes. Bugfix candidates.Neal Norwitz2002-01-292-4/+4
|
* Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.Martin v. Löwis2002-01-261-1/+4
|
* Fix forMichael W. Hudson2002-01-231-2/+2
| | | | | | [ #496154 ] Typos in dynload_beos.c as suggested in the report. A little embarassing; 2.2.1 candidate for sure.
* Remove the unused & broken PyThread_*_sema() functions and related constants.Fred Drake2002-01-1910-550/+0
| | | | This closes SF patch #504215.
* A tentative fix for SF bug #503837 (Roeland Rengelink):Guido van Rossum2002-01-151-0/+3
| | | | | | | | | | | | | | | | 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.
* Workaround for what is probably a problem in Apple's gcc: <pthread.h> failsJack Jansen2002-01-151-0/+6
| | | | | on a function pointer formal argument called "destructor", which is typedeffed as a different function pointer type in object.h.
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-128-32/+1
|
* Fixed "u#" parser marker to pass through Unicode objects as-is withoutMarc-André Lemburg2002-01-091-2/+6
| | | | | | going through the buffer interface API. Added tests for this to the _testcapi module and updated docs.
* Patch #494783: Rename cmp_op enumerators.Martin v. Löwis2002-01-012-29/+33
|
* Patch #497098: build support for GNU/Hurd.Martin v. Löwis2002-01-011-3/+15
|
* SF bug #496549 -Qnew and in-place division "/=".Tim Peters2001-12-251-11/+14
| | | | | | | | eval_frame(): Under -Qnew, INPLACE_DIVIDE wasn't getting handed off to INPLACE_TRUE_DIVIDE (like BINARY_DIVIDE was getting handed off to BINARY_TRUE_DIVIDE). Bugfix candidate.
* PyOS_vsnprintf(): Change PyMem_Malloc() call to PyMem_MALLOC() macro,Barry Warsaw2001-12-211-2/+2
| | | | | | | (ditto for PyMem_Free() -> PyMem_FREE()) to fix and close SF bug #495875 on systems that HAVE_SNPRINTF=0. Check in on both release-22 branch and trunk.
* SF bug #494668: PUSH() should assert-fail on overflow.Tim Peters2001-12-191-2/+4
| | | | | eval_frame(): Added asserts to the top of the eval loop, to verify that the eval stack pointer is in bounds, plus some comments.
* Patch #494384: Disable more Unicode API if Unicode is not used.Martin v. Löwis2001-12-181-0/+2
|
* _PyEval_SliceIndex(): explain why a NULL argument is allowed (thanksTim Peters2001-12-161-4/+4
| | | | to Guido for the revelation).
* _PyEval_SliceIndex(): Repaired the comments, and added XXX commentsTim Peters2001-12-161-6/+11
| | | | | about its dubious treatment of NULL (also opened a bug report on that, but don't want to risk changing it this late in the 2.2 game).
* Fix for SF bug [ #492403 ] exec() segfaults on closure's func_codeJeremy Hylton2001-12-133-5/+10
| | | | | | | | Based on the patch from Danny Yoo. The fix is in exec_statement() in ceval.c. There are also changes to introduce use of PyCode_GetNumFree() in several places.
* Add a comment explaining the st_symbols cache.Jeremy Hylton2001-12-101-1/+15
|
* PySymtableEntry_New(): I'm not sure what this routine is doing, but itTim Peters2001-12-081-0/+1
| | | | | | | | was obviously leaking an int object when whatever the heck it's looking for was found. Repaired that. This accounts for why entering function and class definitions at an interactive prompt leaked a reference to the integer 1 each time. Bugfix candidate.
* Missing DECREFs when exception is raised in sys.excepthook.Jeremy Hylton2001-12-071-0/+3
| | | | | | | Bug fix candidate for 2.1 branch. (I imagine the other recent leak patches are bug fix candidates, too, but I forgot to mark mine as such.)
* Don't fail on importing things with undefined references. Unfortunately weJack Jansen2001-12-061-1/+2
| | | | | | still fail on importing modules that link with libraries that fail their initialization code (such as windowing libraries when we don't have access to the window server) and that is what I really wanted to fix.