summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Patch #794826: Add __file__ in dynamically loaded modules for multipleMartin v. Löwis2003-09-041-2/+3
| | | | interpreters. Fixes #698282. Will backport to 2.3.
* Bug #794140: cygwin builds do not embedJason Tishler2003-09-042-2/+2
| | | | | | The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim).
* Fix for SF bug [ 784075 ] Fatal Python error: unknown scopeJeremy Hylton2003-08-281-4/+12
| | | | | Make sure the inner function is not compiled when there is a syntax error in the default arguments.
* Fix a crash: when sq_item failed the code continued blindly and used theWalter Dörwald2003-08-181-3/+10
| | | | | | NULL pointer. (Detected by Michael Hudson, patch provided by Neal Norwitz). Fix refcounting leak in filtertuple().
* Fix refcount leak in the UnicodeError constructor:Walter Dörwald2003-08-141-1/+1
| | | | | When parsing the constructor arguments failed, a reference to the argument tuple was leaked.
* Make filter(bool, ...) as fast as filter(None, ...).Neil Schemenauer2003-08-141-1/+1
|
* Add a unicode prefix to the characters in the UnicodeEncodeError andWalter Dörwald2003-08-121-6/+6
| | | | UnicodeTranslateError message.
* Enhance message for UnicodeEncodeError and UnicodeTranslateError.Walter Dörwald2003-08-121-5/+21
| | | | | If there is only one bad character it will now be printed in a form that is a valid Python string.
* Fix refcounting and cut & paste error (?) in last checkin.Michael W. Hudson2003-08-111-3/+1
| | | | This should go onto release23-maint, too.
* Move initialization of sys.std{in,out}.encoding to Py_Initialize.Martin v. Löwis2003-08-092-33/+51
| | | | | Verify that the encoding actually exists. Fixes #775985. Will backport to 2.3.
* As discussed on python-dev, changed builtin.zip() to handle zero argumentsRaymond Hettinger2003-08-021-5/+3
| | | | by returning an empty list instead of raising a TypeError.
* Patch 775605: Cygwin pthread_sigmask() workaround patchJason Tishler2003-07-221-1/+1
| | | | | | | | | | | | | | | | | | Cygwin's pthread_sigmask() implementation appears to be buggy. This patch works around this problem by using sigprocmask() instead. This patch is implemented in a general way so it could be used by other platforms too. If this approach is deemed too risky, then I can work up a patch that just hacks Python/thread_pthread.h for Cygwin. Note that I tested this patch against 2.3c1 under Red Hat Linux 8.0 too. [snip] And finally, I need someone to regenerate pyconfig.h.in and configure with the same versions of the autotools that are normally used by Python. Neal kindly regenerated pyconfig.h.in and configure for me.
* Correct previous patch looking for warnings module: sys.modules, notMark Hammond2003-07-161-1/+1
| | | | sys.__modules__.
* Fix [ 771097 ] frozen programs fail due to implicit import of "warnings".Mark Hammond2003-07-152-8/+40
| | | | | | If the initial import of warnings fails, clear the error. When the module is actually needed, if the original import failed, see if it has managed to find its way to sys.modules yet and if so, remember it.
* SF patch 763201: handling of SyntaxErrors in symbol table buildJeremy Hylton2003-07-151-33/+47
| | | | | | | | | | | | | | Fixes for three related bugs, including errors that caused a script to be ignored without printing an error message. The key problem was a bad interaction between syntax warnings and syntax errors. If an exception was already set when a warning was issued, the warning could clobber the exception. The PyErr_Occurred() check in issue_warning() isn't entirely satisfying (the caller should know whether there was already an error), but a better solution isn't immediately obvious. Bug fix candidate.
* Initialize thread_id to 0 in unthreaded build. Fixes #770247.Martin v. Löwis2003-07-131-0/+4
|
* - fix typoFred Drake2003-07-111-1/+1
| | | | | - there's a weird variable name here (zimpimport), but I'll leave that for someone that's familiar with the ZIP import support
* New function sys.getcheckinterval(), to complement setcheckinterval().Tim Peters2003-07-061-0/+12
|
* An Anonymous Coward on c.l.py posted a little program with bizarreTim Peters2003-07-041-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior, creating many threads very quickly. A long debugging session revealed that the Windows implementation of PyThread_start_new_thread() was choked with "laziness" errors: 1. It checked MS _beginthread() for a failure return, but when that happened it returned heap trash as the function result, instead of an id of -1 (the proper error-return value). 2. It didn't consider that the Win32 CreateSemaphore() can fail. 3. When creating a great many threads very quickly, it's quite possible that any particular bootstrap call can take virtually any amount of time to return. But the code waited for a maximum of 5 seconds, and didn't check to see whether the semaphore it was waiting for got signaled. If it in fact timed out, the function could again return heap trash as the function result. This is actually what confused the test program, as the heap trash usually turned out to be 0, and then multiple threads all got id 0 simultaneously, confusing the hell out of threading.py's _active dict (mapping id to thread object). A variety of baffling behaviors followed from that. WRT #1 and #2, error returns are checked now, and "thread.error: can't start new thread" gets raised now if a new thread (or new semaphore) can't be created. WRT #3, we now wait for the semaphore without a timeout. Also removed useless local vrbls, folded long lines, and changed callobj to a stack auto (it was going thru malloc/free instead, for no discernible reason). Bugfix candidate.
* Fix SF #762455, segfault when sys.stdout is changed in getattrNeal Norwitz2003-06-291-0/+6
| | | | Will backport.
* Add PyThreadState_SetAsyncExc(long, PyObject *).Guido van Rossum2003-06-282-1/+47
| | | | | | | | | A new API (only accessible from C) to interrupt a thread by sending it an exception. This is not always effective, but might help some people. Requested by Just van Rossum and Alex Martelli. It is intentional that you have to write your own C extension to call it from Python. Docs will have to wait.
* Better error messageJeremy Hylton2003-06-211-1/+7
|
* Removed bytecode transformation for sequence packing/unpacking.Raymond Hettinger2003-06-201-28/+0
| | | | | | | It depended on the previously removed basic block checker to prevent a jump into the middle of the transformed block. Clears SF 757818: tuple assignment -- SystemError: unknown opcode
* Don't use the module object setattr when importing submodules. Instead,Neil Schemenauer2003-06-161-18/+38
| | | | | | operate on the module dictionary directly. This prevents spurious depreciation warnings from being raised if a submodule name shadows a builtin name.
* Use fast_next_opcode shortcut for forward jump opcodes (it's safe andNeil Schemenauer2003-06-011-5/+5
| | | | gives a small speedup).
* SF bug #733667: kwargs handled incorrectlyRaymond Hettinger2003-05-311-1/+1
| | | | | The fast_function() inlining optimization only applies when there are zero keyword arguments.
* Don't use fast_next_opcode for JUMP_* opcodes. This fixes the problemNeil Schemenauer2003-05-301-6/+6
| | | | reported by Kurt B. Kaiser.
* Added functions CFObj_New and CFObj_Convert, general functions to convertJack Jansen2003-05-271-0/+3
| | | | between CF objects and their Python representation. Fixes 734695.
* SF bug #644345, Poor error message for augmented assignNeal Norwitz2003-05-221-2/+2
| | | | Update error message. Hopefully this is clearer to some people.
* Use macro to get length of list.Jeremy Hylton2003-05-221-8/+2
| | | | Remove comment about how code used to work.
* Remove comment with very long lines that explained what the code usedJeremy Hylton2003-05-221-3/+3
| | | | | | | to do. XXX Please be careful when checking in patches to avoid checking in junk that explains what the patched code used to do.
* Fix for SF [ 734869 ] Lambda functions in list comprehensionsJeremy Hylton2003-05-212-14/+24
| | | | | | The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry. Bugfix candidate.
* cmp_type(): The grammar stopped allowing '=' as a comparison operatorTim Peters2003-05-121-3/+2
| | | | | about a decade ago. Put the code still allowing for it in cmp_type() out of its lonely misery.
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-1/+1
| | | | riscospath.extsep, and use os.extsep throughout.
* Patch #612627: Add encoding attribute to file objects, and determineMartin v. Löwis2003-05-101-0/+43
| | | | the terminal encoding on Windows and Unix.
* Patch #708604: Check more function results. Will backport to 2.2.Martin v. Löwis2003-05-031-7/+37
|
* Patch #684981: Add cleanup capability for argument parsers. Fixes 501716.Martin v. Löwis2003-05-031-28/+90
|
* Patch #708495: Port more stuff to OpenVMS.Martin v. Löwis2003-05-032-0/+47
|
* Patch #729300: Disable error message if Python is not built for threads.Martin v. Löwis2003-05-011-1/+1
|
* Use Tim's suggestion to fixMichael W. Hudson2003-04-291-1/+1
| | | | | | | | | [ 708901 ] Lineno calculation sometimes broken A one line patch to compile.c and a rather-more-than-one-line patch to test_dis. Hey ho. Possibly a backport candidate -- tho' lnotab is less used in 2.2...
* Armin Rigo's fix & test forMichael W. Hudson2003-04-291-9/+10
| | | | | | [ 729622 ] line tracing hook errors with massaging from me to integrate test into test suite.
* Revert the previous enhancement to the bytecode optimizer.Raymond Hettinger2003-04-242-86/+9
| | | | The additional code complexity and new NOP opcode were not worth it.
* some more error-message enhancementsAlex Martelli2003-04-231-10/+10
|
* complete and clarify some error messages for range()Alex Martelli2003-04-231-5/+5
|
* PyGILState cleanup was too early - destructors called via module cleanup may ↵Mark Hammond2003-04-221-5/+5
| | | | use the API.
* fixed a potential refcount bug (thanks Raymond!).Alex Martelli2003-04-221-1/+1
|
* Adding new built-in function sum, with docs and tests.Alex Martelli2003-04-221-0/+61
|
* Improved the bytecode optimizer.Raymond Hettinger2003-04-222-9/+86
| | | | | | | | | | | | | | * Can now test for basic blocks. * Optimize inverted comparisions. * Optimize unary_not followed by a conditional jump. * Added a new opcode, NOP, to keep code size constant. * Applied NOP to previous transformations where appropriate. Note, the NOP would not be necessary if other functions were added to re-target jump addresses and update the co_lnotab mapping. That would yield slightly faster and cleaner bytecode at the expense of optimizer simplicity and of keeping it decoupled from the line-numbering structure.
* handle_system_exit(): This leaked the current exception info, inTim Peters2003-04-191-4/+16
| | | | | | | particular leaving the traceback object (and everything reachable from it) alive throughout shutdown. The patch is mostly from Guido. Bugfix candidate.
* New PyGILState_ API - implements pep 311, from patch 684256.Mark Hammond2003-04-195-81/+265
|