| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
|
|
|
|
| |
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
|
|
|
|
| |
Py_Initialize() and Py_Finalize().
|
| |
|
|
|
|
| |
leak test runs.
|
| |
|
| |
|
| |
|
|
|
|
| |
PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
|
|
|
|
|
| |
Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
|
|
|
|
| |
Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.
This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
|
|
|
|
|
|
|
| |
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.
|
| |
|