summaryrefslogtreecommitdiff
path: root/Python
AgeCommit message (Collapse)AuthorLines
2008-03-02Prepare for 2.3.7c1.v2.3.7c1Martin v. Löwis-1/+1
2008-03-02Backport of r61180:Martin v. Löwis-4/+56
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.
2005-01-27Partially revert #1074011; don't try to fflush stdin.Martin v. Löwis-1/+10
2005-01-25happy new year!Anthony Baxter-1/+1
2005-01-23Flush std{in,out,err} before closing it. Fixes #1074011.Martin v. Löwis-3/+10
2005-01-17backport: make thread stack size compile-time tunable on OS/2Andrew MacIntyre-1/+5
2004-12-01Taken from 2.4/HEAD:Matthias Klose-0/+6
- Bug #875692: Improve signal handling, especially when using threads, by forcing an early re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not cleared by Py_MakePendingCalls().
2004-11-09Backported thread fixes from 2.4 (by mostly copying pystate.c over from 2.4):Armin Rigo-64/+180
* using malloc() and free() directly, as explained in the new comment * coding style in the PyGILState_*() functions * the recent destroy-tstate-without-holding-the-GIL bug * lock fixes and many more comments in thread.c
2004-09-23Fix for SF bug #1029475 : reload() doesn't work with PEP 302 loaders.Phillip J. Eby-4/+7
(Backport to 2.3 maintenance branch.)
2004-08-25Patch #1015021: Stop claiming that coerce can return None.Martin v. Löwis-4/+4
2004-08-06Backport SF bug #1004088:Raymond Hettinger-0/+4
big code objects (>64K) may be optimized incorrectly
2004-07-21Patch #984714: Properly diagnose E_DECODE errors.Martin v. Löwis-0/+3
2004-07-02When importing an extension on Windows, the code reads the PE 'importThomas Heller-0/+12
table' of the dll, to make sure that the dll really was build for the correct Python version. It does this by looking for an entry 'pythonXY.dll' (X.Y is the Python version number). The code now checks the size of the dll's import table before reading entries from it. Before this patch, the code crashed trying to read the import table when the size was zero (as in Win2k's wmi.dll, for example). Look for imports of 'pythonXY_d.dll' in a debug build instead of 'pythonXY.dll'. Fixes SF 951851: Crash when reading "import table" of certain windows dlls.
2004-06-07Fix a refcount bug in an obscure code corner.Thomas Heller-0/+1
2004-05-13better yetAnthony Baxter-1/+1
2004-05-13how many @*&(*$# places do we include the years??Anthony Baxter-1/+1
2004-03-29OS/2 VACPP build updates/fixesAndrew MacIntyre-1/+1
2004-03-23Decref all if ensure_fromlist fails. Fixes #876533.Martin v. Löwis-2/+3
2004-03-22Backport for bug fix of 2.204.Armin Rigo-6/+8
2003-12-05Remove the PendingDeprecationWarning from apply(). apply() willFred Drake-4/+0
remain deprecated in the documentation.
2003-12-01Py_Finalize(): disabled the second call of cyclic gc, and added extensiveTim Peters-2/+27
comments about why both calls to cyclic gc here can cause problems. Already fixed on the trunk. Since the calls were introduced in 2.3, that's the end of it.
2003-11-13Patch #804543: strdup saved locales.Martin v. Löwis-1/+2
2003-10-25regressing the performance bugfix -- Guido wants the performance bug leftAlex Martelli-1/+1
alone, because there can be no guarantee re the semantics of += vs + .
2003-10-25changed builtin_sum to use PyNumber_InPlaceAdd -- unchanged semantics butAlex Martelli-1/+1
fixes performance bug with sum(lotsoflists, []).
2003-10-20Backport checkin:Walter Dörwald-1/+1
Fix a bunch of typos in documentation, docstrings and comments. (From SF patch #810751)
2003-09-22Backport fix for SF808594: leak on lambda with duplicate arguments.Jeremy Hylton-15/+16
2003-09-20Patch #805613: Fix usage of the PTH library.Martin v. Löwis-1/+7
2003-09-16Backport leak fix for new code objects.Raymond Hettinger-17/+16
2003-09-04Patch #794826: Add __file__ in dynamically loaded modules for multipleMartin v. Löwis-2/+3
interpreters. Fixes #698282.
2003-08-18Backport checkin:Walter Dörwald-3/+10
Fix a crash: when sq_item failed the code continued blindly and used the NULL pointer. (Detected by Michael Hudson, patch provided by Neal Norwitz). Fix refcounting leak in filtertuple().
2003-08-14Backport checkin:Walter Dörwald-1/+1
Fix refcount leak in the UnicodeError constructor: When parsing the constructor arguments failed, a reference to the argument tuple was leaked.
2003-08-12Backport checkins:Walter Dörwald-5/+21
* Enhance message for UnicodeEncodeError and UnicodeTranslateError. If there is only one bad character it will now be printed in a form that is a valid Python string. * Add a unicode prefix to the characters in the UnicodeEncodeError and UnicodeTranslateError message.
2003-08-11Repeat my refcount & cut&paste fixes on the branch.Michael W. Hudson-3/+1
2003-08-09Move initialization of sys.std{in,out}.encoding to Py_Initialize.Martin v. Löwis-33/+51
Verify that the encoding actually exists. Fixes #775985.
2003-07-22Patch 775605: Cygwin pthread_sigmask() workaround patchJason Tishler-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.
2003-07-16Correct previous patch looking for warnings module: sys.modules, notMark Hammond-1/+1
sys.__modules__.
2003-07-15Fix [ 771097 ] frozen programs fail due to implicit import of "warnings".Mark Hammond-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.
2003-07-15SF patch 763201: handling of SyntaxErrors in symbol table buildJeremy Hylton-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.
2003-07-13Initialize thread_id to 0 in unthreaded build. Fixes #770247.Martin v. Löwis-0/+4
2003-07-11- fix typoFred Drake-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
2003-07-06New function sys.getcheckinterval(), to complement setcheckinterval().Tim Peters-0/+12
2003-07-04An Anonymous Coward on c.l.py posted a little program with bizarreTim Peters-22/+29
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.
2003-06-29Fix SF #762455, segfault when sys.stdout is changed in getattrNeal Norwitz-0/+6
Will backport.
2003-06-28Add PyThreadState_SetAsyncExc(long, PyObject *).Guido van Rossum-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.
2003-06-21Better error messageJeremy Hylton-1/+7
2003-06-20Removed bytecode transformation for sequence packing/unpacking.Raymond Hettinger-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
2003-06-16Don't use the module object setattr when importing submodules. Instead,Neil Schemenauer-18/+38
operate on the module dictionary directly. This prevents spurious depreciation warnings from being raised if a submodule name shadows a builtin name.
2003-06-01Use fast_next_opcode shortcut for forward jump opcodes (it's safe andNeil Schemenauer-5/+5
gives a small speedup).
2003-05-31SF bug #733667: kwargs handled incorrectlyRaymond Hettinger-1/+1
The fast_function() inlining optimization only applies when there are zero keyword arguments.
2003-05-30Don't use fast_next_opcode for JUMP_* opcodes. This fixes the problemNeil Schemenauer-6/+6
reported by Kurt B. Kaiser.