| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
some warnings from Klokwork. They verify the assumptions of the format
of svn version output.
The assert in the thread module helped debug a problem on HP-UX.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* unified the way intobject, longobject and mystrtoul handle
values around -sys.maxint-1.
* in general, trying to entierely avoid overflows in any computation
involving signed ints or longs is extremely involved. Fixed a few
simple cases where a compiler might be too clever (but that's all
guesswork).
* more overflow checks against bad data in marshal.c.
* 2.5 specific: fixed a number of places that were still confusing int
and Py_ssize_t. Some of them could potentially have caused
"real-world" breakage.
* list.pop(x): fixing overflow issues on x was messy. I just reverted
to PyArg_ParseTuple("n"), which does the right thing. (An obscure
test was trying to give a Decimal to list.pop()... doesn't make
sense any more IMHO)
* trying to write a few tests...
|
|
|
|
| |
Many (all?) of these could be backported.
|
|
|
|
|
|
| |
branch into the trunk. This adds a new sys._current_frames()
function, which returns a dict mapping thread id to topmost
thread stack frame.
|
|
|
|
|
|
|
|
| |
exact maximum size someone guesses is needed. In this case, if
we're really worried about extreme integers, then "cp%d" can
actually need 14 bytes (2 for "cp" + 1 for \0 at the end +
11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is
actually saved by making a stack-local buffer tiny.
|
|
|
|
|
|
| |
top of 10 possible digits for an int.
Closes bug #1501223.
|
|
|
|
| |
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
|
| |
|
|
|
|
| |
in dicts and sets when computing the total number of references.
|
| |
|
|
|
|
|
|
|
| |
python .
python < .
both print a message, return non-zero and do not core dump.
|
|
|
|
|
| |
Add (int) casts to silence compiler warnings.
Raise Python exceptions for overflows.
|
|
|
|
| |
I tried to handle Win64 properly, but please review.
|
| |
|
| |
|
| |
|
|
|
|
| |
Probably should be backported.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add C API function Py_GetBuildNumber(), add it to the interactive prompt
banner (i.e. Py_GetBuildInfo()), and add it as the sys.build_number
attribute. The build number is a string instead of an int because it may
contain a trailing 'M' if there are local modifications.
|
|
|
|
|
|
|
|
|
|
| |
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.
The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
|
|
|
|
|
|
|
| |
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.
Will backport.
|
| |
|
|
|
|
| |
Backported to 2.3 and 2.4.
|
|
|
|
| |
Will backport to 2.4 and 2.3.
|
|
|
|
|
|
| |
[ 1005891 ] support --with-tsc on PPC
plus a trivial change to settscdump's docstring and a Misc/NEWS entry.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Verify that the encoding actually exists. Fixes #775985.
Will backport to 2.3.
|
| |
|
|
|
|
| |
the terminal encoding on Windows and Unix.
|
| |
|
|
|
|
|
|
| |
recursively.
- pdb has a new command, "debug", which lets you step through
arbitrary code from the debugger's (pdb) prompt.
|
|
|
|
|
| |
and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding.
Adjust test case.
|
|
|
|
|
|
| |
rarely needed, but can sometimes be useful to release objects
referenced by the traceback held in sys.exc_info()[2]. (SF patch
#693195.) Thanks to Kevin Jacobs!
|
|
|
|
|
| |
turned into an absolute pathname, unless it is the empty string.
(SF patch #664376, by Skip Montanaro.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-DCALL_PROFILE: Count the number of function calls executed.
When this symbol is defined, the ceval mainloop and helper functions
count the number of function calls made. It keeps detailed statistics
about what kind of object was called and whether the call hit any of
the special fast paths in the code.
Optimization:
When we take the fast_function() path, which seems to be taken for
most function calls, and there is minimal frame setup to do, avoid
call PyEval_EvalCodeEx(). The eval code ex function does a lot of
work to handle keywords args and star args, free variables,
generators, etc. The inlined version simply allocates the frame and
copies the arguments values into the frame.
The optimization gets a little help from compile.c which adds a
CO_NOFREE flag to code objects that don't have free variables or cell
variables. This change allows fast_function() to get into the fast
path with fewer tests.
I measure a couple of percent speedup in pystone with this change, but
there's surely more that can be done.
|
|
|
|
|
|
|
|
| |
This fixes the problem on Windows - that's the only system where I can
test it.
It leaves sys.argv alone and only changes sys.path[0] to an absolute
pathname.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
that have taken me "too long" to reverse-engineer over the years.
Vastly reduced the nesting level and redundancy of #ifdef-ery.
Took a light stab at repairing comments that are no longer true.
sys_gettotalrefcount(): Changed to enable under Py_REF_DEBUG.
It was enabled under Py_TRACE_REFS, which was much heavier than
necessary. sys.gettotalrefcount() is now available in a
Py_REF_DEBUG-only build.
|
|
|
|
| |
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
|
| |
|
|
|
|
| |
Closes SF bug #571759.
|
| |
|
|
|
|
| |
sys.exit() now requires 0-1 arguments. Previously 2+ arguments were allowed.
|