| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
|
|
|
|
| |
__STDC__ is defined (or something like that ...).
|
| |
|
|
|
|
|
|
| |
Ensure that even if FormatMessage fails we (a) don't crash, and (b) provide something useful.
Bugfix candidate.
|
| |
|
|
|
|
|
|
|
| |
all along. Before instr_lb tended to be too high.
I don't think this actually makes any difference, given what the compiler
produces, but it makes me a bit happier.
|
|
|
|
| |
Bugfix candidate.
|
| |
|
|
|
|
|
|
|
| |
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 ;-).
|
| |
|
|
|
|
|
|
|
| |
(Same problem as last checkin for SF bug 610610)
Need to clear the error and proceed.
Backport candidate
|
|
|
|
|
|
|
|
| |
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.
Definite backport candidate (this dates all the way to Python 2.0).
|
|
|
|
|
| |
This makes things a touch more like 2.2. Read the comments in
Python/ceval.c for more details.
|
|
|
|
| |
http://python.org/sf/602191
|
|
|
|
|
| |
missing key. (Also added a guard to SyntaxError__str__ to prevent
calling PyString_Check(NULL).)
|
|
|
|
|
|
| |
than when this interval was first established. Checking too frequently just
adds needless overhead because most of the time there is nothing to do and
no other threads ready to run.
|
|
|
|
|
|
|
|
|
|
| |
globals, _Py_Ticker and _Py_CheckInterval. This also implements Jeremy's
shortcut in Py_AddPendingCall that zeroes out _Py_Ticker. This allows the
test in the main loop to only test a single value.
The gory details are at
http://python.org/sf/602191
|
| |
|
|
|
|
| |
(Spotted by Neal Norwitz)
|
|
|
|
|
| |
UnicodeTranslateError doesn't have an encoding attribute.
(Spotted by Neal Norwitz)
|
|
|
|
| |
to prevent buffer overflows (spotted by Neal Norwitz).
|
| |
|
|
|
|
|
| |
to 62011. This should get the snake-farm to throw away its old .pyc
files, amongst others.
|
|
|
|
|
|
|
|
|
|
| |
Use a slightly different strategy to determine when not to call the line
trace function. This removes the need for the RETURN_NONE opcode, so
that's gone again. Update docs and comments to match.
Thanks to Neal and Armin!
Also add a test suite. This should have come with the original patch...
|
|
|
|
|
|
| |
simply PyErr_SetFromErrno
This closes bug 599163.
|
| |
|
| |
|
|
|
|
|
|
| |
required number of args is 0 or 1 -- were reversed. Also change "1"
into "exactly one", the same words as used elsewhere for this
condition.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in LOAD_GLOBAL. Besides saving a C function call, it saves checks
whether f_globals and f_builtins are dicts, and extracting and testing
the string object's hash code is done only once. We bail out of the
inlining if the name is not exactly a string, or when its hash is -1;
because of interning, neither should ever happen. I believe interning
guarantees that the hash code is set, and I believe that the 'names'
tuple of a code object always contains interned strings, but I'm not
assuming that -- I'm simply testing hash != -1.
On my home machine, this makes a pystone variant with new-style
classes and slots run at the same speed as classic pystone! (With
new-style classes but without slots, it is still a lot slower.)
|
|
|
|
|
|
|
|
|
| |
Also, don't handle METH_OLDARGS on the fast path. All the interesting
builtins have been converted to use METH_NOARGS, METH_O, or
METH_VARARGS.
Result is another 1-2% speedup. If I can cobble together 10 of these,
it might make a difference.
|
|
|
|
|
|
|
| |
This makes the code much easier to ready, because it is at a sane
indentation level. On my box this shows a 1-2% speedup, which means
nothing, except that I'm not going to worry about the performance
effects of the change.
|
|
|
|
|
|
|
| |
nothing special done if keyword arguments were present, so test for
that earlier and fall through to the normal case if there are any.
This ought to slow down CFunction calls with keyword args, but I don't
care; it's a tiny (1%) improvement for pystone.
|
|
|
|
|
|
|
|
|
|
| |
- Use PyObject_Call() instead of PyEval_CallObject(), saves several
layers of calls and checks.
- Pre-allocate the argument tuple rather than calling Py_BuildValue()
each time round the loop.
- For filter(None, seq), avoid an INCREF and a DECREF.
|
|
|
|
|
|
| |
warning for 'global None', but that's either accompanied by an
assignment to None, which will trigger a warning, or not, in which
case it's harmless. :-)
|
|
|
|
|
| |
Still to do: function definition arguments (including *None and
**None).
|
|
|
|
|
| |
named 'None'. Still to do: function definition parameter lists, and
function call keyword arguments.
|
|
|
|
|
|
| |
argument should be called 'c', like everywhere else. Renamed a
complex variable 'c' to 'z' and moved it inside the only scope where
it's used.
|
|
|
|
|
|
|
|
| |
[ 587993 ] SET_LINENO killer
Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab.
Many sundry changes to document and adapt to this change.
|
|
|
|
|
| |
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
|
|
|
|
|
| |
sense now that extension types can support __init__ directly rather
than requiring function constructors.
|
|
|
|
|
| |
the future. Changed PEP 237 hex constant warnings from
DeprecationWarning to FutureWarning. Updated the documentation.
|
| |
|
| |
|
|
|
|
| |
correct filename and line number are reported.
|
|
|
|
|
| |
a lot of work, including I/O (e.g. to import warnings.py), which might
affect errno.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
currently return inconsistent results for ints and longs; in
particular: hex/oct/%u/%o/%x/%X of negative short ints, and x<<n that
either loses bits or changes sign. (No warnings for repr() of a long,
though that will also change to lose the trailing 'L' eventually.)
This introduces some warnings in the test suite; I'll take care of
those later.
|