Benjamin Peterson
8f169489c4
update comment
12 years ago
Antoine Pitrou
59c900d3bf
Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least one place so as to avoid regressions.
12 years ago
Christian Heimes
0bd447f847
Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()
CID 486647
13 years ago
Benjamin Peterson
e1b4cbc422
when arguments are cells clear the locals slot (backport of #17927 )
13 years ago
R David Murray
3583761bcd
#17413 : make sure settrace funcs get passed exception instances for 'value'.
Patch by Ingrid Cheung and Brendan McLoughlin.
13 years ago
Benjamin Peterson
b37df519c7
fix yield from return value on custom iterators ( closes #15568 )
14 years ago
Nick Coghlan
c40bc09942
Issue #13783 : the PEP 380 implementation no longer expands the public C API
14 years ago
Benjamin Peterson
d1ab6089ff
check return for error
14 years ago
Benjamin Peterson
d5a1c44455
PEP 415: Implement suppression of __context__ display with an exception attribute
This replaces the original PEP 409 implementation. See #14133 .
14 years ago
Benjamin Peterson
1138944888
only incref when using borrowing functions
14 years ago
Benjamin Peterson
7d95e40721
Implement PEP 412: Key-sharing dictionaries ( closes #13903 )
Patch from Mark Shannon.
14 years ago
Antoine Pitrou
bf35c156b4
Fix refleak: PyObject_GetItem returns a new reference, not a borrowed one like PyDict_GetItem.
14 years ago
Victor Stinner
b0b224233e
Issue #14385 : Support other types than dict for __builtins__
It is now possible to use a custom type for the __builtins__ namespace, instead
of a dict. It can be used for sandboxing for example. Raise also a NameError
instead of ImportError if __build_class__ name if not found in __builtins__.
14 years ago
Brett Cannon
368b4b7405
Guard an LLTRACE variable to silence an unused variable warning.
14 years ago
Victor Stinner
3c1e48176e
Issue #14383 : Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
These functions simplify the usage of static constant Unicode strings.
Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
14 years ago
Benjamin Peterson
302e7902c8
use identifier api
14 years ago
Benjamin Peterson
2afe6aeae8
perform yield from delegation by repeating YIELD_FROM opcode ( closes #14230 )
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.
Patch mostly from Mark Shannon with a few tweaks by me.
14 years ago
Nick Coghlan
ab7bf2143e
Close issue #6210 : Implement PEP 409
14 years ago
Benjamin Peterson
ce79852077
use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
14 years ago
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
c3349cd22e
port 8d05f697acd4 ( #11627 )
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
c2077b0d9b
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
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
4c29e1cd01
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
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