summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-45085: Remove the binhex module (GH-28117)Victor Stinner2021-09-021-1/+0
| | | | | | | | | | The binhex module, deprecated in Python 3.9, is now removed. The following binascii functions, deprecated in Python 3.9, are now also removed: * a2b_hqx(), b2a_hqx(); * rlecode_hqx(), rledecode_hqx(). The binascii.crc_hqx() function remains available.
* bpo-45039: Consistently use ADDOP_LOAD_CONST in compiler rather than ↵Irit Katriel2021-08-311-2/+4
| | | | ADDOP_O(c, LOAD_CONST,...) (GH-28015)
* bpo-37596: Clean up the set/frozenset marshalling code (GH-28068)Brandt Bucher2021-08-311-8/+11
|
* bpo-45061: Enhance faulthandler traceback wit no Python frame (GH-28090)Victor Stinner2021-08-311-1/+1
| | | | | | | | Fix indentation of <no Python frame> message in a faulthandler traceback or a Fatal Python error traceback. Example: Current thread 0x00007f03896fb740 (most recent call first): Garbage-collecting <no Python frame>
* bpo-45019: Add a tool to generate list of modules to include for frozen ↵Eric Snow2021-08-305-29/+57
| | | | | | | modules (gh-27980) Frozen modules must be added to several files in order to work properly. Before this change this had to be done manually. Here we add a tool to generate the relevant lines in those files instead. This helps us avoid mistakes and omissions. https://bugs.python.org/issue45019
* bpo-45045: Optimize mapping patterns of structural pattern matching (GH-28043)Dong-hee Na2021-08-301-6/+17
|
* Refine specialization stats (GH-27992)Mark Shannon2021-08-271-17/+89
|
* bpo-44945: Specialize BINARY_ADD (GH-27967)Mark Shannon2021-08-273-46/+195
|
* bpo-45000: Raise SyntaxError when try to delete __debug__ (GH-27947)Dong-hee Na2021-08-251-0/+4
| | | Automerge-Triggered-By: GH:pablogsal
* bpo-44990: Change layout of evaluation frames. "Layout B" (GH-27933)Mark Shannon2021-08-253-66/+62
| | | Places the locals between the specials and stack. This is the more "natural" layout for a C struct, makes the code simpler and gives a slight speedup (~1%)
* Format the Python-tokenize module and fix exit path (GH-27935)Pablo Galindo Salgado2021-08-251-47/+46
|
* bpo-37596: Make `set` and `frozenset` marshalling deterministic (GH-27926)Brandt Bucher2021-08-251-0/+32
|
* Add tests for the C tokenizer and expose it as a private module (GH-27924)Pablo Galindo Salgado2021-08-243-0/+237
|
* bpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767)Dong-hee Na2021-08-172-0/+29
|
* bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)Ken Jin2021-08-173-37/+319
| | | | | | | | Adds four new instructions: * LOAD_METHOD_ADAPTIVE * LOAD_METHOD_CACHED * LOAD_METHOD_MODULE * LOAD_METHOD_CLASS
* bpo-44900: Add five superinstructions. (GH-27741)Mark Shannon2021-08-163-19/+115
| | | | | | | | * LOAD_FAST LOAD_FAST * STORE_FAST LOAD_FAST * LOAD_FAST LOAD_CONST * LOAD_CONST LOAD_FAST * STORE_FAST STORE_FAST
* bpo-43392: Optimize repeated calls to `__import__()` (GH-24735)Germán Méndez Bravo2021-08-121-512/+519
| | | | | | | | | | | | | | | | | | | | | Implements a two steps check in `importlib._bootstrap._find_and_load()` to avoid locking when the module has been already imported and it's ready. --- Using `importlib.__import__()`, after this, does show a big difference: Before: ``` $ ./python -c 'import timeit; print(timeit.timeit("__import__(\"timeit\")", setup="from importlib import __import__"))' 15.92248619502061 ``` After: ``` $ ./python -c 'import timeit; print(timeit.timeit("__import__(\"timeit\")", setup="from importlib import __import__"))' 1.206068897008663 ``` ---
* bpo-44885: Correct the ast locations of f-strings with format specs and ↵Pablo Galindo Salgado2021-08-123-42/+42
| | | | repeated expressions (GH-27729)
* bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)Irit Katriel2021-08-122-7/+7
|
* bpo-44878: Remove loop from interpreter. All dispatching is done by gotos. ↵Mark Shannon2021-08-121-14/+17
| | | | (GH-27727)
* Update test__opcode and _Py_GetSpecializationStats with recent ↵Irit Katriel2021-08-111-0/+1
| | | | specialization stat changes (GH-27728)
* bpo-44878: Remove the switch from the main interpreter loop when using ↵Mark Shannon2021-08-111-177/+206
| | | | | | | | computed gotos. (GH-27726) * Refactor dispatch logic to make flow of control clearer. Moves lltrace and dxprofile instrumentation into DISPATCH macro. * Remove switch in interpreter loop when using computed gotos. There is no need for two nearly-duplicate dispatch tables.
* bpo-44878: _PyEval_EvalFrameDefault readability improvements (GH-27725)Mark Shannon2021-08-111-51/+49
| | | | | * Move a few variable declarations to point of definition. * Factor out tracing of function entry into helper function.
* Add missing DISPATCH() (GH-27715)Mark Shannon2021-08-111-0/+2
|
* Classify specialization failures. Provides more useful stats, with lower ↵Mark Shannon2021-08-101-96/+83
| | | | overhead. (GH-27701)
* Fix stats for STORE_ATTR specialization. (GH-27708)Mark Shannon2021-08-101-0/+2
|
* bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle ↵Irit Katriel2021-08-101-1/+15
| | | | | in its context chain (GH-27626) Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
* bpo-44854: Remove trailing whitespaces (GH-27689)Serhiy Storchaka2021-08-091-2/+2
|
* Remove unused variable. (GH-27677)Mark Shannon2021-08-091-3/+0
|
* bpo-44826: Specialize STORE_ATTR (GH-27590)Mark Shannon2021-08-093-78/+311
| | | | | | | * Generalize cache names for LOAD_ATTR to allow store and delete specializations. * Factor out specialization of attribute dictionary access. * Specialize STORE_ATTR.
* bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to ↵Mark Shannon2021-08-094-6645/+6638
| | | | after CFG optimization. (GH-27656)
* bpo-44856: Possible reference leak in error paths of update_bases() and ↵Pablo Galindo Salgado2021-08-071-22/+13
| | | | __build_class__ (GH-27647)
* bpo-44849: Fix os.set_inheritable() on FreeBSD 14 with O_PATH (GH-27623)Victor Stinner2021-08-061-3/+4
| | | | | Fix the os.set_inheritable() function on FreeBSD 14 for file descriptor opened with the O_PATH flag: ignore the EBADF error on ioctl(), fallback on the fcntl() implementation.
* bpo-44584: Deprecate PYTHONTHREADDEBUG env var (GH-27065)Victor Stinner2021-08-062-0/+24
| | | | | The threading debug (PYTHONTHREADDEBUG environment variable) is deprecated in Python 3.10 and will be removed in Python 3.12. This feature requires a debug build of Python.
* Add option to write specialization stats to files and script to summarize. ↵Mark Shannon2021-08-042-12/+33
| | | | | | | (GH-27575) * Add option to write stats to random file in a directory. * Add script to summarize stats.
* closes bpo-39091: Fix segfault when Exception constructor returns ↵Noah2021-08-031-4/+16
| | | | | non-exception for gen.throw. (#17658) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* Minor fixes to specialization stats. (GH-27457)Mark Shannon2021-07-292-5/+11
| | | | | * Use class, not value for fail stats for BINARY_SUBSCR. * Fix counts for unquickened instructions.
* bpo-44725 : expose specialization stats in python (GH-27192)Irit Katriel2021-07-291-0/+78
|
* bpo-43897: Reject "_" captures and top-level MatchStar in the AST validator ↵Brandt Bucher2021-07-291-20/+28
| | | | (GH-27432)
* bpo-43897: AST validation for pattern matching nodes (GH24771)Batuhan Taskaya2021-07-281-31/+123
|
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-1/+1
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44590: Lazily allocate frame objects (GH-27077)Mark Shannon2021-07-268-272/+433
| | | | | | | | | | | | | | * Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it. * Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector. * Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation. * Move ownership of InterpreterFrame in generator from frame object to generator object. * Do not create frame objects for Python calls. * Do not create frame objects for generators.
* bpo-44600: Fix line numbers for pattern matching cleanup code (GH-27346)Charles Burkland2021-07-251-4/+12
|
* bpo-43950: support some multi-line expressions for PEP 657 (GH-27339)Batuhan Taskaya2021-07-251-9/+28
| | | | | | | | | | | | | | | | | | | | | This is basically something that I noticed up while fixing test runs for another issue. It is really common to have multiline calls, and when they fail the display is kind of weird since we omit the annotations. E.g; ``` $ ./python t.py Traceback (most recent call last): File "/home/isidentical/cpython/cpython/t.py", line 11, in <module> frame_1() ^^^^^^^^^ File "/home/isidentical/cpython/cpython/t.py", line 5, in frame_1 frame_2( File "/home/isidentical/cpython/cpython/t.py", line 2, in frame_2 return a / 0 / b / c ~~^~~ ZeroDivisionError: division by zero ``` This patch basically adds support for annotating the rest of the line, if the instruction covers multiple lines (start_line != end_line). Automerge-Triggered-By: GH:isidentical
* bpo-44717: improve AttributeError on circular imports of submodules (GH-27338)Filipe Laíns2021-07-241-1732/+1749
|
* bpo-43950: check against the raw string, not the pyobject (GH-27337)Batuhan Taskaya2021-07-241-1/+1
|
* Revert "bpo-44717: improve AttributeError on circular imports of submodules ↵Pablo Galindo Salgado2021-07-241-1749/+1732
| | | | | (GH-27299)" (GH-27331) This reverts commit 8072a1181dd64135f700b44372fbf7bf91e68072.
* bpo-43950: ensure source_line is present when specialising the traceback ↵Batuhan Taskaya2021-07-241-2/+2
| | | | (GH-27313)
* bpo-44717: improve AttributeError on circular imports of submodules (GH-27299)Filipe Laíns2021-07-241-1732/+1749
| | | | | Signed-off-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44611: Use BCryptGenRandom instead of CryptGenRandom on Windows (GH-27168)Dong-hee Na2021-07-231-40/+8
|