summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)Mark Shannon2022-01-111-0/+1
|
* bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)Victor Stinner2022-01-111-0/+2
| | | | | | | | | | Move almost all private functions of Include/cpython/fileutils.h to the internal C API Include/internal/pycore_fileutils.h. Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's used by _testcapi which must not use the internal C API. Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi to _testinternalcapi, since the C API moved to the internal C API.
* bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)Mark Shannon2022-01-101-144/+142
|
* bpo-46217: Revert use of Windows constant that is newer than what we support ↵Steve Dower2022-01-081-1/+1
| | | | (GH-30473)
* bpo-46289: Make conversion of FormattedValue not optional on ASDL (GH-30467)Batuhan Taskaya2022-01-071-8/+5
| | | Automerge-Triggered-By: GH:isidentical
* bpo-46286: use the new POP_JUMP_IF_NOT_NONE opcode to simplify except* ↵Irit Katriel2022-01-061-6/+2
| | | | | (GH-30439) Automerge-Triggered-By: GH:iritkatriel
* bpo-46208: Fix normalization of relative paths in ↵neonene2022-01-061-9/+16
| | | | _Py_normpath()/os.path.normpath (GH-30362)
* bpo-45923: Handle call events in bytecode (GH-30364)Mark Shannon2022-01-063-72/+117
| | | | * Add a RESUME instruction to handle "call" events.
* bpo-46031: add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE (GH-30019)penguin_wwy2022-01-063-6/+57
|
* bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372)Brandt Bucher2022-01-051-8/+5
|
* bpo-46009: Remove GEN_START (GH-30367)Brandt Bucher2022-01-043-29/+8
|
* bpo-45609: More specialization stats for STORE_SUBSCR (GH-30193)Dennis Sweeney2022-01-041-3/+68
|
* bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)Irit Katriel2022-01-043-46/+36
| | | | | | * bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE * do not assume that an exception group is truthy
* bpo-46219, 46221: simplify except* implementation following exc_info ↵Irit Katriel2022-01-022-141/+17
| | | | changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289)
* Update copyright year to 2022. (GH-30335)Benjamin Peterson2022-01-021-1/+1
| | | Automerge-Triggered-By: GH:benjaminp
* bpo-46090: Allow PyThreadState.datastack_* members to be NULL (GH-30234)Brandt Bucher2021-12-281-21/+17
|
* bpo-46072: Add top level stats struct (GH-30169)Mark Shannon2021-12-172-70/+59
|
* bpo-45711: Remove type and traceback from exc_info (GH-30122)Irit Katriel2021-12-174-269/+119
| | | | | | | | * Do not PUSH/POP traceback or type to the stack as part of exc_info * Remove exc_traceback and exc_type from _PyErr_StackItem * Add to what's new, because this change breaks things like Cython
* bpo-45635: Do not suppress errors in functions called from _PyErr_Display ↵Irit Katriel2021-12-161-113/+157
| | | | | | (GH-30073) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* Better randomization of stats filenames. (GH-30145)Mark Shannon2021-12-161-2/+14
|
* bpo-45829: Check `__getitem__`'s version for overflow before specializing ↵Brandt Bucher2021-12-161-1/+1
| | | | | | | (GH-30129) * Check __getitem__'s version for overflow. * Use SPEC_FAIL_OUT_OF_VERSIONS instead
* bpo-46072: Add --with-pystats configure option to simplify gathering of VM ↵Mark Shannon2021-12-152-27/+24
| | | | | | | | | stats (GH-30116) * Simplify specialization stats collection macros. * Add --enable-pystats option to configure. * Update specialization summary script to handle larger number of kinds
* bpo-44525: Specialize for calls to type and other builtin classes with 1 ↵Mark Shannon2021-12-153-16/+74
| | | | argument. (GH-29942)
* bpo-46039: Split yield from in two (GH-30035)Mark Shannon2021-12-153-30/+54
| | | | | | * Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE. * Remove YIELD_FROM opcode.
* bpo-44525: Split calls into PRECALL and CALL (GH-30011)Mark Shannon2021-12-144-120/+280
| | | | | | | | | | * Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
* bpo-45292: [PEP-654] add except* (GH-29581)Irit Katriel2021-12-147-12/+954
|
* bpo-45919: Remove out of date comment (GH-30090)Dong-hee Na2021-12-141-2/+4
|
* bpo-45953: Statically initialize the small ints. (gh-30092)Eric Snow2021-12-141-2/+0
| | | | | | | The array of small PyLong objects has been statically declared. Here I also statically initialize them. Consequently they are no longer initialized dynamically during runtime init. I've also moved them under a new sub-struct in _PyRuntimeState, in preparation for static allocation and initialization of other global objects. https://bugs.python.org/issue45953
* bpo-45919: Use WinAPI GetFileType() in is_valid_fd() (GH-30082)Dong-hee Na2021-12-131-12/+10
|
* bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with ↵Kumar Aditya2021-12-122-2/+2
| | | | PyImport_ImportModule (GH-30046)
* bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059)Pablo Galindo Salgado2021-12-111-60/+83
|
* bpo-37971: fix the position of decorator application (GH-30027)Carl Friedrich Bolz-Tereick2021-12-101-8/+25
| | | | | | | The line numbers of actually calling the decorator functions of functions and classes was wrong (as opposed to loading them, were they have been correct previously too). Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45635: refactor print_exception_recursive into smaller functions to ↵Irit Katriel2021-12-101-149/+187
| | | | | standardize error handling (GH-30015) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-45654: No need to freeze types (GH-30028)Christian Heimes2021-12-101-3/+0
|
* bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)neonene2021-12-101-0/+2
| | | This defines VPATH differently in PGO instrumentation builds, to account for a different default output directory. It also adds sys._vpath on Windows to make the value available to sysconfig so that it can be used in tests.
* bpo-43931: Export Python version as API data (GH-25577)Gabriele N. Tornetta2021-12-101-0/+3
| | | | | When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...). Automerge-Triggered-By: GH:pablogsal
* bpo-46008: Make runtime-global object/type lifecycle functions and state ↵Eric Snow2021-12-094-51/+100
| | | | | | | | | | | | consistent. (gh-29998) This change is strictly renames and moving code around. It helps in the following ways: * ensures type-related init functions focus strictly on one of the three aspects (state, objects, types) * passes in PyInterpreterState * to all those functions, simplifying work on moving types/objects/state to the interpreter * consistent naming conventions help make what's going on more clear * keeping API related to a type in the corresponding header file makes it more obvious where to look for it https://bugs.python.org/issue46008
* bpo-45654: Freeze the runpy module and stuff it imports (GH-29903)Kumar Aditya2021-12-091-0/+14
|
* bpo-45635: continue refactor of print_exception() to standardize error ↵Irit Katriel2021-12-091-78/+105
| | | | | handling (GH-29996) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-45510: Check both types when specializing subtraction (GH-29995)Brandt Bucher2021-12-091-0/+4
|
* bpo-45711: Remove unnecessary normalization of exc_info (GH-29922)Irit Katriel2021-12-081-20/+0
|
* bpo-45635: refactor print_exception() into smaller functions (GH-29981)Irit Katriel2021-12-081-87/+139
| | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-46009: Do not exhaust generator when send() method raises (GH-29986)Mark Shannon2021-12-081-18/+2
|
* bpo-46008: Move Py*State init into distinct functions. (gh-29977)Eric Snow2021-12-081-101/+272
| | | | | Previously, basic initialization of PyInterprterState happened in PyInterpreterState_New() (along with allocation and adding the new interpreter to the runtime state). This prevented us from initializing interpreter states that were allocated separately (e.g. statically or in a free list). We've addressed that here by factoring out a separate function just for initialization. We've done the same for PyThreadState. _PyRuntimeState was sorted out when we added it since _PyRuntime is statically allocated. However, here we update the existing init code to line up with the functions for PyInterpreterState and PyThreadState. https://bugs.python.org/issue46008
* bpo-46008: Add _PyInterpreterState_Main(). (gh-29978)Eric Snow2021-12-082-2/+2
| | | | | PyInterpreterState_Main() is a plain function exposed in the public C-API. For internal usage we can take the more efficient approach in this PR. https://bugs.python.org/issue46008
* bpo-46008: Stop calling _PyThreadState_Init() in new_threadstate(). (gh-29973)Eric Snow2021-12-081-7/+13
| | | | | This simplifies new_threadstate(). We also rename _PyThreadState_Init() to _PyThreadState_SetCurrent() to reflect what it actually does. https://bugs.python.org/issue46008
* bpo-46008: Use PyMem_RawCalloc() to allocate PyThreadState. (GH-29972)Eric Snow2021-12-071-38/+2
| | | | | Doing so allows us to stop assigning various fields to `NULL` and 0. It also more closely matches the behavior of a static initializer. Automerge-Triggered-By: GH:ericsnowcurrently
* bpo-46008: Move thread-related interpreter state into a sub-struct. (gh-29971)Eric Snow2021-12-076-25/+25
| | | | | This parallels _PyRuntimeState.interpreters. Doing this helps make it more clear what part of PyInterpreterState relates to its threads. https://bugs.python.org/issue46008
* bpo-46008: Return void from _PyEval_InitState(). (gh-29970)Eric Snow2021-12-072-9/+6
| | | | | This falls into the category of keep-allocation-and-initialization separate. It also allows us to use _PyEval_InitState() safely in functions that return void. https://bugs.python.org/issue46008
* Fix leak when an exception is raised during generator creation. (GH-29960)Mark Shannon2021-12-071-20/+7
|