| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Actually, checking for INT_MAX and INT_MIN is correct since
the format code explicitly handles a C "int".
|
|
|
|
| |
checking.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
46640 Patch #1454481: Make thread stack size runtime tunable.
46647 Markup fix
The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them. See python-dev discussion.
Note that a branch can (and should) be created for resolving these
problems, like
svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH
followed by merging rev 46647 to the new branch.
|
|
|
|
| |
(thanks to Neal for review)
|
| |
|
| |
|
|
|
|
| |
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
|
| |
|
|
|
|
| |
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
|
| |
|
| |
|
| |
|
|
|
|
| |
still used?)
|
|
|
|
| |
(fixes #1496539)
|
|
|
|
| |
bug in both: `className` was referenced before being checked for NULL.
|
| |
|
|
|
|
|
| |
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
set_exc_info(), reset_exc_info(): By exploiting the
likely (who knows?) invariant that when an exception's
`type` is NULL, its `value` and `traceback` are also NULL,
save some cycles in heavily-executed code.
This is a "a kronar saved is a kronar earned" patch: the
speedup isn't reliably measurable, but it obviously does
reduce the operation count in the normal (no exception
raised) path through PyEval_EvalFrameEx().
The tim-exc_sanity branch tries to push this harder, but
is still blowing up (at least in part due to pre-existing
subtle bugs that appear to have no other visible
consequences!).
Not a bugfix candidate.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
valid and
invalid file paths for the built-in import machinery which leads to
fewer open calls on startup.
Also fix issue with PEP 302 style import hooks which lead to more open()
calls than necessary.
|
|
|
|
| |
but Trent's copy thinks that it's an anachronism...
|
|
|
|
| |
LOCAL inlining; also added some missing whitespace
|
|
|
|
|
| |
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
|
| |
|
|
|
|
| |
with PyObject_CallFunctionObjArgs, which is 30% faster.
|
|
|
|
|
|
| |
both mystrtoul.c and longobject.c. Share the table instead. Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).
|
|
|
|
| |
statement raise SyntaxError, and add testcase.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In rare cases of strings specifying true values near sys.maxint,
and oddball bases (not decimal or a power of 2), int(string, base)
could deliver insane answers. This repairs all such problems, and
also speeds string->int significantly. On my box, here are %
speedups for decimal strings of various lengths:
length speedup
------ -------
1 12.4%
2 15.7%
3 20.6%
4 28.1%
5 33.2%
6 37.5%
7 41.9%
8 46.3%
9 51.2%
10 19.5%
11 19.9%
12 23.9%
13 23.7%
14 23.3%
15 24.9%
16 25.3%
17 28.3%
18 27.9%
19 35.7%
Note that the difference between 9 and 10 is the difference between
short and long Python ints on a 32-bit box. The patch doesn't
actually do anything to speed conversion to long: the speedup is
due to detecting "unsigned long" overflow more quickly.
This is a bugfix candidate, but it's a non-trivial patch and it
would be painful to separate the "bug fix" from the "speed up" parts.
|
| |
|
|
|
|
| |
"base" parameter.
|
| |
|
|
|
|
|
|
| |
Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
I suppose this could be backported if anyone cares.
|
| |
|
|
|
|
| |
if a continue inside a try failed.
|
|
|
|
|
| |
Change __str__() functions to METH_O.
Change WindowsError__str__ to use PyTuple_Pack.
|
|
|
|
| |
Most of the test_syntax changes are just updating the numbers.
|
|
|
|
|
| |
and the DOS error code in errno. Revert changes where
WindowsError catch blocks unnecessarily special-case OSError.
|
|
|
|
|
| |
is NULL, so there's no reason to do anything with it. In the second case,
we know frame->f_exc_type is not NULL, so we can just do an INCREF.
|
|
|
|
|
|
|
|
| |
discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Warn-raise ImportWarning when importing would have picked up a directory
as package, if only it'd had an __init__.py. This swaps two tests (for
case-ness and __init__-ness), but case-test is not really more expensive,
and it's not in a speed-critical section.
- Test for the new warning by importing a common non-package directory on
sys.path: site-packages
- In regrtest.py, silence warnings generated by the build-environment
because Modules/ (which is added to sys.path for Setup-created modules)
has 'zlib' and '_ctypes' directories without __init__.py's.
|
|
|
|
|
|
|
|
|
| |
MAXPATHLEN-sized buffers for various output-buffers (like to realpath()),
and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and
does not define MAXPATHLEN.) Cursory googling suggests Linux is following a
newer standard than BSD, but in cases like this, who knows. Using the
greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the
most portable solution.
|
| |
|
|
|
|
| |
was having funny effects when called on >2Gb strings ;P
|
|
|
|
|
|
| |
are now macros to exported functions again.
Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
|