| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
of a "in" or "not in" test.
|
|
|
|
|
| |
Inspired by Skip's idea to recognize the throw-away nature of sequences
in this context and to transform their type to one with better performance.
|
|
|
|
|
|
|
| |
If we exit via the break here, we need to set ff_last_lineno or
FUTURE_POSSIBLE() will remain true. The bug affected statements
containing a variety of expressions, but not all expressions. It has
been present since Python 2.2.
|
|
|
|
| |
Backported to 2.3 and 2.4.
|
|
|
|
| |
Saves space in the presence of code like: (None,)*10000
|
| |
|
|
|
|
| |
Will backport to 2.4 and 2.3.
|
|
|
|
| |
inscrutable READ_TIMESTAMP.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
bytecodes from the previously saved .pyc files. Fixed by disabling the static
optimization of BINARY_DIVIDE between two constants.
|
| |
|
|
|
|
|
| |
immediately segfaults, due to a typo! This was obviously never tested...
Added a test for it, and also fixed the documentation.
|
|
|
|
| |
expression in min_max() to shut gcc up.
|
|
|
|
| |
(First draft of patch contributed by Steven Bethard.)
|
|
|
|
|
|
|
|
|
| |
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().
M Misc/NEWS
M Python/ceval.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyGILState_Ensure(): The fix in 2.4a3 for bug 1010677 reintroduced thread
shutdown race bug 225673. Repaired by (once again) ensuring the GIL is
held whenever deleting a thread state.
Alas, there's no useful test case for this shy bug. Four years ago, only
Guido could provoke it, on his box, and today only Armin can provoke it
on his box. I've never been able to provoke it (but not for lack of
trying!).
This is a critical fix for 2.3.5 too, since the fix for 1010677 got
backported there already and so also reintroduced 225673. I don't intend to
backport this fix. For whoever (if anyone) does, there are other thread
fixes in 2.4 that need backporting too, and I bet they need to happen first
for this patch to apply cleanly.
|
|
|
|
| |
There is no test for this change, because there is no way to provoke memory errors on demand. Test suite passes, though.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Contributed by Bob Ippolito.)
This patch trims down the Python core on Darwin by making it
independent of CoreFoundation and CoreServices. It does this by:
Changed linker flags in configure/configure.in
Removed the unused PyMac_GetAppletScriptFile
Moved the implementation of PyMac_StrError to the MacOS module
Moved the implementation of PyMac_GetFullPathname to the
Carbon.File module
|
|
|
|
|
|
| |
everytime a LOAD_CONSTANT is encountered, created, or overwritten.
Added two tests to cover cases affected by the patch.
|
|
|
|
| |
No longer assumes that the input is NOP free.
|
| |
|
|
|
|
|
|
|
|
| |
* Use simpler, faster two pass algorithm for markblocks().
* Free the blocks variable if not NULL and exiting without change.
* Verify that the rest of the compiler has not set an exception.
* Make the test for tuple of constants less restrictive.
* Embellish the comment for chained conditional jumps.
|
|
|
|
|
|
|
| |
Peepholer could be fooled into misidentifying a tuple_of_constants.
Added code to count consecutive occurrences of LOAD_CONST.
Use the count to weed out the misidentified cases.
Added a unittest.
|
| |
|
|
|
|
| |
a few remaining calls to signal() were converted to PyOS_setsig().
|
|
|
|
|
| |
Coghlan, for determining whether PyEval_InitThreads() has been called.
Also purged the undocumented+unused _PyThread_Started int.
|
|
|
|
|
|
|
| |
thread's id can't get duplicated, because (of course!) the current thread
is still running. The code should work either way, but reverting the
gratuitous change should make backporting easier, and gets the bad
reasoning out of 2.35's new comments.
|
|
|
|
|
|
| |
This appears to finish repairs for SF bug 1041645.
This is a critical bugfix.
|
|
|
|
|
|
| |
release-build failures noted in bug 1041645.
This is a critical bugfix. I'm not going to backport it, though (no time).
|
|
|
|
|
| |
that must be done under protection of the GIL, for reasons explained in
new comments.
|
|
|
|
|
|
|
|
|
| |
can fail, check its return value, and die if it does fail.
_PyGILState_Init(): Assert that the thread doesn't already have an
association for autoTLSkey. If it does, PyThread_set_key_value() will
ignore the attempt to (re)set the association, which the code clearly
doesn't want.
|
|
|
|
|
|
|
|
|
| |
code.
PyThread_set_key_value(): It's clear that this code assumes the passed-in
value isn't NULL, so document that it must not be, and assert that it
isn't. It remains unclear whether existing callers want the odd semantics
actually implemented by this function.
|
| |
|
| |
|
|
|
|
| |
(Contributed by Nick Coghlan.)
|
| |
|
| |
|
|
|
|
|
| |
Rather than introduce new logic, took the approach of making the message
itself more general.
|
| |
|
|
|
|
| |
(Suggested by Michael Hudson.)
|
| |
|
|
|
|
|
|
|
|
| |
Example:
>>> import dis
>>> dis.dis(compile('1,2,3', '', 'eval'))
0 0 LOAD_CONST 3 ((1, 2, 3))
3 RETURN_VALUE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
High level error message was stomping useful detailed messages from lower
level routines.
The new approach is to augment string error messages returned by the low
level routines. The provides both high and low level information. If
the exception value is not a string, no changes are made.
To see the improved messages in action, type:
import random
class R(random): pass
class B(bool): pass
|
|
|
|
|
| |
"from blah import (foo, bar
baz, bongo)"
|