Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.12] gh-104976: Ensure trailing dedent tokens are emitted as the previous ↵ | Miss Islington (bot) | 2023-05-26 | 1 | -3/+23 |
| | | | | tokenizer (GH-104980) (#105000) | ||||
* | [3.12] gh-104972: Ensure that line attributes in tokens in the tokenize ↵ | Miss Islington (bot) | 2023-05-26 | 1 | -5/+4 |
| | | | | | | | | module are correct (GH-104975) (#104982) gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975) (cherry picked from commit 3fdb55c48291a459fb1e33edb5140ec0383222df) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> | ||||
* | [3.12] gh-104825: Remove implicit newline in the line attribute in tokens ↵ | Pablo Galindo Salgado | 2023-05-24 | 1 | -0/+4 |
| | | | | | emitted in the tokenize module (GH-104846). (#104850) (cherry picked from commit c8cf9b42eb2bfbd4c3e708ec28d32430248a1d7a) | ||||
* | gh-104741: Add line number attribute to indentation error exception (#104743) | Marta Gómez Macías | 2023-05-22 | 1 | -6/+9 |
| | |||||
* | gh-104656: Rename typeparams AST node to type_params (#104657) | Jelle Zijlstra | 2023-05-22 | 5 | -219/+221 |
| | |||||
* | gh-102856: Tokenize performance improvement (#104731) | Marta Gómez Macías | 2023-05-22 | 1 | -1/+16 |
| | |||||
* | gh-104686: Fix tracing for decorated classes (#104708) | Jelle Zijlstra | 2023-05-21 | 1 | -0/+4 |
| | |||||
* | gh-103295: expose API for writing perf map files (#103546) | gsallam | 2023-05-21 | 3 | -69/+96 |
| | | | | | Co-authored-by: Aniket Panse <aniketpanse@fb.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Carl Meyer <carl@oddbird.net> | ||||
* | gh-102856: Python tokenizer implementation for PEP 701 (#104323) | Marta Gómez Macías | 2023-05-21 | 2 | -22/+140 |
| | | | | | | | | | | | This commit replaces the Python implementation of the tokenize module with an implementation that reuses the real C tokenizer via a private extension module. The tokenize module now implements a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward compatibility. As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation. Co-authored-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-104640: Disallow walrus in comprehension within type scopes (#104641) | Jelle Zijlstra | 2023-05-19 | 1 | -4/+31 |
| | |||||
* | GH-102818: Do not call `PyTraceBack_Here` in sys.settrace trampoline. ↵ | Mark Shannon | 2023-05-19 | 1 | -4/+0 |
| | | | | (GH-104579) | ||||
* | gh-104619: never leak comprehension locals to outer locals() (#104637) | Carl Meyer | 2023-05-19 | 1 | -21/+19 |
| | |||||
* | gh-104602: ensure all cellvars are known up front (#104603) | Carl Meyer | 2023-05-19 | 2 | -20/+21 |
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | ||||
* | gh-104615: don't make unsafe swaps in apply_static_swaps (#104620) | Carl Meyer | 2023-05-18 | 2 | -2/+24 |
| | |||||
* | GH-96803: Document and test new unstable internal frame API functions ↵ | Mark Shannon | 2023-05-18 | 1 | -2/+2 |
| | | | | | | (GH-104211) Weaken contract of PyUnstable_InterpreterFrame_GetCode to return PyObject*. | ||||
* | GH-104580: Don't cache eval breaker in interpreter (GH-104581) | Mark Shannon | 2023-05-18 | 4 | -258/+256 |
| | | | Move eval-breaker to the front of the interpreter state. | ||||
* | gh-104374: Remove access to class scopes for inlined comprehensions (#104528) | Jelle Zijlstra | 2023-05-18 | 2 | -7/+18 |
| | | | Co-authored-by: Carl Meyer <carl@oddbird.net> | ||||
* | GH-101520: Move tracemalloc functionality into core, leaving interface in ↵ | Mark Shannon | 2023-05-17 | 2 | -3/+1564 |
| | | | | Modules. (#104508) | ||||
* | gh-104572: Improve error messages for invalid constructs in PEP 695 contexts ↵ | Jelle Zijlstra | 2023-05-17 | 1 | -4/+4 |
| | | | | (#104573) | ||||
* | GH-103906: Remove immortal refcounting in the interpreter (GH-103909) | Brandt Bucher | 2023-05-16 | 2 | -509/+473 |
| | |||||
* | gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866) | Carl Meyer | 2023-05-16 | 6 | -229/+309 |
| | |||||
* | gh-103763: Implement PEP 695 (#103764) | Jelle Zijlstra | 2023-05-16 | 11 | -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 Katriel | 2023-05-15 | 2 | -19/+38 |
| | |||||
* | gh-104341: Adjust tstate_must_exit() to Respect Interpreter Finalization ↵ | Eric Snow | 2023-05-15 | 5 | -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. Aasland | 2023-05-15 | 1 | -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 Na | 2023-05-14 | 1 | -1/+2 |
| | | | | (#104460) | ||||
* | gh-104404: fix crasher with nested comprehensions plus lambdas (#104442) | Carl Meyer | 2023-05-13 | 1 | -7/+14 |
| | |||||
* | GH-104405: Add missing PEP 523 checks (GH-104406) | Brandt Bucher | 2023-05-12 | 4 | -403/+434 |
| | |||||
* | GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵ | Mark Shannon | 2023-05-12 | 7 | -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 Zijlstra | 2023-05-12 | 2 | -114/+116 |
| | |||||
* | gh-104377: fix cell in comprehension that is free in outer scope (#104394) | Carl Meyer | 2023-05-11 | 1 | -3/+12 |
| | |||||
* | gh-87729: improve hit rate of LOAD_SUPER_ATTR specialization (#104270) | Carl Meyer | 2023-05-11 | 5 | -287/+324 |
| | |||||
* | gh-87849: fix SEND specialization family definition (GH-104268) | Carl Meyer | 2023-05-11 | 3 | -176/+177 |
| | |||||
* | gh-104357: fix inlined comprehensions that close over iteration var (#104368) | Carl Meyer | 2023-05-11 | 1 | -6/+13 |
| | |||||
* | GH-102181: Improve specialization stats for SEND (GH-102182) | penguin_wwy | 2023-05-10 | 1 | -41/+45 |
| | |||||
* | gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202) | Sebastian Berg | 2023-05-10 | 2 | -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 Meyer | 2023-05-09 | 8 | -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 Meyer | 2023-05-09 | 1 | -1/+1 |
| | |||||
* | gh-104240: return code unit metadata from codegen (#104300) | Irit Katriel | 2023-05-09 | 1 | -3/+47 |
| | |||||
* | gh-99113: A Per-Interpreter GIL! (gh-104210) | Eric Snow | 2023-05-08 | 2 | -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 Pastel | 2023-05-07 | 1 | -1/+1 |
| | |||||
* | gh-104240: make _PyCompile_CodeGen support different compilation modes (#104241) | Irit Katriel | 2023-05-07 | 1 | -2/+6 |
| | |||||
* | gh-104018: remove unused format "z" handling in string formatfloat() (#104107) | John Belmonte | 2023-05-07 | 1 | -1/+0 |
| | | | This is a cleanup overlooked in PR #104033. | ||||
* | gh-103886: Improve `builtins.__doc__` (#104179) | Tomas R | 2023-05-07 | 1 | -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 Snow | 2023-05-06 | 3 | -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 Sobolev | 2023-05-06 | 1 | -0/+2 |
| | |||||
* | gh-99113: Add PyInterpreterConfig.own_gil (gh-104204) | Eric Snow | 2023-05-05 | 2 | -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 Snow | 2023-05-05 | 5 | -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 Snow | 2023-05-05 | 2 | -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 Shannon | 2023-05-05 | 3 | -3/+20 |
| | | | | for users of PEP 523. (GH-96849) |