Yury Selivanov
94c2263005
Issue 24374: Plug refleak in set_coroutine_wrapper
11 years ago
Yury Selivanov
eb698fe68c
Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper
11 years ago
Yury Selivanov
614bfcc953
Issue 24366: Indent code (thanks to li4ick for reporting).
11 years ago
Yury Selivanov
aab3c4a211
Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully
11 years ago
Yury Selivanov
d8cf382ee7
Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private
11 years ago
Serhiy Storchaka
fa494fd883
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
11 years ago
Serhiy Storchaka
8b2e8b6cce
Specify default values of semantic booleans in Argument Clinic generated signatures as booleans.
11 years ago
Serhiy Storchaka
7e810a6e3d
Use converter names instead of format units in Argument Clinic descriptions
in builtin and _crypt modules.
11 years ago
Benjamin Peterson
e20056c8f7
fix importing one char extension modules ( closes #24328 )
11 years ago
Benjamin Peterson
264be6f48f
remove STORE_MAP, since it's unused
11 years ago
Benjamin Peterson
ee85339cc6
in dict displays, evaluate the key before the value ( closes #11205 )
Patch partially by Steve Dougherty.
11 years ago
Yury Selivanov
6ef059097c
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
11 years ago
Nick Coghlan
55871f04bf
Issue #24285 : fix importing extensions from packages
11 years ago
Steve Dower
adc2fb8a6a
Issue #24268 : Fix import naming when loading extension modules. Patch by Petr Viktorin.
11 years ago
Steve Dower
7689154f58
Issue #24268 : Fixes generation of init import name on Windows.
11 years ago
Nick Coghlan
d5cacbb1d9
PEP 489: Multi-phase extension module initialization
Known limitations of the current implementation:
- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet
The leak is most visible by running:
./python -m test -R3:3 test_importlib
However, you can also see it by running:
./python -X showrefcount
Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
11 years ago
Serhiy Storchaka
ca7fecb038
Issue #24102 : Fixed exception type checking in standard error handlers.
11 years ago
Benjamin Peterson
de12b79cd6
allow test node after ** in calls ( closes #24176 )
11 years ago
Eric Snow
183a941bc1
Issue #24192 : Fix namespace package imports.
11 years ago
Nick Coghlan
baaadbf70d
Issue 24017: fix for "async with" refcounting
* adds missing INCREF in WITH_CLEANUP_START
* adds missing DECREF in WITH_CLEANUP_FINISH
* adds several new tests Yury created while investigating this
11 years ago
Benjamin Peterson
baa2e562ce
use our normal bracing style
11 years ago
Yury Selivanov
1dde177f82
Issue #24017 : Plug ref leak.
11 years ago
Yury Selivanov
f487a005d6
Fix warnings for PyEval_GetCoroutineWrapper
11 years ago
Yury Selivanov
7544508f02
PEP 0492 -- Coroutines with async and await syntax. Issue #24017 .
11 years ago
Yury Selivanov
8170e8c0d1
PEP 479: Change StopIteration handling inside generators.
Closes issue #22906 .
11 years ago
Benjamin Peterson
9e77f72fb2
shorten capsule name macro; it doesn't need to be so long
11 years ago
Benjamin Peterson
025e9ebd0a
PEP 448: additional unpacking generalizations ( closes #2292 )
Patch by Neil Girdhar.
11 years ago
Benjamin Peterson
deff2b76ec
be more robust against the filters list changing under us ( closes #24096 )
11 years ago
Eric Snow
32439d6eb6
Issue #23911 : Move path-based bootstrap code to a separate frozen module.
11 years ago
Benjamin Peterson
1dfd247c1b
remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore
11 years ago
Gregory P. Smith
f789465eed
Silence a gcc "may be used uninitialized" compiler warning. Not true.
Initializing retval prevents the naive warning.
11 years ago
Gregory P. Smith
5d0ccd2f91
Add missing PyAPI_FUNC macro's to the public functions as other .c files do
in hopes that this fixes the windows extension module link error for modules
trying to call _Py_strhex functions. issue9951.
11 years ago
Gregory P. Smith
e3f6393b52
Add the files missing from c9f1630cf2b1 for issue9951.
hg status should be my friend more often...
11 years ago
Benjamin Peterson
9bdd61338d
remove dead *-import checking code ( closes #24049 )
11 years ago
Serhiy Storchaka
247789cee9
Issue #24007 : Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
11 years ago
Christian Heimes
418fd74f87
Issue #23998 : PyImport_ReInitLock() now checks for lock allocation error
11 years ago
Serhiy Storchaka
d6e53dab86
Fixed error message for the "u#" format code.
11 years ago
Christian Heimes
e8e4283cec
Remove redundant check for tb != NULL to shut up Coverity . It has been set to Py_None a couple of lines earlier.
CID 1291697 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking tb suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
11 years ago
R David Murray
4171bbe687
#23949 : Improve tuple unpacking error messages.
Patch by Arnon Yaari.
11 years ago
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
11 years ago
Brett Cannon
f299abdafa
Issue #23731 : Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
11 years ago
Steve Dower
8fc8980c96
Issue #23524 : Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
11 years ago
Serhiy Storchaka
f41f8f9974
Issue #22977 : Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
11 years ago
Victor Stinner
9aa1331c6f
Issue #22585 : os.urandom() now releases the GIL when the getentropy() is used
(OpenBSD 5.6+).
11 years ago
Victor Stinner
81f241ab2e
Issue #23571 : If io.TextIOWrapper constructor fails in _Py_DisplaySourceLine(),
close the binary file to fix a resource warning.
11 years ago
Victor Stinner
84092ac370
Issue #23571 : Fix reentrant call to Py_FatalError()
Flushing sys.stdout and sys.stderr in Py_FatalError() can call again
Py_FatalError(). Add a reentrant flag to detect this case and just abort at the
second call.
11 years ago
Victor Stinner
ec4f9592f5
Issue #23571 : Py_FatalError() now tries to flush sys.stdout and sys.stderr
It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.
11 years ago
Victor Stinner
0e98a76b65
Issue #23571 : Enhance Py_FatalError()
* Display the current Python stack if an exception was raised but the exception
has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
which works even if the GIL was released
11 years ago
Benjamin Peterson
55c14355ac
fix building without threads ( closes #23877 )
11 years ago
Serhiy Storchaka
92e8af67a8
Issue #23492 : Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
11 years ago