| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
(#106449) (#106452)
Revert the two commits that introduced the regressions:
- gh-104152
- gh-104507
(cherry picked from commit 9d1d4f9c73a71192b22ab52a2eb9278737f98ddb)
|
|
|
|
|
|
|
| |
(GH-104798) (#105135)
(cherry picked from commit afa759fb800be416f69e3e9c9b3efe68006316f5)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-106407) (#106409)
Added new test class PermutationTests()
(cherry picked from commit 8f6df5e9cbc3a1689601714192aa6ecbb23e1927)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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)
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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-105147)
(cherry picked from commit ed86e14b1672f32f0a31d72070e93d361ee0e2b4)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
(#104696)
|
|
|
|
|
|
|
| |
Annotate methods of the following classes:
- class Function
- class Parameter
- class LandMine
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
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>
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
| |
`str.removesuffix` (#104685)
Both methods were new in Python 3.9.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
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+.
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
| |
Remove 'in_classes' and 'so_far' from DSLParser.directive_module()
|
|
|
|
|
| |
Introduce TypeSet, and use it to annotate the 'accept' keyword of
various C converters. Also add some missing return annotations for
converter init functions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Check if any clinic output actually changes any of the output files
before deciding if we should touch the source file.
|
|
|
|
| |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
* 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-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.
|
|
|
|
|
|
|
|
|
| |
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]*/
|
| |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Replaces our built-in SHA3 implementation with a verified one from the HACL* project.
This implementation is used when OpenSSL does not provide SHA3 or is not present.
3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project.
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
| |
name (#104200)
|
| |
|
| |
|
| |
|
| |
|