| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Move exception state information from frame objects to coroutine (generator/thread) object where it belongs.
|
|
|
|
| |
and in codecs.escape_decode() when decode an escaped non-ascii byte.
|
|
|
|
| |
always return a list (#3840)
|
| |
|
| |
|
|
|
|
|
| |
underscores (#3827)
to integer with binary base.
|
|
|
|
|
| |
Speed up class creation by 10-20% by reducing the overhead in the
necessary special method lookups.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
(#3631)
Affected classes are bytearray, array, deque, defaultdict, count and repeat.
|
|
|
| |
Don't export the cell_set_contents() symbol in the C API.
|
|
|
|
| |
object.__init__. (GH-3650)
|
|
|
|
| |
attribute. (#3620)
|
|
|
|
| |
This function returns the last component of tp_name after a dot.
Returns tp_name itself if it doesn't contain a dot.
|
|
|
|
|
| |
The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls.
We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
|
|
|
|
|
|
|
| |
* Add Py_UNREACHABLE() as an alias to abort().
* Use Py_UNREACHABLE() instead of assert(0)
* Convert more unreachable code to use Py_UNREACHABLE()
* Document Py_UNREACHABLE() and a few other macros.
|
|
|
|
|
|
| |
Fix Coverity CID 1417587: _PyMem_Initialize() contains code which is
never executed.
Replace the runtime check with a build assertion.
|
|
|
|
|
| |
A bunch of code currently uses PyInterpreterState.modules directly instead of PyImport_GetModuleDict(). This complicates efforts to make changes relative to sys.modules. This patch switches to using PyImport_GetModuleDict() uniformly. Also, a number of related uses of sys.modules are updated for uniformity for the same reason.
Note that this code was already reviewed and merged as part of #1638. I reverted that and am now splitting it up into more focused parts.
|
|
|
|
|
| |
Resolves bpo-31420.
(This was accidentally reverted when in #3565.)
|
|
|
| |
PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop warnoptions from PyInterpreterState.
* Drop xoptions from PyInterpreterState.
* Don't set warnoptions and _xoptions again.
* Decref after adding to sys.__dict__.
* Drop an unused macro.
* Check sys.xoptions *before* we delete it.
|
|
|
|
|
| |
This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
|
| |
|
| |
|
|
|
|
| |
(#3452)
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
|
|
| |
Remove redundant PyUnicode_Check call. Use a static table for checking chars.
|
|
|
|
|
|
|
|
|
| |
f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events
These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.
|
| |
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
| |
Windows buildbots started failing due to include-related errors.
|
|
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixed OrderedDict.__init__ docstring re PEP 468
* tightened comment and mirrored to C impl
* added space after period per marco-buttu
* preserved substituted for stable
* drop references to Python 3.6 and PEP 468
|
|
|
|
|
| |
be null (#3329)
Passing NULL as the second argument to to memcpy is undefined behavior even if the size is 0.
|
|
|
|
|
|
| |
* Fix terminology in comment and add more design rationale.
* Fix extra space
|
|
|
| |
sys.modules is the one true source.
|
| |
|
| |
|
|
|
|
| |
Subclasses such as IndentError and TabError should not have this message
applied.
|
|
|
|
| |
(#3157)
|
| |
|
|
|
|
| |
(#2345)
|
|
|
|
| |
* remove hashpos parameter from lookdict functions.
* remove many duplicated code from lookdict functions.
|
|
|
| |
Previously any exception was replaced with a KeyError exception.
|
|
|
|
|
| |
PyEval_EvalCodeEx() (#2919)
k + 1 was calculated with k = NULL.
|
|
|
| |
Based on patch by Victor Stinner.
|
|
|
| |
to staticmethod() and classmethod().
|
|
|
|
|
|
| |
* bpo-30789: Use a single memory block for co_extra.
* Address review comments.
|