summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41324 Add a minimal decimal capsule API (#21519)Stefan Krah2020-08-101-0/+180
|
* bpo-41098: Doc: Add missing deprecated directives (GH-21162)Inada Naoki2020-08-071-2/+8
| | | | PyUnicodeEncodeError_Create has been deprecated with `Py_DEPRECATED` macro. But it was not documented.
* bpo-41463: Generate information about jumps from 'opcode.py' rather than ↵Mark Shannon2020-08-041-0/+22
| | | | | duplicating it in 'compile.c' (GH-21714) Generate information about jumps from 'opcode.py' rather than duplicate it in 'compile.c'
* bpo-40939: Remove even more references to the old parser (GH-21642)Lysandros Nikolaou2020-07-271-9/+0
| | | Automerge-Triggered-By: @lysnikolaou
* bpo-41366: Fix clang warning for sign conversion (GH-21592)Henry Schreiner2020-07-231-1/+1
|
* bpo-40941: Unify implicit and explicit state in the frame and generator ↵Mark Shannon2020-07-172-7/+28
| | | | | | | objects into a single value. (GH-20803) * Merge gen and frame state variables into one. * Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.
* bpo-36346: Make using the legacy Unicode C API optional (GH-21437)Serhiy Storchaka2020-07-101-1/+3
| | | | Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0 makes the interpreter not using the wchar_t cache and the legacy Unicode C API.
* Revert "bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() ↵Victor Stinner2020-07-081-2/+10
| | | | | (GH-19378)" (GH-21390) This partially reverts commit 45ec5b99aefa54552947049086e87ec01bc2fc9a.
* bpo-29778: test_embed tests the path configuration (GH-21306)Victor Stinner2020-07-071-0/+1
|
* bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)Inada Naoki2020-07-061-1/+5
|
* bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336)Serhiy Storchaka2020-07-051-1/+1
|
* Uncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)Inada Naoki2020-07-051-2/+2
| | | | | PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII are deprecated since Python 3.3. But Py_DEPRECATED(3.3) was commented out.
* bpo-1635741: Release Unicode interned strings at exit (GH-21269)Victor Stinner2020-07-011-0/+1
| | | | | | | * PyUnicode_InternInPlace() now ensures that interned strings are ready. * Add _PyUnicode_ClearInterned(). * Py_Finalize() now releases Unicode interned strings: call _PyUnicode_ClearInterned().
* bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223)Serhiy Storchaka2020-06-301-0/+5
|
* bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)Inada Naoki2020-06-301-8/+0
|
* bpo-23427: Add sys.orig_argv attribute (GH-20729)Victor Stinner2020-06-291-6/+8
| | | | | | | Add sys.orig_argv attribute: the list of the original command line arguments passed to the Python executable. Rename also PyConfig._orig_argv to PyConfig.orig_argv and document it.
* bpo-41123: Remove PyLong_FromUnicode() (GH-21204)Inada Naoki2020-06-291-2/+0
|
* bpo-41123: Remove PyUnicode_GetMax() (GH-21192)Inada Naoki2020-06-291-3/+0
|
* bpo-41123: Remove Py_UNICODE_str* functions (GH-21164)Inada Naoki2020-06-271-37/+0
| | | They are undocumented and deprecated since Python 3.3.
* bpo-41103: Remove old buffer protocol support (#21117)Inada Naoki2020-06-251-47/+0
| | | They are deprecated since Python 3.0.
* bpo-40521: Optimize PyBytes_FromStringAndSize(str, 0) (GH-21142)Victor Stinner2020-06-252-2/+3
| | | | | | | | | | | | | | | | Always create the empty bytes string singleton. Optimize PyBytes_FromStringAndSize(str, 0): it no longer has to check if the empty string singleton was created or not, it is always available. Add functions: * _PyBytes_Init() * bytes_get_empty(), bytes_new_empty() * bytes_create_empty_string_singleton() * unicode_create_empty_string_singleton() _Py_unicode_state: rename empty structure member to empty_string.
* bpo-40521: Always create the empty tuple singleton (GH-21116)Victor Stinner2020-06-241-0/+1
| | | | | | | | | | | Py_InitializeFromConfig() now always creates the empty tuple singleton as soon as possible. Optimize PyTuple_New(0): it no longer has to check if the empty tuple was created or not, it is always creatd. * Add tuple_create_empty_tuple_singleton() function. * Add tuple_get_empty() function. * Remove state parameter of tuple_alloc().
* bpo-40521: Make Unicode latin1 singletons per interpreter (GH-21101)Victor Stinner2020-06-241-0/+3
| | | | | | | | | Each interpreter now has its own Unicode latin1 singletons. Remove "ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS" and "ifdef LATIN1_SINGLETONS": always enable latin1 singletons. Optimize unicode_result_ready(): only attempt to get a latin1 singleton for PyUnicode_1BYTE_KIND.
* bpo-40521: Make empty Unicode string per interpreter (GH-21096)Victor Stinner2020-06-232-1/+3
| | | Each interpreter now has its own empty Unicode string singleton.
* bpo-40521: Make MemoryError free list per interpreter (GH-21086)Victor Stinner2020-06-232-2/+10
| | | | | | | Each interpreter now has its own MemoryError free list: it is not longer shared by all interpreters. Add _Py_exc_state structure and PyInterpreterState.exc_state member. Move also errnomap into _Py_exc_state.
* bpo-40521: Empty frozenset is no longer a singleton (GH-21085)Raymond Hettinger2020-06-232-3/+0
| | | | | | | | | * Revert "bpo-40521: Make the empty frozenset per interpreter (GH-21068)" This reverts commit 261cfedf7657a515e04428bba58eba2a9bb88208. * bpo-40521: Empty frozensets are no longer singletons * Complete the removal of the frozenset singleton
* bpo-40521: Make bytes singletons per interpreter (GH-21074)Victor Stinner2020-06-232-1/+7
| | | | | | Each interpreter now has its own empty bytes string and single byte character singletons. Replace STRINGLIB_EMPTY macro with STRINGLIB_GET_EMPTY() macro.
* bpo-40521: Make the empty frozenset per interpreter (GH-21068)Victor Stinner2020-06-232-1/+3
| | | Each interpreter now has its own empty frozenset singleton.
* bpo-40521: Make dict free lists per-interpreter (GH-20645)Victor Stinner2020-06-233-15/+26
| | | | | | | | | | | Each interpreter now has its own dict free list: * Move dict free lists into PyInterpreterState. * Move PyDict_MAXFREELIST define to pycore_interp.h * Add _Py_dict_state structure. * Add tstate parameter to _PyDict_ClearFreeList() and _PyDict_Fini(). * In debug mode, ensure that the dict free lists are not used after _PyDict_Fini() is called. * Remove "#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS".
* bpo-41078: Add pycore_list.h internal header file (GH-21057)Victor Stinner2020-06-222-1/+20
| | | | | * Move _PyList_ITEMS() to pycore_list.h. * The C extension "_heapq" is now built with Py_BUILD_CORE_MODULE macro defined to access the internal C API.
* bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056)Victor Stinner2020-06-221-3/+4
|
* bpo-40939: Rename PyPegen* functions to PyParser* (GH-21016)Lysandros Nikolaou2020-06-213-62/+19
| | | | | | Rename PyPegen* functions to PyParser*, so that we can remove the old set of PyParser* functions that were using the old parser.
* bpo-40939: Remove the old parser (Part 2) (GH-21005)Lysandros Nikolaou2020-06-207-366/+0
| | | Remove some remaining files and Makefile targets for the old parser
* bpo-36346: Make unicodeobject.h C89 compatible (GH-20934)Inada Naoki2020-06-171-1/+2
|
* bpo-35059: Enhance _PyObject_GC_TRACK() macros (GH-20931)Victor Stinner2020-06-171-14/+34
| | | | | * Rename _PyObject_GC_TRACK_impl() to _PyObject_GC_TRACK() * Rename _PyObject_GC_UNTRACK_impl() to _PyObject_GC_UNTRACK() * Omit filename and lineno parameters if NDEBUG is defined.
* bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878)Inada Naoki2020-06-171-23/+23
| | | | Co-authored-by: Kyle Stanley <aeros167@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-40989: Make _PyTraceMalloc_NewReference() internal (GH-20915)Victor Stinner2020-06-162-4/+6
| | | | Make the _PyTraceMalloc_NewReference() function fully internal: remove it from the public C API and don't export it anymore.
* bpo-19569: Add a macro to suppress deprecation warnings (GH-9004)Zackery Spytz2020-06-161-0/+20
| | | Co-authored-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
* bpo-40989: PyObject_INIT() becomes an alias to PyObject_Init() (GH-20901)Victor Stinner2020-06-154-59/+42
| | | | | | | | | | | | | | The PyObject_INIT() and PyObject_INIT_VAR() macros become aliases to, respectively, PyObject_Init() and PyObject_InitVar() functions. Rename _PyObject_INIT() and _PyObject_INIT_VAR() static inline functions to, respectively, _PyObject_Init() and _PyObject_InitVar(), and move them to pycore_object.h. Remove their return value: their return type becomes void. The _datetime module is now built with the Py_BUILD_CORE_MODULE macro defined. Remove an outdated comment on _Py_tracemalloc_config.
* bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)Victor Stinner2020-06-151-15/+2
| | | | | | | | | | On Windows, #include "pyerrors.h" no longer defines "snprintf" and "vsnprintf" macros. PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable behavior. Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf() calls with PyOS_vsnprintf().
* bpo-29782: Consolidate _Py_Bit_Length() (GH-20739)Niklas Fiekas2020-06-152-12/+43
| | | | | | | | | | In GH-2866, _Py_Bit_Length() was added to pymath.h for lack of a better location. GH-20518 added a more appropriate header file for bit utilities. It also shows how to properly use intrinsics. This allows reconsidering bpo-29782. * Move the function to the new header. * Changed return type to match __builtin_clzl() and reviewed usage. * Use intrinsics where available. * Pick a fallback implementation suitable for inlining.
* bpo-40939: Remove the old parser (GH-20768)Pablo Galindo2020-06-111-4/+0
| | | This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation.
* bpo-39465: Use _PyInterpreterState_GET() (GH-20788)Victor Stinner2020-06-101-7/+7
| | | | | | | | | | | | Replace _PyThreadState_GET() with _PyInterpreterState_GET() in: * get_small_int() * gcmodule.c: add also get_gc_state() function * _PyTrash_deposit_object() * _PyTrash_destroy_chain() * warnings_get_state() * Py_GetRecursionLimit() Cleanup listnode.c: add 'parser' variable.
* bpo-40943: Replace PY_FORMAT_SIZE_T with "z" (GH-20781)Victor Stinner2020-06-101-1/+3
| | | | | | | The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no longer supports macOS 10.4 and Visual Studio 2010, but requires more recent macOS and Visual Studio versions. In 2020 with Python 3.10, it is now safe to use directly "%zu" to format size_t and "%zi" to format Py_ssize_t.
* bpo-40910: Export Py_GetArgcArgv() function (GH-20721)Victor Stinner2020-06-082-1/+17
| | | | | | | | | | | | Export explicitly the Py_GetArgcArgv() function to the C API and document the function. Previously, it was exported implicitly which no longer works since Python is built with -fvisibility=hidden. * Add PyConfig._orig_argv member. * Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice. * PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now _PyConfig_Write() responsibility. * _PyConfig_Write() result type becomes PyStatus instead of void. * Write an unit test on Py_GetArgcArgv().
* bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var ↵Sandro Mani2020-06-081-0/+1
| | | | (GH-20605)
* bpo-29882: Add _Py_popcount32() function (GH-20518)Victor Stinner2020-06-081-1/+50
| | | | | | * Rename pycore_byteswap.h to pycore_bitutils.h. * Move popcount_digit() to pycore_bitutils.h as _Py_popcount32(). * _Py_popcount32() uses GCC and clang builtin function if available. * Add unit tests to _Py_popcount32().
* bpo-40724: Support setting buffer slots from type specs (GH-20648)scoder2020-06-061-0/+5
| | | This is not part of the limited API but makes the buffer slots available for type specs.
* bpo-40521: Make context free list per-interpreter (GH-20644)Victor Stinner2020-06-053-2/+9
| | | | | | | | | Each interpreter now has its own context free list: * Move context free list into PyInterpreterState. * Add _Py_context_state structure. * Add tstate parameter to _PyContext_ClearFreeList() and _PyContext_Fini(). * Pass tstate to clear_freelists().
* bpo-40521: Make async gen free lists per-interpreter (GH-20643)Victor Stinner2020-06-053-2/+20
| | | | | | | | | Each interpreter now has its own asynchronous generator free lists: * Move async gen free lists into PyInterpreterState. * Move _PyAsyncGen_MAXFREELIST define to pycore_interp.h * Add _Py_async_gen_state structure. * Add tstate parameter to _PyAsyncGen_ClearFreeLists and _PyAsyncGen_Fini().