summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45152: Add HAS_CONST macro and get_const_value() function and use… ↵Irit Katriel2021-09-141-0/+10
| | | | (#28262)
* bpo-45019: Do some cleanup related to frozen modules. (gh-28319)Eric Snow2021-09-132-103/+225
| | | | | There are a few things I missed in gh-27980. This is a follow-up that will make subsequent PRs cleaner. It includes fixes to tests and tools that reference the frozen modules. https://bugs.python.org/issue45019
* bpo-43413: Fix handling keyword arguments in subclasses of some buitin ↵Serhiy Storchaka2021-09-121-2/+8
| | | | | | | | classes (GH-26456) * Constructors of subclasses of some buitin classes (e.g. tuple, list, frozenset) no longer accept arbitrary keyword arguments. * Subclass of set can now define a __new__() method with additional keyword parameters without overriding also __init__().
* Fix typos in pep384_macrocheck.py (GH-28220)Ikko Ashimine2021-09-101-2/+2
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-45022: Fix libffi DLL name in Windows installer sources (GH-28203)giovanniwijaya2021-09-071-1/+1
|
* bpo-38820: Test with OpenSSL 3.0.0 final (GH-28205)Christian Heimes2021-09-071-1/+5
| | | Signed-off-by: Christian Heimes <christian@python.org>
* Extract visitors from the grammar nodes and call makers in the peg generator ↵Pablo Galindo Salgado2021-09-0511-240/+244
| | | | | (GH-28172) Simplify the peg generator logic by extracting as much visitors as possible to disentangle the flow and separate concerns.
* bpo-45060: Get rid of few uses of the equality operators with None (GH-28087)Serhiy Storchaka2021-08-311-2/+2
|
* bpo-45019: Add a tool to generate list of modules to include for frozen ↵Eric Snow2021-08-302-6/+526
| | | | | | | 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-45007: Update multissl to openssl 1.1.1l as well (GH-28044)Łukasz Langa2021-08-301-1/+1
| | | This was missed while upgrading CI.
* bpo-44990: Change layout of evaluation frames. "Layout B" (GH-27933)Mark Shannon2021-08-251-2/+4
| | | 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%)
* bpo-24234: Implement bytes.__bytes__ (GH-27901)Dong-hee Na2021-08-231-1/+0
|
* bpo-44978: allow Argument Clinic to handle __complex__ special methods ↵Mark Dickinson2021-08-221-1/+0
| | | | (GH-27886)
* Update pegen to use the latest upstream developments (GH-27586)Pablo Galindo Salgado2021-08-1219-397/+549
|
* Classify specialization failures. Provides more useful stats, with lower ↵Mark Shannon2021-08-101-0/+12
| | | | overhead. (GH-27701)
* bpo-44854: Remove trailing whitespaces (GH-27689)Serhiy Storchaka2021-08-092-2/+2
|
* Add option to write specialization stats to files and script to summarize. ↵Mark Shannon2021-08-041-0/+41
| | | | | | | (GH-27575) * Add option to write stats to random file in a directory. * Add script to summarize stats.
* Update URLs in comments and metadata to use HTTPS (GH-27458)Noah Kantrowitz2021-07-308-9/+9
|
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-262-3/+3
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44590: Lazily allocate frame objects (GH-27077)Mark Shannon2021-07-261-27/+122
| | | | | | | | | | | | | | * 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-43425: Remove test2to3 from Tools (#26981)Dong-hee Na2021-07-178-74/+0
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-20201: variadic arguments support for AC (GH-18609)Batuhan Taskaya2021-07-161-59/+155
| | | Implement support for `*args` in AC, and port `print()` to use it.
* bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)Erlend Egeberg Aasland2021-07-141-10/+0
| | | Automerge-Triggered-By: GH:encukou
* bpo-42862: Strip stale sqlite3 cache ignores from c-analyzer (GH-26876)Erlend Egeberg Aasland2021-06-231-5/+0
|
* bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)Erlend Egeberg Aasland2021-06-231-10/+0
| | | Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
* bpo-42064: Remove stale extern declarations in `sqlite3` headers (GH-26840)Erlend Egeberg Aasland2021-06-231-14/+0
|
* bpo-38820: Test with OpenSSL 3.0.0-beta1 (GH-26769)Christian Heimes2021-06-191-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-44032: Move pointer to code object from frame-object to frame specials ↵Mark Shannon2021-06-181-11/+14
| | | | array. (GH-26771)
* bpo-43795: Don't list private names in the limited API (GH-26740)Petr Viktorin2021-06-161-0/+12
| | | | | | | | | | | | | * Remove struct _node from the stable ABI list This struct was removed along with the old parser in Python 3.9 (PEP 617) * Stable ABI list: Use the public name "PyFrameObject" rather than "_frame" * Ensure limited API doesn't contain private names Names prefixed by an underscore are private by definition. * Add a blurb
* bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)Mark Shannon2021-06-101-0/+9
| | | | | | | | | | | | | | * Specialize LOAD_ATTR with LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS * Move dict-common.h to internal/pycore_dict.h * Add LOAD_ATTR_WITH_HINT specialized opcode. * Quicken in function if loopy * Specialize LOAD_ATTR for module attributes. * Add specialization stats
* bpo-44345: Fix 'generated by' comment in parser.c (GH-26615)Akira Nonaka2021-06-091-1/+1
|
* bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)Eric Snow2021-06-071-4/+6
| | | | | | | | | | These were reverted in gh-26530 (commit 17c4edc) due to refleaks. * 2c1e258 - Compute deref offsets in compiler (gh-25152) * b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388) This change fixes the refleaks. https://bugs.python.org/issue43693
* bpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and ↵Pablo Galindo2021-06-041-6/+4
| | | | | | | | | | | | | b2bf2bc1ece673d387341e06c8d3c2bc6e259747 (GH-26530) * Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)" This reverts commit b2bf2bc1ece673d387341e06c8d3c2bc6e259747. * Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)" This reverts commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f. These two commits are breaking the refleak buildbots.
* bpo-43693: Add new internal code objects fields: co_fastlocalnames and ↵Eric Snow2021-06-031-4/+6
| | | | | | | | | | | | | | | | | co_fastlocalkinds. (gh-26388) A number of places in the code base (notably ceval.c and frameobject.c) rely on mapping variable names to indices in the frame "locals plus" array (AKA fast locals), and thus opargs. Currently the compiler indirectly encodes that information on the code object as the tuples co_varnames, co_cellvars, and co_freevars. At runtime the dependent code must calculate the proper mapping from those, which isn't ideal and impacts performance-sensitive sections. This is something we can easily address in the compiler instead. This change addresses the situation by replacing internal use of co_varnames, etc. with a single combined tuple of names in locals-plus order, along with a minimal array mapping each to its kind (local vs. cell vs. free). These two new PyCodeObject fields, co_fastlocalnames and co_fastllocalkinds, are not exposed to Python code for now, but co_varnames, etc. are still available with the same values as before (though computed lazily). Aside from the (mild) performance impact, there are a number of other benefits: * there's now a clear, direct relationship between locals-plus and variables * code that relies on the locals-plus-to-name mapping is simpler * marshaled code objects are smaller and serialize/de-serialize faster Also note that we can take this approach further by expanding the possible values in co_fastlocalkinds to include specific argument types (e.g. positional-only, kwargs). Doing so would allow further speed-ups in _PyEval_MakeFrameVector(), which is where args get unpacked into the locals-plus array. It would also allow us to shrink marshaled code objects even further. https://bugs.python.org/issue43693
* bpo-44206: Add a version number to dictionary keys (GH-26333)Mark Shannon2021-05-281-1/+1
| | | | | | | | * Store log2(size) instead of size in dict-keys. * Use enum instead of function pointer to record kind of keys. * Add version number to dict keys.
* bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)Pablo Galindo2021-05-211-0/+2
| | | | | | | | | | | | | | | The invalid assignment rules are very delicate since the parser can easily raise an invalid assignment when a keyword argument is provided. As they are very deep into the grammar tree, is very difficult to specify in which contexts these rules can be used and in which don't. For that, we need to use a different version of the rule that doesn't do error checking in those situations where we don't want the rule to raise (keyword arguments and generator expressions). We also need to check if we are in left-recursive rule, as those can try to eagerly advance the parser even if the parse will fail at the end of the expression. Failing to do this allows the parser to start parsing a call as a tuple and incorrectly identify a keyword argument as an invalid assignment, before it realizes that it was not a tuple after all.
* bpo-44032: Move data stack to thread from FrameObject. (GH-26076)Mark Shannon2021-05-211-3/+17
| | | | | | | | | | | | | | | | * Remove 'zombie' frames. We won't need them once we are allocating fixed-size frames. * Add co_nlocalplus field to code object to avoid recomputing size of locals + frees + cells. * Move locals, cells and freevars out of frame object into separate memory buffer. * Use per-threadstate allocated memory chunks for local variables. * Move globals and builtins from frame object to per-thread stack. * Move (slow) locals frame object to per-thread stack. * Move internal frame functions to internal header.
* bpo-38820: Test with OpenSSL 3.0.0-alpha17 (#26266)Christian Heimes2021-05-201-1/+1
|
* bpo-44131: Test Py_FrozenMain() (GH-26126)Victor Stinner2021-05-171-11/+9
| | | | | | | | | * Add test_frozenmain to test_embed * Add Programs/test_frozenmain.py * Add Programs/freeze_test_frozenmain.py * Add Programs/test_frozenmain.h * Add make regen-test-frozenmain * Add test_frozenmain command to Programs/_testembed * _testembed.c: add error(msg) function
* Remove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438)Serhii Hidenko2021-05-161-1/+0
|
* bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)Antoine Pitrou2021-05-131-1/+4
| | | | | The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text. Automerge-Triggered-By: GH:pitrou
* bpo-43795: PEP 652 user documentation (GH-25668)Petr Viktorin2021-05-111-6/+27
| | | | | | - Reformat the C API and ABI Versioning page (and extend/clarify a bit) - Rewrite the stable ABI docs into a general text on C API Compatibility - Add a list of Limited API contents, and notes for the individual items. - Replace `Include/README.rst` with a link to a devguide page with the same info
* bpo-44074: let patchcheck infer the base branch name (GH-25991)Leonardo Lai2021-05-101-4/+26
|
* Do not use Py_ssize_clean_t (GH-25940)Inada Naoki2021-05-081-2/+2
|
* bpo-40222: "Zero cost" exception handling (GH-25729)Mark Shannon2021-05-071-6/+4
| | | | | | | | "Zero cost" exception handling. * Uses a lookup table to determine how to handle exceptions. * Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements. * Reduces the size of the frame object by about 60%.
* bpo-38820: Test with OpenSSL 3.0.0-alpha16 (GH-25942)Christian Heimes2021-05-061-44/+11
| | | Also use new make target to install FIPS provider.
* bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)Petr Viktorin2021-04-292-111/+485
|
* bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624)Christian Heimes2021-04-261-5/+9
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-38820: Test with OpenSSL 3.0.0-alpha15 (GH-25537)Christian Heimes2021-04-231-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-38605: Revert making 'from __future__ import annotations' the default ↵Pablo Galindo2021-04-212-2/+2
| | | | | | (GH-25490) This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it.