| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
PyErr_SetFromErrnoWithUnicodeFilename.
|
|
|
|
|
|
|
| |
in http://codereview.appspot.com/53094 and accepted by Guido.
The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
|
|
|
|
|
| |
It speeds up the with statement and correctly looks up the special
methods involved.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lnotab-based tracing is very complicated and isn't documented very well. There
were at least 3 comment blocks purporting to document co_lnotab, and none did a
very good job. This patch unifies them into Objects/lnotab_notes.txt which
tries to completely capture the current state of affairs.
I also discovered that we've attached 2 layers of patches to the basic tracing
scheme. The first layer avoids jumping to instructions that don't start a line,
to avoid problems in if statements and while loops. The second layer
discovered that jumps backward do need to trace at instructions that don't
start a line, so it added extra lnotab entries for 'while' and 'for' loops, and
added a special case for backward jumps within the same line. I replaced these
patches by just treating forward and backward jumps differently.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get
the line number of a specified frame, but there's no way to do that directly.
Forcing people to go through the code object makes them know more about the
guts of the interpreter than they should need.
The remaining uses of PyCode_Addr2Line seem to be getting the line from a
traceback (for example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field. So we may be able to deprecate
PyCode_Addr2Line entirely for external use.
|
|
|
|
|
|
|
|
| |
Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New
are trying to build an empty code object, usually to put it in a dummy frame
object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify
just the filename, function name, and first line number, instead of also
requiring lots of code internals.
|
| |
|
|
|
|
| |
precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
|
|
|
|
|
|
| |
sequences.
Patch by Nick Barnes and Victor Stinner.
|
| |
|
|
|
|
| |
py3k. Should fix Windows buildbot errors.
|
|
|
|
|
|
| |
If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great.
Will port to py3k with a different strategy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int, long, and float __format__(), and it keeps their implementation
in sync with py3k.
Also added PyOS_double_to_string. This is the "fallback" version
that's also available in trunk, and should be kept in sync with that
code. I'll add an issue to document PyOS_double_to_string in the C
API.
There are many internal cleanups. Externally visible changes include:
- Implement PEP 378, Format Specifier for Thousands Separator, for
floats, ints, and longs.
- Issue #5515: 'n' formatting for ints, longs, and floats handles
leading zero formatting poorly.
- Issue #5772: For float.__format__, don't add a trailing ".0" if
we're using no type code and we have an exponent.
|
| |
|
| |
|
| |
|
|
|
|
| |
to avoid compiler warnings.
|
|
|
|
| |
(avoiding brown paper typo this time)
|
| |
|
| |
|
| |
|
|
|
|
| |
PyImport_AppendInittab() to take a const char *.
|
|
|
|
|
|
|
|
|
| |
untrackable objects are not tracked by the garbage collector. This can
reduce the size of collections and therefore the garbage collection overhead
on long-running programs, depending on their particular use of datatypes.
(trivia: this makes the "binary_trees" benchmark from the Computer Language
Shootout 40% faster)
|
|
|
|
| |
integer types T, not just those for which "unsigned T" is legal.
|
|
|
|
| |
Backport of r70459.
|
|
|
|
|
|
| |
POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing
a POP_TOP on each conditional and sometimes allows the peephole optimizer to
skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
|
| |
|
| |
|
|
|
|
|
|
|
| |
and cleanups in Objects/longobject.c. The most significant change is that
longs now use less memory: average savings are 2 bytes per long on 32-bit
systems and 6 bytes per long on 64-bit systems. (This memory saving already
exists in py3k.)
|
|
|
|
| |
test_fdopen (test_os.py) pass.
|
|
|
|
| |
Windows, and stop using global runtime settings to silence the warnings / assertions.
|
|
|
|
| |
It now forces its argument to double before testing for infinity.
|
| |
|
|
|
|
|
|
| |
Now the slot is filled with a function that always raises.
Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
|
|
|
|
| |
with llvm-gcc and run with a glibc <2.10.
|
|
|
|
|
|
|
| |
into the extern "C" section.
Add a few more comments and apply some minor edits to make the file contents
fit the original structure again.
|
| |
|
| |
|
|
|
|
|
| |
that it's equal to 1. (If isinf isn't defined, HAVE_DECL_ISINF is
defined to be 0, rather than being undefined.)
|
|
|
|
|
| |
to use AC_CHECK_DECLS instead of AC_CHECK_FUNCS for these.
(See discussion in issue #4506)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
compilation fails with "undefined reference to _Py_ascii_whitespace"
Will backport to 2.6.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Part of source_os2emx.patch in issue 3868:
Include/pystrcmp.h: OS/2 has same C APIs as Windows
Lib/test/test_io.py: OS/2 has same behaviour as Windows for this test
Reviewed by Amaury Forgeot d'Arc
|