summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-91054: make code watcher tests resilient to other watchers ↵Miss Islington (bot)2023-08-111-0/+1
| | | | | | | | (GH-107821) (#107835) gh-91054: make code watcher tests resilient to other watchers (GH-107821) (cherry picked from commit 2ec16fed14aae896e38dd5bd9e73e2eddc974439) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849)Miss Islington (bot)2023-08-111-4/+4
| | | | | | Fix the long64 reader in umarshal.py (GH-107828) (cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f) Co-authored-by: Martin DeMello <martindemello@gmail.com>
* [3.12] gh-106263: Fix segfault in `signaldict_repr` in `_decimal` module ↵Charlie Zhao2023-07-311-0/+1
| | | | | | | (#… (#107491) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> (cherry picked from commit 3979150a0d406707f6d253d7c15fb32c1e005a77)
* [3.12] gh-104629: Build _testclinic extension module on Windows (GH-104723) ↵Miss Islington (bot)2023-07-281-1/+1
| | | | | | | (#107393) (cherry picked from commit 3a1d819ebc36189e086198212822c9b29384f242) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] gh-101524: Only Use Public C-API in the _xxsubinterpreters Module ↵Miss Islington (bot)2023-07-271-0/+1
| | | | | | | | (gh-105258) (gh-107303) The _xxsubinterpreters module was meant to only use public API. Some internal C-API usage snuck in over the last few years (e.g. gh-28969). This fixes that. (cherry picked from commit e6373c0d8b59512aa7f0dea7f3fb162b6ed10fa4) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] Docs: Argument Clinic: Restructure "Basic concepts and usage" ↵Miss Islington (bot)2023-07-271-7/+13
| | | | | | | | | | | | | | | | | | | (GH-106981) (#107325) Split "Basic concepts and usage" into: - Reference - Terminology - CLI reference - Background - Basic concepts (cherry picked from commit 2ad699002e3ce09e9fa41e333ac72f16a32d94de) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* [3.12] gh-106970: Fix Argument Clinic 'destination <name> clear' command ↵Miss Islington (bot)2023-07-221-8/+8
| | | | | | | | | | | | | | | (GH-106972) (#106983) Add test for the 'destination <name> clear' command, and the 'destination' directive in general. Fix two bugs in 'destination <name> clear' command: 1. The text attribute of the allocator is called 'text', not '_text' 2. Return after processing the 'clear' command, instead of proceeding directly to the fail(). (cherry picked from commit 3372bcba9893030e4063a9264ec0b4d1b6166883) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] gh-101538: Add experimental wasi-threads build (GH-101537) (#106834)Miss Islington (bot)2023-07-171-1/+7
| | | | | | | (cherry picked from commit d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9) Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com> Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* wasm: do not use inline comment in .editorconfig (GH-106610)Miss Islington (bot)2023-07-161-1/+2
| | | | | | | It is no longer valid since 0.15.0 https://github.com/editorconfig/specification/blob/v0.15/index.rstGH-no-inline-comments (cherry picked from commit 64c0890b697783db9b3f67e3bb4dcee1165a0b9b) Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* [3.12] gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original ↵Miss Islington (bot)2023-07-121-1/+1
| | | | | | | | | | | | | | source directory (GH-103213) (#106667) gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (GH-103213) Fetch CONFIG_ARGS from the original source directory, instead of from the copied source tree. When "make clean" is executed in the copied source tree, the build directory is cleared and the configure argument lookup fails. However, the original source directory still contains this information. (cherry picked from commit de827322ca47e51d52ff44536a7c3fd44648383a) Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
* [3.12] gh-64595: Fix regression in file write logic in Argument Clinic ↵Erlend E. Aasland2023-07-051-23/+12
| | | | | | | | | | (#106449) (#106452) Revert the two commits that introduced the regressions: - gh-104152 - gh-104507 (cherry picked from commit 9d1d4f9c73a71192b22ab52a2eb9278737f98ddb)
* [3.12] gh-100238: Use setuptools in peg-generator and reenable tests ↵Miss Islington (bot)2023-07-051-7/+47
| | | | | | | (GH-104798) (#105135) (cherry picked from commit afa759fb800be416f69e3e9c9b3efe68006316f5) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.12] gh-106368: Add tests for permutation helpers in Argument Clinic ↵Miss Islington (bot)2023-07-041-2/+2
| | | | | | | | (GH-106407) (#106409) Added new test class PermutationTests() (cherry picked from commit 8f6df5e9cbc3a1689601714192aa6ecbb23e1927) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] gh-106359: Fix corner case bugs in Argument Clinic converter parser ↵Miss Islington (bot)2023-07-031-7/+9
| | | | | | | | | | | | (GH-106361) (#106364) gh-106359: Fix corner case bugs in Argument Clinic converter parser (GH-106361) DSLParser.parse_converter() could return unusable kwdicts in some rare cases (cherry picked from commit 0da4c883cf4185efe27b711c3e0a1e6e94397610) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Fix c-analyzer for GCC: ignore LANG env var (GH-106173) (#106178)Miss Islington (bot)2023-06-281-1/+7
| | | | | | | | | Fix c-analyzer for GCC: ignore LANG env var (GH-106173) The c-analyzer doesn't support GCC localized messages, so just unset the LANG environment variable. (cherry picked from commit 1f74b9e933d546a015e8497e3b8728357196acc8) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-105699: Use a Thread-Local Variable for PKGCONTEXT (gh-105740) ↵Miss Islington (bot)2023-06-143-1/+9
| | | | | | | | (gh-105765) This fixes a race during import. The existing _PyRuntimeState.imports.pkgcontext is shared between interpreters, and occasionally this would cause a crash when multiple interpreters were importing extensions modules at the same time. To solve this we add a thread-local variable for the value. We also leave the existing state (and infrequent race) in place for platforms that do not support thread-local variables. (cherry picked from commit b87d2882754a7c273e2695c33384383eba380d7d) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-104812: Run Pending Calls in any Thread (gh-104813) (gh-105752)Eric Snow2023-06-141-0/+1
| | | | For a while now, pending calls only run in the main thread (in the main interpreter). This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run. (cherry picked from commit 757b402)
* [3.12] gh-98040: Fix importbench: use types.ModuleType() (GH-105743) (#105754)Miss Islington (bot)2023-06-131-1/+2
| | | | | | | | gh-98040: Fix importbench: use types.ModuleType() (GH-105743) Replace removed imp.new_module(name) with types.ModuleType(name). (cherry picked from commit 457a459c7804950d4c27a243b176eb933ec87a06) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) ↵Victor Stinner2023-06-061-4/+4
| | | | | | | | | | | | | | | | | | | (#105371) * gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c (cherry picked from commit bae415ad02c79cf3a2eec4aa6969221a12e6716f) * gh-102304: Fix up Simple ABI doc (GH-105351) (cherry picked from commit 0202aa002e06acef9aa55ace0d939103df19cadd)
* [3.12] gh-104614: Make Sure ob_type is Always Set Correctly by ↵Miss Islington (bot)2023-06-011-0/+2
| | | | | | | | | | PyType_Ready() (gh-105122) (gh-105211) When I added the relevant condition to type_ready_set_bases() in gh-103912, I had missed that the function also sets tp_base and ob_type (if necessary). That led to problems for third-party static types. We fix that here, by making those extra operations distinct and by adjusting the condition to be more specific. (cherry picked from commit 1469393) Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
* [3.12] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) ↵Miss Islington (bot)2023-06-012-2/+4
| | | | | | | | | | | | | | | | | | | | (#105199) gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) Upgrade builds to OpenSSL 1.1.1u. This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t. The Mac/BuildScript/build-installer.py was already updated. Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9, and adds a new _ssl_data_31.h file from 3.1.1 along with the ssl.c code to use it. Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting). backports of this prior to 3.12 will not include the openssl 3.1 header. (cherry picked from commit ede89af605b1c0442353435ad22195c16274f65d) Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* gh-105146: Update links at end of Windows installer (uninstall/repair) ↵Miss Islington (bot)2023-05-311-3/+3
| | | | | | | (GH-105147) (cherry picked from commit ed86e14b1672f32f0a31d72070e93d361ee0e2b4) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-105091: stable_abi.py: Remove "Unixy" check from --all on other ↵Miss Islington (bot)2023-05-311-1/+2
| | | | | | | | platforms (GH-105092) (GH-105133) gh-105091: stable_abi.py: Remove "Unixy" check from --all on other platforms (GH-105092) (cherry picked from commit 0656d23d82cd5b88e578a26c65dd4a64414c833b) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Improves the Windows MSI test run on PR (GH-104929)Miss Islington (bot)2023-05-251-34/+24
| | | | | | | Correctly set the exit code when builds fail Also build docs as part of the test (cherry picked from commit 569b2b8d612354062b8679d2d3f44f7ee03e66c2) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-104683: clinic.py: Modernise `parse_converter()` using pattern-matching ↵Alex Waygood2023-05-211-15/+19
| | | | (#104696)
* gh-104050: Add more type annotations to Argument Clinic (#104631)Erlend E. Aasland2023-05-211-23/+44
| | | | | | | Annotate methods of the following classes: - class Function - class Parameter - class LandMine
* gh-104050: Add basic type hints to Argument Clinic clinic class (#104705)Erlend E. Aasland2023-05-211-17/+38
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104050: Annotate Argument Clinic return converters (#104706)Erlend E. Aasland2023-05-211-30/+75
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-103295: expose API for writing perf map files (#103546)gsallam2023-05-211-0/+1
| | | | | 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-104050: Add basic type hints to Argument Clinic DSL parser (#104704)Erlend E. Aasland2023-05-201-21/+40
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104683: Modernise Tools/clinic/ (#104684)Alex Waygood2023-05-202-27/+31
| | | | | | | - Make some string interpolations more readable using f-strings or explicit parametrisation - Remove unneeded open() mode specifiers Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-104683: Modernise `clinic.py` using `str.removeprefix` and ↵Alex Waygood2023-05-201-5/+5
| | | | | `str.removesuffix` (#104685) Both methods were new in Python 3.9.
* gh-104146: Purge dead code from Argument Clinic (#104680)Erlend E. Aasland2023-05-201-10/+1
| | | | | | | | | | | | | | The following local variables were assigned but never used: - line 551: result - line 1341: groups - line 1431: default_return_converter - line 1529: ignore_self - line 1809: input_checksum - line 4224: new' --- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104683: Argument clinic: use `dict` over `OrderedDict` (#104647)Alex Waygood2023-05-201-25/+23
| | | For code readability. Instances of `builtins.dict` have been ordered since 3.6, and have been guaranteed by the language to be ordered since Python 3.7. Argument Clinic now requires Python 3.10+.
* gh-104050: Add more type annotations to Argument Clinic (#104628)Erlend E. Aasland2023-05-181-14/+39
| | | | | | | | | | Annotate the following: - methods of class Class - methods of class Module - methods of class PythonParser - function compute_checksum() - function parse_file() - global variable unsupported_special_methods
* gh-104549: Set __module__ on TypeAliasType (#104550)Jelle Zijlstra2023-05-181-0/+1
|
* gh-104050: Improve some typing around `default`s and sentinel values (#104626)Alex Waygood2023-05-181-18/+23
| | | | | | | | | | | - Convert `unspecified` and `unknown` to be members of a `Sentinels` enum, rather than instances of bespoke classes. - An enum feels more idiomatic here, and works better with type checkers. - Convert some `==` and `!=` checks for these values to identity checks, which are more idiomatic with sentinels. - _Don't_ do the same for `Null`, as this needs to be a distinct type due to its usage in `clinic.py`. - Use `object` as the annotation for `default` across `clinic.py`. `default` can be literally any object, so `object` is the correct annotation here. --- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-104146: Remove unused vars from Argument Clinic (#104627)Erlend E. Aasland2023-05-181-2/+0
| | | Remove 'in_classes' and 'so_far' from DSLParser.directive_module()
* gh-104050: Add type hints to Argument Clinic converter keywords (#104588)Erlend E. Aasland2023-05-171-12/+36
| | | | | Introduce TypeSet, and use it to annotate the 'accept' keyword of various C converters. Also add some missing return annotations for converter init functions.
* gh-104050: Add typing to Argument Clinic converters (#104547)Erlend E. Aasland2023-05-161-53/+57
|
* GH-103092: isolate `pyexpat` (#104506)Kumar Aditya2023-05-161-1/+0
|
* gh-104050: Add more annotations to `Tools/clinic.py` (#104544)Nikita Sobolev2023-05-163-30/+60
|
* gh-104050: Don't star-import 'types' in Argument Clinic (#104543)Erlend E. Aasland2023-05-161-3/+2
|
* gh-104050: Add basic typing to CConverter in clinic.py (#104538)Erlend E. Aasland2023-05-161-14/+14
|
* gh-64595: Fix write file logic in Argument Clinic (#104507)Erlend E. Aasland2023-05-161-11/+12
| | | | Check if any clinic output actually changes any of the output files before deciding if we should touch the source file.
* gh-101819: Isolate `_io` (#101948)Erlend E. Aasland2023-05-151-4/+0
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (#104501)dependabot[bot]2023-05-151-1/+1
| | | | | | | | | | | | | | | | build(deps-dev): bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic Bumps [mypy](https://github.com/python/mypy) from 1.2.0 to 1.3.0. - [Commits](https://github.com/python/mypy/compare/v1.2.0...v1.3.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-104050: Run mypy on `clinic.py` in CI (#104421)Alex Waygood2023-05-154-24/+55
| | | | | | | | | | * Add basic mypy workflow to CI * Make the type check pass --------- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵Mark Shannon2023-05-121-1/+1
| | | | | | | | (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-104389: Add 'unused' keyword to Argument Clinic C converters (#104390)Erlend E. Aasland2023-05-121-1/+19
| | | | | | | | | Use the unused keyword param in the converter to explicitly mark an argument as unused: /*[clinic input] SomeBaseClass.stubmethod flag: bool(unused=True) [clinic start generated code]*/