Amaury Forgeot d'Arc
0a239e9191
Fix compilation with C89 compilers (Windows...)
14 years ago
Benjamin Peterson
0296a56520
NULL and no exception set from tp_iternext means StopIteration
14 years ago
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
14 years ago
Antoine Pitrou
86a36b500a
PEP 3155 / issue #13448 : Qualified name for classes and functions.
14 years ago
Martin v. Löwis
1c67dd9b15
Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
14 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
14 years ago
Victor Stinner
d2a915dbf6
ceval.c: restore str+=str optimization
14 years ago
Benjamin Peterson
811c2f1369
remove "fast-path" for (i)adding strings
These were just an artifact of the old unicode concatenation hack and likely
just penalized other kinds of adding. Also, this fixes __(i)add__ on string
subclasses.
14 years ago
Victor Stinner
bec0fda264
Remove commented code: str+=str is no more super-optimized
14 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
14 years ago
Charles-François Natali
f23339a7bb
Issue 12620: Make pendingbusy flag static to Py_MakePendingCalls().
15 years ago
Benjamin Peterson
76f7f4d979
excise the remains of STOP_CODE, which hasn't done anything useful for years
15 years ago
Benjamin Peterson
5afa03a72e
catch nasty exception classes with __new__ that doesn't return a exception ( closes #11627 )
Patch from Andreas Stührk.
15 years ago
Benjamin Peterson
9bfd0dee9b
no one passes NULL here (or should anyway)
15 years ago
Benjamin Peterson
878802435d
convert generator exc state functions into static functions
15 years ago
Benjamin Peterson
ac91341333
never retain a generator's caller's exception state on the generator after a yield/return
This requires some trickery to properly save the exception state if the
generator creates its own exception state.
15 years ago
Benjamin Peterson
83195c3f0c
restore a generator's caller's exception state both on yield and (last) return
This prevents generator exception state from leaking into the caller.
Closes #12475 .
15 years ago
Benjamin Peterson
9003760991
map cells to arg slots at code creation time ( closes #12399 )
This removes nested loops in PyEval_EvalCodeEx.
15 years ago
Benjamin Peterson
e109c70860
give the names of missing positional or keyword-only arguments ( closes #12356 )
15 years ago
Benjamin Peterson
b204a42383
greatly improve argument parsing error messages ( closes #12265 )
15 years ago
Antoine Pitrou
0d5e52d346
Issue #1856 : Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
15 years ago
Victor Stinner
0a5f65ab0a
Issue #7330 , #10833 : Replace %100s by %.100s and %200s by %.200s
I suppose that the author would like to truncate the type name, not get a
string of 100/200 characters.
15 years ago
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
Victor Stinner
ed4c71112a
Remove filename variable from ceval.c
Issue #11168 : Remove filename debug variable from PyEval_EvalFrameEx().
It encoded the Unicode filename to UTF-8, but the encoding fails on
undecodable filename (on surrogate characters) which raises an unexpected
UnicodeEncodeError on recursion limit.
15 years ago
David Malcolm
8ad4cd90e9
Merged revisions 87796 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87796 | david.malcolm | 2011-01-06 12:01:36 -0500 (Thu, 06 Jan 2011) | 6 lines
Issue #10655 : Fix the build on PowerPC on Linux with GCC when building with
timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
only be present on OS X; the former is the correct one for Linux with GCC.
........
15 years ago
David Malcolm
f1397ad399
Issue #10655 : Fix the build on PowerPC on Linux with GCC when building with
timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
only be present on OS X; the former is the correct one for Linux with GCC.
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
15 years ago
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
15 years ago
Victor Stinner
a00064576a
ceval.c: catch recursion error on _PyUnicode_AsString(co->co_filename)
15 years ago
Benjamin Peterson
aa7fbd9564
revert r85003, poorly considered; breaks tests
15 years ago
Benjamin Peterson
81437c9025
don't count keyword arguments as positional #9943
15 years ago
Antoine Pitrou
1df1536fb9
Issue #9828 : Destroy the GIL in Py_Finalize(), so that it gets properly
re-created on a subsequent call to Py_Initialize(). The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
16 years ago
Benjamin Peterson
e208b7c5b1
typo
16 years ago
Benjamin Peterson
d0de25d731
use Py_REFCNT
16 years ago
Benjamin Peterson
d2be5b4fe4
remove gil_drop_request in --without-threads
16 years ago
Benjamin Peterson
00ebe2cdc4
use DISPATCH() instead of continue
16 years ago
Amaury Forgeot d'Arc
ba117ef7e9
#4617 : Previously it was illegal to delete a name from the local
namespace if it occurs as a free variable in a nested block. This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
This sample was valid in 2.6, but fails to compile in 3.x without this change::
>>> def f():
... def print_error():
... print(e)
... try:
... something
... except Exception as e:
... print_error()
... # implicit "del e" here
This sample has always been invalid in Python, and now works::
>>> def outer(x):
... def inner():
... return x
... inner()
... del x
There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
16 years ago
Antoine Pitrou
74a69fa662
Issue #9225 : Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but
our bytecode is a bit simplified. Patch by Demur Rumed.
16 years ago
Victor Stinner
4a3733d160
Issue #9425 : save/restore exception on filename encoding
_PyUnicode_AsString() raises an exception on unencodable filename.
16 years ago
Antoine Pitrou
042b128f58
Issue #9203 : Computed gotos are now enabled by default on supported
compilers (which are detected by the configure script). They can still
be disable selectively by specifying --without-computed-gotos.
16 years ago
Benjamin Peterson
20f9c3c50f
revert unintended changes
16 years ago
Benjamin Peterson
013783c529
move test_trace.py so as not to conflict with future tests for the trace module
16 years ago
Georg Brandl
0310a83e7f
#3071 : tell how many values were expected when unpacking too many.
16 years ago
Benjamin Peterson
88968ad380
only take into account positional arguments count in related error messages
16 years ago
Stefan Krah
c87901d56c
Merged revisions 82181 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82181 | stefan.krah | 2010-06-23 20:42:39 +0200 (Wed, 23 Jun 2010) | 3 lines
Issue #8930 : Remaining indentation fixes after the Grand Unified Indenting.
........
16 years ago
Stefan Krah
b7e1010096
Issue #8930 : Remaining indentation fixes after the Grand Unified Indenting.
16 years ago
Benjamin Peterson
08ec84cf72
use atomic structures in non-thread version
16 years ago