summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* gh-104572: Improve error messages for invalid constructs in PEP 695 contexts ↵Jelle Zijlstra2023-05-171-4/+4
| | | | (#104573)
* GH-103906: Remove immortal refcounting in the interpreter (GH-103909)Brandt Bucher2023-05-162-509/+473
|
* gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866)Carl Meyer2023-05-166-229/+309
|
* gh-103763: Implement PEP 695 (#103764)Jelle Zijlstra2023-05-1611-626/+2291
| | | | | | | | | | | | | | This implements PEP 695, Type Parameter Syntax. It adds support for: - Generic functions (def func[T](): ...) - Generic classes (class X[T](): ...) - Type aliases (type X = ...) - New scoping when the new syntax is used within a class body - Compiler and interpreter changes to support the new syntax and scoping rules Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Eric Traut <eric@traut.com> Co-authored-by: Larry Hastings <larry@hastings.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104482: Fix error handling bugs in ast.c (#104483)Irit Katriel2023-05-152-19/+38
|
* gh-104341: Adjust tstate_must_exit() to Respect Interpreter Finalization ↵Eric Snow2023-05-155-6/+32
| | | | | (gh-104437) With the move to a per-interpreter GIL, this check slipped through the cracks.
* gh-101819: Isolate `_io` (#101948)Erlend E. Aasland2023-05-151-10/+0
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-87092: avoid gcc warning on uninitialized struct field in assemble.c ↵Dong-hee Na2023-05-141-1/+2
| | | | (#104460)
* gh-104404: fix crasher with nested comprehensions plus lambdas (#104442)Carl Meyer2023-05-131-7/+14
|
* GH-104405: Add missing PEP 523 checks (GH-104406)Brandt Bucher2023-05-124-403/+434
|
* GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵Mark Shannon2023-05-127-145/+178
| | | | | | | | (GH-104387) When monitoring LINE events, instrument all instructions that can have a predecessor on a different line. Then check that the a new line has been hit in the instrumentation code. This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
* gh-104413: Fix refleak when super attribute throws AttributeError (#104414)Jelle Zijlstra2023-05-122-114/+116
|
* gh-104377: fix cell in comprehension that is free in outer scope (#104394)Carl Meyer2023-05-111-3/+12
|
* gh-87729: improve hit rate of LOAD_SUPER_ATTR specialization (#104270)Carl Meyer2023-05-115-287/+324
|
* gh-87849: fix SEND specialization family definition (GH-104268)Carl Meyer2023-05-113-176/+177
|
* gh-104357: fix inlined comprehensions that close over iteration var (#104368)Carl Meyer2023-05-111-6/+13
|
* GH-102181: Improve specialization stats for SEND (GH-102182)penguin_wwy2023-05-101-41/+45
|
* gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202)Sebastian Berg2023-05-102-74/+1
| | | | | | | | | | This PR removes `_Py_dg_stdnan` and `_Py_dg_infinity` in favour of using the standard `NAN` and `INFINITY` macros provided by C99. This change has the side-effect of fixing a bug on MIPS where the hard-coded value used by `_Py_dg_stdnan` gave a signalling NaN rather than a quiet NaN. --------- Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-098-584/+915
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-104184: fix building --with-pydebug --enable-pystats (#104217)Carl Meyer2023-05-091-1/+1
|
* gh-104240: return code unit metadata from codegen (#104300)Irit Katriel2023-05-091-3/+47
|
* gh-99113: A Per-Interpreter GIL! (gh-104210)Eric Snow2023-05-082-45/+14
| | | | | This is the culmination of PEP 684 (and of my 8-year long multi-core Python project)! Each subinterpreter may now be created with its own GIL (via Py_NewInterpreterFromConfig()). If not so configured then the interpreter will share with the main interpreter--the status quo since subinterpreters were added decades ago. The main interpreter always has its own GIL and subinterpreters from Py_NewInterpreter() will always share with the main interpreter.
* gh-103650: Fix perf maps address format (#103651)Arthur Pastel2023-05-071-1/+1
|
* gh-104240: make _PyCompile_CodeGen support different compilation modes (#104241)Irit Katriel2023-05-071-2/+6
|
* gh-104018: remove unused format "z" handling in string formatfloat() (#104107)John Belmonte2023-05-071-1/+0
| | | This is a cleanup overlooked in PR #104033.
* gh-103886: Improve `builtins.__doc__` (#104179)Tomas R2023-05-071-2/+9
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-99113: Make Sure the GIL is Acquired at the Right Places (gh-104208)Eric Snow2023-05-063-40/+111
| | | This is a pre-requisite for a per-interpreter GIL. Without it this change isn't strictly necessary. However, there is no real downside otherwise.
* gh-104233: Fix "unused variable" warning in `ceval_gil.c` (#104234)Nikita Sobolev2023-05-061-0/+2
|
* gh-99113: Add PyInterpreterConfig.own_gil (gh-104204)Eric Snow2023-05-052-6/+29
| | | | | We also add PyInterpreterState.ceval.own_gil to record if the interpreter actually has its own GIL. Note that for now we don't actually respect own_gil; all interpreters still share the one GIL. However, PyInterpreterState.ceval.own_gil does reflect PyInterpreterConfig.own_gil. That lie is a temporary one that we will fix when the GIL really becomes per-interpreter.
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-055-0/+5
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-99113: Share the GIL via PyInterpreterState.ceval.gil (gh-104203)Eric Snow2023-05-052-39/+60
| | | In preparation for a per-interpreter GIL, we add PyInterpreterState.ceval.gil, set it to the shared GIL for each interpreter, and use that rather than using _PyRuntime.ceval.gil directly. Note that _PyRuntime.ceval.gil is still the actual GIL.
* GH-96803: Add three C-API functions to make _PyInterpreterFrame less opaque ↵Mark Shannon2023-05-053-3/+20
| | | | for users of PEP 523. (GH-96849)
* gh-103323: Remove PyRuntimeState_GetThreadState() (#104171)Victor Stinner2023-05-044-9/+7
| | | | | This function no longer makes sense, since its runtime parameter is no longer used. Use directly _PyThreadState_GET() and _PyInterpreterState_GET() instead.
* gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)Petr Viktorin2023-05-041-0/+12
| | | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-103845: Remove line & instruction instrumentations before adding them ↵Tian Gao2023-05-031-8/+33
| | | | back (GH-103851)
* GH-84976: Move Lib/datetime.py to Lib/_pydatetimePaul Ganssle2023-05-031-0/+1
| | | | | | This breaks the tests, but we are keeping it as a separate commit so that the move operation and editing of the moved files are separate, for a cleaner history.
* gh-104109: Expose Py_NewInterpreterFromConfig() in the Public C-API (gh-104110)Eric Snow2023-05-031-7/+8
| | | | | We also expose PyInterpreterConfig. This is part of the PEP 684 (per-interpreter GIL) implementation. We will add docs as soon as we can. FYI, I'm adding the new config field for per-interpreter GIL in gh-99114.
* gh-94673: Hide Objects in PyTypeObject Behind Accessors (gh-104074)Eric Snow2023-05-021-1/+1
| | | This makes it much cleaner to move more PyTypeObject fields to PyInterpreterState.
* gh-94673: Properly Initialize and Finalize Static Builtin Types for Each ↵Eric Snow2023-05-024-28/+26
| | | | | Interpreter (gh-104072) Until now, we haven't been initializing nor finalizing the per-interpreter state properly.
* gh-87092: Expose assembler to unit tests (#103988)Irit Katriel2023-05-012-33/+102
|
* gh-84436: Immortalize in _PyStructSequence_InitBuiltinWithFlags() (gh-104054)Eric Snow2023-05-013-9/+9
| | | This also does some cleanup.
* gh-103895: Improve how invalid `Exception.__notes__` are displayed (#103897)Carey Metcalfe2023-05-011-1/+4
|
* gh-98003: Inline call frames for CALL_FUNCTION_EX (GH-98004)Ken Jin2023-04-303-43/+127
|
* gh-87092: change assembler to use instruction sequence instead of CFG (#103933)Irit Katriel2023-04-293-75/+80
|
* GH-103082: Code cleanup in instrumentation code (#103474)Mark Shannon2023-04-293-36/+39
|
* gh-98040: Remove just the `imp` module (#98573)Barry Warsaw2023-04-284-27/+19
|
* gh-103978: avoid using 'class' as an identifier (#103979)Carl Meyer2023-04-281-3/+3
|
* gh-94673: Ensure Builtin Static Types are Readied Properly (gh-103940)Eric Snow2023-04-276-41/+16
| | | There were cases where we do unnecessary work for builtin static types. This also simplifies some work necessary for a per-interpreter GIL.
* gh-103879: Fix refleak in super specialization (#103882)Jelle Zijlstra2023-04-261-0/+2
|
* gh-87729: specialize LOAD_SUPER_ATTR_METHOD (#103809)Carl Meyer2023-04-255-291/+390
|