summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Post 3.9.0rc2Łukasz Langa2020-09-171-1/+1
|
* Python 3.9.0rc2v3.9.0rc2Łukasz Langa2020-09-161-2/+2
|
* [3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)Pablo Galindo2020-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c: "bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)". Using a module state per module instance is causing subtle practical problems. For example, the Mercurial project replaces the __import__() function to implement lazy import, whereas Python expected that "import _ast" always return a fully initialized _ast module. Add _PyAST_Fini() to clear the state at exit. The _ast module has no state (set _astmodule.m_size to 0). Remove astmodule_traverse(), astmodule_clear() and astmodule_free() functions.. (cherry picked from commit e5fbe0cbd4be99ced5f000ad382208ad2a561c90) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41617: Fix pycore_byteswap.h to support clang 3.0 (GH-22042) (GH-22044)Victor Stinner2020-09-011-4/+6
| | | | | __builtin_bswap16() is not available in LLVM clang 3.0. (cherry picked from commit e6905e4c82cc05897dc1bf5ab2b5b94b2b043a7f)
* Post 3.9.0rc1Łukasz Langa2020-08-111-1/+1
|
* Python 3.9.0rc1v3.9.0rc1Łukasz Langa2020-08-111-3/+3
|
* bpo-41098: Doc: Add missing deprecated directives (GH-21162)Miss Islington (bot)2020-08-071-2/+8
| | | | | | | PyUnicodeEncodeError_Create has been deprecated with `Py_DEPRECATED` macro. But it was not documented. (cherry picked from commit 46e19b61d31ba99f049258efa4ff1334856a3643) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-41366: Fix clang warning for sign conversion (GH-21592)Miss Islington (bot)2020-07-231-1/+1
| | | | | (cherry picked from commit 680254a8dc64e3ada00f88a7c42d41eb02108353) Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Post 3.9.0b5Łukasz Langa2020-07-201-1/+1
|
* Python 3.9.0b5v3.9.0b5Łukasz Langa2020-07-201-2/+2
|
* Revert "bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() ↵Miss Islington (bot)2020-07-081-2/+10
| | | | | | | | (GH-19378)" (GH-21390) This partially reverts commit 45ec5b99aefa54552947049086e87ec01bc2fc9a. (cherry picked from commit b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)Miss Islington (bot)2020-07-061-1/+5
| | | | | (cherry picked from commit 9ce8132e1f2339cfe116dfd4795574182c2245b4) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Uncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)Miss Islington (bot)2020-07-051-2/+2
| | | | | | | | PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII are deprecated since Python 3.3. But Py_DEPRECATED(3.3) was commented out. (cherry picked from commit 13c90e82b6a1c3baff7f48f1bdc38058f6072f04) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Post 3.9.0b4Łukasz Langa2020-07-031-1/+1
|
* Python 3.9.0b4v3.9.0b4Łukasz Langa2020-07-021-2/+2
|
* [3.9] bpo-40939: Deprecate PyNode_Compile (GH-21036)Lysandros Nikolaou2020-06-221-0/+3
| | | Automerge-Triggered-By: @pablogsal
* [3.9] Do not emit deprecation warnings inside CPython for old parser APIs ↵Pablo Galindo2020-06-211-7/+15
| | | | (GH-21025)
* [3.9] bpo-40939: Deprecate the PyParser_SimpleParse* functions (GH-21012)Lysandros Nikolaou2020-06-211-8/+7
|
* bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878)Inada Naoki2020-06-181-22/+23
| | | | | Co-authored-by: Kyle Stanley <aeros167@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d)
* bpo-19569: Add a macro to suppress deprecation warnings (GH-9004)Miss Islington (bot)2020-06-171-0/+20
| | | | | | Co-authored-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> (cherry picked from commit de4304dad8e035dbbb57d653e685312eead816df) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)Miss Islington (bot)2020-06-151-15/+2
| | | | | | | | | | | | | On Windows, GH-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(). (cherry picked from commit e822e37946f27c09953bb5733acf3b07c2db690f) Co-authored-by: Victor Stinner <vstinner@python.org>
* Post 3.9.0b3Łukasz Langa2020-06-091-1/+1
|
* Python 3.9.0b3v3.9.0b3Łukasz Langa2020-06-091-2/+2
|
* Post 3.9.0b2Łukasz Langa2020-06-091-1/+1
|
* Python 3.9.0b2v3.9.0b2Łukasz Langa2020-06-081-2/+2
|
* bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var ↵Victor Stinner2020-06-081-0/+1
| | | | | | | (GH-20605) (GH-20725) (cherry picked from commit 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae) Co-authored-by: Sandro Mani <manisandro@gmail.com>
* bpo-40910: Export Py_GetArgcArgv() function (GH-20721) (GH-20723)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(). (cherry picked from commit e81f6e687d0f04a45f2389d0b43fafd6d8491624)
* bpo-40724: Support setting buffer slots from type specs (GH-20648) (GH-20683)Miss Islington (bot)2020-06-071-0/+5
| | | | This is not part of the limited API but makes the buffer slots available for type specs. (cherry picked from commit f7c4e236429606e1c982cacf24e10fc86ef4462f)
* [3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) (GH-20618)Victor Stinner2020-06-031-1/+18
| | | | | | | | | | | | | | | * bpo-40826: Add _Py_EnsureTstateNotNULL() macro (GH-20571) Add _Py_EnsureTstateNotNULL(tstate) macro: call Py_FatalError() if tstate is NULL, the error message contains the current function name. (cherry picked from commit 3026cad59b87751a9215111776cac8e819458fce) * bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) PyOS_InterruptOccurred() now fails with a fatal error if it is called with the GIL released. (cherry picked from commit cbe129692293251e7fbcea9ff0d822824d90c140)
* [3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613)Victor Stinner2020-06-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579) Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception. Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup these functions. (cherry picked from commit c353764fd564e401cf47a5d9efab18c72c60014e) * bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599) my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for pending signals, rather calling PyOS_InterruptOccurred(). my_fgets() is called with the GIL released, whereas PyOS_InterruptOccurred() must be called with the GIL held. test_repl: use text=True and avoid SuppressCrashReport in test_multiline_string_parsing(). Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed. (cherry picked from commit fa7ab6aa0f9a4f695e5525db5a113cd21fa93787)
* bpo-40244: Remove XLC's support from the noreturn flag (GH-20588)Miss Islington (bot)2020-06-021-2/+2
| | | | | | Automerge-Triggered-By: @pablogsal (cherry picked from commit 033d10bd21d962a59c6c4fc503092046baa451a1) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)Miss Islington (bot)2020-05-221-1/+1
| | | | | | | | | | This updates _PyErr_ChainStackItem() to use _PyErr_SetObject() instead of _PyErr_ChainExceptions(). This prevents a hang in certain circumstances because _PyErr_SetObject() performs checks to prevent cycles in the exception context chain while _PyErr_ChainExceptions() doesn't. (cherry picked from commit 7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e) Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
* [3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 ↵Victor Stinner2020-05-194-21/+0
| | | | | | | (GH-20228) Remove --with-experimental-isolated-subinterpreters configure option in Python 3.9: the experiment continues in the master branch, but it's no longer needed in 3.9.
* Post 3.9.0b1Łukasz Langa2020-05-191-1/+1
|
* Python 3.9.0b1v3.9.0b1Łukasz Langa2020-05-181-3/+3
|
* bpo-31033: Improve the traceback for cancelled asyncio tasks (GH-19951)Chris Jerdonek2020-05-181-0/+17
| | | | | When an asyncio.Task is cancelled, the exception traceback now starts with where the task was first interrupted. Previously, the traceback only had "depth one."
* Update code comment re: location of struct _is. (GH-20067)Chris Jerdonek2020-05-151-1/+1
|
* bpo-40602: Write unit tests for _Py_hashtable_t (GH-20091)Victor Stinner2020-05-141-11/+12
| | | | | | | Cleanup also hashtable.c. Rename _Py_hashtable_t members: * Rename entries to nentries * Rename num_buckets to nbuckets
* bpo-40521: Add PyInterpreterState.unicode (GH-20081)Victor Stinner2020-05-131-8/+14
| | | | | | | Move PyInterpreterState.fs_codec into a new PyInterpreterState.unicode structure. Give a name to the fs_codec structure and use this structure in unicodeobject.c.
* bpo-39465: Remove _PyUnicode_ClearStaticStrings() from C API (GH-20078)Victor Stinner2020-05-132-3/+1
| | | | Remove the _PyUnicode_ClearStaticStrings() function from the C API. Make the function fully private (declare it with "static").
* bpo-40609: _Py_hashtable_t values become void* (GH-20065)Victor Stinner2020-05-131-67/+21
| | | | | | | | | | | | | | | | | | | | | _Py_hashtable_t values become regular "void *" pointers. * Add _Py_hashtable_entry_t.data member * Remove _Py_hashtable_t.data_size member * Remove _Py_hashtable_t.get_func member. It is no longer needed to specialize _Py_hashtable_get() for a specific value size, since all entries now have the same size (void*). * Remove the following macros: * _Py_HASHTABLE_GET() * _Py_HASHTABLE_SET() * _Py_HASHTABLE_SET_NODATA() * _Py_HASHTABLE_POP() * Rename _Py_hashtable_pop() to _Py_hashtable_steal() * _Py_hashtable_foreach() callback now gets key and value rather than entry. * Remove _Py_hashtable_value_destroy_func type. value_destroy_func callback now only has a single parameter: data (void*).
* bpo-40609: _tracemalloc allocates traces (GH-20064)Victor Stinner2020-05-131-10/+0
| | | | | | | | | | | | | Rewrite _tracemalloc to store "trace_t*" rather than directly "trace_t" in traces hash tables. Traces are now allocated on the heap memory, outside the hash table. Add tracemalloc_copy_traces() and tracemalloc_copy_domains() helper functions. Remove _Py_hashtable_copy() function since there is no API to copy a key or a value. Remove also _Py_hashtable_delete() function which was commented.
* bpo-40609: Add destroy functions to _Py_hashtable (GH-20062)Victor Stinner2020-05-131-3/+10
| | | | | | Add key_destroy_func and value_destroy_func parameters to _Py_hashtable_new_full(). marshal.c and _tracemalloc.c use these destroy functions.
* bpo-40609: Remove _Py_hashtable_t.key_size (GH-20060)Victor Stinner2020-05-131-53/+21
| | | | | | | | | | Rewrite _Py_hashtable_t type to always store the key as a "const void *" pointer. Add an explicit "key" member to _Py_hashtable_entry_t. Remove _Py_hashtable_t.key_size member. hash and compare functions drop their hash table parameter, and their 'key' parameter type becomes "const void *".
* bpo-40609: Rewrite how _tracemalloc handles domains (GH-20059)Victor Stinner2020-05-121-6/+1
| | | | | | | | | | Rewrite how the _tracemalloc module stores traces of other domains. Rather than storing the domain inside the key, it now uses a new hash table with the domain as the key, and the data is a per-domain traces hash table. * Add tracemalloc_domain hash table. * Remove _Py_tracemalloc_config.use_domain. * Remove pointer_t and related functions.
* bpo-40602: Add _Py_HashPointerRaw() function (GH-20056)Victor Stinner2020-05-121-0/+2
| | | | | Add a new _Py_HashPointerRaw() function which avoids replacing -1 with -2 to micro-optimize hash table using pointer keys: using _Py_hashtable_hash_ptr() hash function.
* bpo-38787: Add PyCFunction_CheckExact() macro for exact type checks (GH-20024)scoder2020-05-122-1/+5
| | | | | … now that we allow subtypes of PyCFunction. Also add PyCMethod_CheckExact() and PyCMethod_Check() for checks against the PyCMethod subtype.
* bpo-40602: Optimize _Py_hashtable for pointer keys (GH-20051)Victor Stinner2020-05-121-15/+25
| | | | | | | | | | | | | | | Optimize _Py_hashtable_get() and _Py_hashtable_get_entry() for pointer keys: * key_size == sizeof(void*) * hash_func == _Py_hashtable_hash_ptr * compare_func == _Py_hashtable_compare_direct Changes: * Add get_func and get_entry_func members to _Py_hashtable_t * Convert _Py_hashtable_get() and _Py_hashtable_get_entry() functions to static nline functions. * Add specialized get and get entry for pointer keys.
* bpo-40593: Improve syntax errors for invalid characters in source code. ↵Serhiy Storchaka2020-05-122-1/+2
| | | | (GH-20033)
* bpo-40602: Rename hashtable.h to pycore_hashtable.h (GH-20044)Victor Stinner2020-05-121-0/+218
| | | | | | | * Move Modules/hashtable.h to Include/internal/pycore_hashtable.h * Move Modules/hashtable.c to Python/hashtable.c * Python is now linked to hashtable.c. _tracemalloc is no longer linked to hashtable.c. Previously, marshal.c got hashtable.c via _tracemalloc.c which is built as a builtin module.