| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
valid. Add more assertions. (GH-29627)
|
|
|
| |
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
| |
Fix Python.h to build C extensions with Xcode: remove a relative
include from Include/cpython/pystate.h.
|
|
|
|
|
|
|
|
|
|
|
| |
to be specialized (GH-29595)
* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.
* Add reference to function to frame, borrow references to builtins and globals.
* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
|
| |
|
|
|
|
|
| |
* Specialize STORE_SUBSCR for list[int], and dict[object]
* Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
|
|
|
|
| |
(GH-29592)
|
| |
|
| |
|
|
|
|
| |
* Uses recursion remaining, instead of recursion depth to speed up check against recursion limit.
|
| |
|
|
|
|
|
|
|
| |
This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems.
The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new.
Windows version TBD.
|
| |
|
| |
|
| |
|
|
|
|
| |
groups (GH-29207)
|
|
|
|
| |
(GH-29366)
|
|
|
|
|
|
|
|
|
| |
(gh-28778)
Currently custom modules (the array set on PyImport_FrozenModules) replace all the frozen stdlib modules. That can be problematic and is unlikely to be what the user wants. This change treats the custom frozen modules as additions instead. They take precedence over all other frozen modules except for those needed to bootstrap the import system. If the "code" field of an entry in the custom array is NULL then that frozen module is treated as disabled, which allows a custom entry to disable a frozen stdlib module.
This change allows us to get rid of is_essential_frozen_module() and simplifies the logic for which frozen modules should be ignored.
https://bugs.python.org/issue45395
|
| |
|
| |
|
|
|
| |
* Rename 'frame' to 'current_frame'
|
|
|
|
|
|
|
| |
* Refactor mapping patterns and speed up class patterns.
* Simplify MATCH_KEYS and MATCH_CLASS.
* Add COPY opcode.
|
|
|
|
|
| |
The recently added PyConfig.stdlib_dir was being set with ".." entries. When __file__ was added for from modules this caused a problem on out-of-tree builds. This PR fixes that by normalizing "stdlib_dir" when it is calculated in getpath.c.
https://bugs.python.org/issue45506
|
|
|
|
| |
(GH-28569)
|
|
|
|
|
|
|
|
| |
Freelists for object structs can now be disabled. A new ``configure``
option ``--without-freelists`` can be used to disable all freelists
except empty tuple singleton. Internal Py*_MAXFREELIST macros can now
be defined as 0 without causing compiler warnings and segfaults.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
| |
for its name (GH-29103)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also, reword the What's New messages: this doesn't change the limited API, it only brings the Py_LIMITED_API macro closer to the ideal of only allowing the limited API.
Automerge-Triggered-By: GH:encukou
|
| |
|
|
|
|
|
|
|
| |
The Python 3.11 limited C API no longer includes stdlib.h, stdio.h,
string.h and errno.h.
* Exclude Py_MEMCPY() from Python 3.11 limited C API.
* xxlimited C extension is now built with Python 3.11 limited C API.
|
|
|
|
|
|
|
|
|
|
| |
Move Include/longobject.h non-limited API to a new
Include/cpython/longobject.h header file.
Move the following definitions to the internal C API:
* _PyLong_DigitValue
* _PyLong_FormatAdvancedWriter()
* _PyLong_FormatWriter()
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split header files to move the non-limited API to Include/cpython/:
* Include/warnings.h => Include/cpython/warnings.h
* Include/weakrefobject.h => Include/cpython/weakrefobject.h
Exclude PyWeakref_GET_OBJECT() from the limited C API. It never
worked since the PyWeakReference structure is opaque in the limited C
API.
Move _PyWarnings_Init() and _PyErr_WarnUnawaitedCoroutine() to the
internal C API.
|
|
|
|
|
|
| |
* Rename _PyThreadState_DisableTracing()
to _PyThreadState_PauseTracing()
* Rename _PyThreadState_ResetTracing()
to _PyThreadState_ResumeTracing()
|
|
|
|
|
|
|
| |
(gh-28940)
The default was "off". Switching it to "on" means users get the benefit of frozen stdlib modules without having to do anything. There's a special-case for running-in-source-tree, so contributors don't get surprised when their stdlib changes don't get used.
https://bugs.python.org/issue45020
|
|
|
|
|
|
|
|
| |
Remove fallbacks for missing round(), copysign() and hypot() in
Python/pymath.c. Python now requires these functions to build.
These fallbacks were needed on Visual Studio 2012 and older. They are
no longer needed since Visual Stuido 2013. Python is now built with
Visual Studio 2017 or newer since Python 3.6.
|
|
|
|
|
|
|
|
| |
Convert the result of macros setting variables to void to avoid risks
of misusing them:
* _PyGCHead_SET_NEXT()
* asdl_seq_SET()
* asdl_seq_SET_UNTYPED()
|
|
|
|
|
|
|
|
|
|
| |
Add PyThreadState_EnterTracing() and PyThreadState_LeaveTracing()
functions to the limited C API to suspend and resume tracing and
profiling.
Add an unit test on the PyThreadState C API to _testcapi.
Add also internal _PyThreadState_DisableTracing() and
_PyThreadState_ResetTracing().
|
|
|
|
|
|
|
|
|
| |
Rename Include/namespaceobject.h to
Include/internal/pycore_namespace.h.
The _testmultiphase extension is now built with the
Py_BUILD_CORE_MODULE macro defined to access _PyNamespace_Type.
object.c: remove unused "pycore_context.h" include.
|
|
|
|
| |
Move Include/eval.h content into Include/ceval.h and
Include/cpython/ceval.h, and remove Include/eval.h.
|
|
|
|
| |
Move the interpreteridobject.h header file from Include/ to
Include/internal/. It only provides private functions.
|
|
|
|
|
|
|
|
|
| |
Move classobject.h, context.h, genobject.h and longintrepr.h header
files from Include/ to Include/cpython/.
Remove redundant "#ifndef Py_LIMITED_API" in context.h.
Remove explicit #include "longintrepr.h" in C files. It's not needed,
Python.h already includes it.
|
| |
|
|
|
| |
Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.
|
|
|
| |
Micro-optimize spaces!
|
|
|
|
| |
The <Python.h> header file no longer includes <stdio.h> if the
Py_LIMITED_API macro is defined.
|
|
|
|
|
|
|
|
|
|
| |
Remove two functions from the limited C API:
* PyMarshal_WriteLongToFile()
* PyMarshal_WriteObjectToFile()
The PEP 384 excludes functions expecting "FILE*" from the stable ABI.
Remove also the Py_MARSHAL_VERSION macro from the limited C API.
|
|
|
|
|
| |
Split Include/floatobject.h into sub-files: add
Include/cpython/floatobject.h and
Include/internal/pycore_floatobject.h.
|