summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* gh-104773: PEP 594: Remove the sndhdr module (#104774)Victor Stinner2023-05-241-1/+0
| | | Remove the Lib/test/sndhdrdata/ directory.
* gh-104773: PEP 594: Remove cgi and cgitb modules (#104775)Victor Stinner2023-05-241-2/+0
| | | | | * Replace "cgi" with "!cgi" in the Sphinx documentation to avoid warnings on broken references. * test_pyclbr no longer tests the cgi module.
* gh-104780: Remove 2to3 program and lib2to3 module (#104781)Victor Stinner2023-05-231-1/+0
| | | | | | | | | * Remove the Tools/scripts/2to3 script. * Remove the Lib/test/test_lib2to3/ directory. * Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object type. * Makefile and PC/layout/main.py no longer compile lib2to3 grammar files. * Update Makefile for 2to3 removal.
* gh-104773: PEP 594: Remove the telnetlib module (#104778)Victor Stinner2023-05-231-1/+0
|
* gh-104741: Add line number attribute to indentation error exception (#104743)Marta Gómez Macías2023-05-221-6/+9
|
* gh-104656: Rename typeparams AST node to type_params (#104657)Jelle Zijlstra2023-05-225-219/+221
|
* gh-102856: Tokenize performance improvement (#104731)Marta Gómez Macías2023-05-221-1/+16
|
* gh-104686: Fix tracing for decorated classes (#104708)Jelle Zijlstra2023-05-211-0/+4
|
* gh-103295: expose API for writing perf map files (#103546)gsallam2023-05-213-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ías2023-05-212-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 Zijlstra2023-05-191-4/+31
|
* GH-102818: Do not call `PyTraceBack_Here` in sys.settrace trampoline. ↵Mark Shannon2023-05-191-4/+0
| | | | (GH-104579)
* gh-104619: never leak comprehension locals to outer locals() (#104637)Carl Meyer2023-05-191-21/+19
|
* gh-104602: ensure all cellvars are known up front (#104603)Carl Meyer2023-05-192-20/+21
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-104615: don't make unsafe swaps in apply_static_swaps (#104620)Carl Meyer2023-05-182-2/+24
|
* GH-96803: Document and test new unstable internal frame API functions ↵Mark Shannon2023-05-181-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 Shannon2023-05-184-258/+256
| | | Move eval-breaker to the front of the interpreter state.
* gh-104374: Remove access to class scopes for inlined comprehensions (#104528)Jelle Zijlstra2023-05-182-7/+18
| | | Co-authored-by: Carl Meyer <carl@oddbird.net>
* GH-101520: Move tracemalloc functionality into core, leaving interface in ↵Mark Shannon2023-05-172-3/+1564
| | | | Modules. (#104508)
* 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.