summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-104340: Suppress warning about unawaited exception for closed pipe stdin ↵Guido van Rossum2023-05-172-0/+4
| | | | (#104586)
* gh-104555: Runtime-checkable protocols: Don't let previous calls to ↵Alex Waygood2023-05-173-7/+96
| | | | | `isinstance()` influence whether `issubclass()` raises an exception (#104559) Co-authored-by: Carl Meyer <carl@oddbird.net>
* 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-104496: IDLE - fix About for mixed tcl/tk versions (#104585)Terry Jan Reedy2023-05-174-23/+22
| | | Print both if they are different, as may happen in the future.
* gh-104372: Cleanup _posixsubprocess `make_inheritable` for async signal ↵Gregory P. Smith2023-05-172-34/+92
| | | | | | | | | | safety and no GIL requirement (#104518) Move all of the Python C API calls into the parent process up front instead of doing PyLong_AsLong and PyErr_Occurred and PyTuple_GET from the post-fork/vfork child process. Much of this was long overdue. We shouldn't have been using PyTuple and PyLong APIs within all of these low level functions anyways.
* GH-101520: Move tracemalloc functionality into core, leaving interface in ↵Mark Shannon2023-05-1711-1545/+1621
| | | | Modules. (#104508)
* typing: Add more tests for TypeVar (#104571)Jelle Zijlstra2023-05-173-8/+50
| | | | | | | | During the PEP 695 implementation at one point I made TypeVar.__name__ return garbage, and all of test_typing passed. So I decided to add a few more tests. In the process I discovered a minor incompatibility from the C implementation of TypeVar: empty constraints were returned as None instead of an empty tuple.
* gh-104572: Improve error messages for invalid constructs in PEP 695 contexts ↵Jelle Zijlstra2023-05-173-4/+68
| | | | (#104573)
* typing: Use PEP 695 syntax in typing.py (#104553)Jelle Zijlstra2023-05-171-11/+17
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102153: Start stripping C0 control and space chars in `urlsplit` (#102508)Illia Volochii2023-05-174-3/+119
| | | | | | | | | `urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit #25595. This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/#url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329). --------- Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* gh-104469: Update README.txt for _testcapi (gh-104529)Dong-hee Na2023-05-171-0/+7
| | | | | | * gh-104469: Update README.txt for _testcapi Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* GH-103092: isolate `_elementtree` (#104561)Kumar Aditya2023-05-161-43/+42
|
* gh-104050: Add typing to Argument Clinic converters (#104547)Erlend E. Aasland2023-05-161-53/+57
|
* GH-103906: Remove immortal refcounting in the interpreter (GH-103909)Brandt Bucher2023-05-164-516/+476
|
* gh-87474: Fix file descriptor leaks in subprocess.Popen (#96351)cptpcrd2023-05-162-130/+164
| | | | | | | This fixes several ways file descriptors could be leaked from `subprocess.Popen` constructor during error conditions by opening them later and using a context manager "fds to close" registration scheme to ensure they get closed before returning. --------- Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* GH-103092: isolate `pyexpat` (#104506)Kumar Aditya2023-05-162-9/+21
|
* gh-75367: Fix data descriptor detection in inspect.getattr_static (#104517)Furkan Onder2023-05-163-2/+8
| | | Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-104050: Add more annotations to `Tools/clinic.py` (#104544)Nikita Sobolev2023-05-163-30/+60
|
* gh-104555: Fix isinstance() and issubclass() for runtime-checkable protocols ↵Alex Waygood2023-05-162-1/+19
| | | | | that use PEP 695 (#104556) Fixes #104555
* gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866)Carl Meyer2023-05-1610-236/+535
|
* CODEOWNERS: Assign new PEP 695 files to myself (#104551)Jelle Zijlstra2023-05-161-0/+2
|
* GH-104510: Fix refleaks in `_io` base types (#104516)Kumar Aditya2023-05-163-26/+6
|
* gh-104539: Fix indentation error in logging.config.rst (#104545)Jesper Noordsij2023-05-161-1/+1
| | | Fix indentation error in logging.config.rst
* 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-104523: Inline minimal PGO rules (#104524)Gregory Szorc2023-05-161-16/+4
| | | Inline profiling rules where the existing indirection was unneeded.
* gh-103861: Fix Zip64 extensions not being properly applied in some cases ↵Carey Metcalfe2023-05-163-15/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#103863) Fix Zip64 extensions not being properly applied in some cases: Fixes an issue where adding a small file to a `ZipFile` object while forcing zip64 extensions causes an extra Zip64 record to be added to the zip, but doesn't update the `min_version` or file sizes in the primary central directory header. Also fixed an edge case in checking if zip64 extensions are required: This fixes an issue where if data requiring zip64 extensions was added to an unseekable stream without specifying `force_zip64=True`, zip64 extensions would not be used and a RuntimeError would not be raised when closing the file (even though the size would be known at that point). This would result in successfully writing corrupt zip files. Deciding if zip64 extensions are required outside of the `FileHeader` function means that both `FileHeader` and `_ZipWriteFile` will always be in sync. Previously, the `FileHeader` function could enable zip64 extensions without propagating that decision to the `_ZipWriteFile` class, which would then not correctly write the data descriptor record or check for errors on close. If anyone is actually using `ZipInfo.FileHeader` as a public API without explicitly passing True or False in for zip64, their own code may still be susceptible to that kind of bug unless they make a similar change to where the zip64 decision happens. Fixes #103861 --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-69152: add method get_proxy_response_headers to HTTPConnection class ↵Alexey Namyotkin2023-05-164-12/+44
| | | | | | | | | | (#104248) Add http.client.HTTPConnection method get_proxy_response_headers() - this is a followup to https://github.com/python/cpython/pull/26152 which added it as a non-public attribute. This way we don't pre-compute a headers dictionary that most users will never access. The new method is properly public and documented and triggers full proxy header parsing into a dict only when actually called. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-103763: Implement PEP 695 (#103764)Jelle Zijlstra2023-05-1656-3148/+9084
| | | | | | | | | | | | | | 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-104461: Run tkinter test_configure_screen on X11 only (GH-104462)Christopher Chavez2023-05-162-0/+5
|
* gh-104469: Convert _testcapi/watchers.c to use Argument Clinic (#104503)Nikita Sobolev2023-05-152-43/+259
| | | | | | | | | | Remove boilerplate code by converting the following functions: - _testcapi.watch_dict - _testcapi.unwatch_dict - _testcapi.watch_type - _testcapi.unwatch_type - _testcapi.set_func_defaults_via_capi - _testcapi.set_func_kwdefaults_via_capi
* gh-104482: Fix error handling bugs in ast.c (#104483)Irit Katriel2023-05-154-19/+45
|
* gh-104341: Adjust tstate_must_exit() to Respect Interpreter Finalization ↵Eric Snow2023-05-1511-10/+56
| | | | | (gh-104437) With the move to a per-interpreter GIL, this check slipped through the cracks.
* GH-102613: Fix recursion error from `pathlib.Path.glob()` (GH-104373)Barney Gale2023-05-153-20/+18
| | | | Use `Path.walk()` to implement the recursive wildcard `**`. This method uses an iterative (rather than recursive) walk - see GH-100282.
* gh-101819: Fix _io clinic input for unused base class method stubs (#104418)Erlend E. Aasland2023-05-156-109/+168
| | | | | | When preparing the _io extension module for isolation, many methods were adapted to Argument Clinic. Some of these used the '*args: object' signature, which is incorrect. These are now corrected to an exact signature, and marked unused, since they are stub methods.
* gh-101819: Isolate `_io` (#101948)Erlend E. Aasland2023-05-1513-362/+205
| | | | 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-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (#104495)Christopher Chavez2023-05-152-4/+8
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-104050: Run mypy on `clinic.py` in CI (#104421)Alex Waygood2023-05-156-24/+101
| | | | | | | | | | * 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-104490: Consistently define phony make targets (#104491)Gregory Szorc2023-05-152-20/+78
| | | | | | | | | | | | By convention make targets that don't refer to a file have a dependency on the fake .PHONY target/file. This ensures that these targets are always evaluated because there is no rule to create a .PHONY file and that will force make to think the rule is out of date and needs to be rebuilt. This commit consistently associates virtual targets with .PHONY by declaring the .PHONY dependency immediately above the make rule. This should avoid race conditions and avoidable rebuilds across multiple make invocations.
* gh-67056: document that registering/unregistering an atexit func from within ↵Irit Katriel2023-05-152-0/+5
| | | | an atexit func is undefined (#104473)
* gh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (#104488)Erlend E. Aasland2023-05-154-2/+5
| | | Also include Python 3.12 in the list of accepted versions.
* gh-101282: move BOLT config after PGO (gh-104493)Gregory Szorc2023-05-152-242/+242
|
* gh-104469 Convert _testcapi/float.c to use AC (gh-104470)Dong-hee Na2023-05-152-19/+123
|
* gh-104456: Fix ref leak in _ctypes.COMError (#104457)Kirill Podoprigora2023-05-141-1/+9
|
* gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (#104474)Sam Bull2023-05-141-1/+2
|
* gh-104337: Clarify random.gammavariate doc entry (#104410)Terry Jan Reedy2023-05-141-3/+6
| | | | | * gh-104337: Clarify random.gammavariate doc entry * Fix parameter markup.
* Minor improvements to typing docs (#104465)Jelle Zijlstra2023-05-141-4/+6
|
* gh-87092: avoid gcc warning on uninitialized struct field in assemble.c ↵Dong-hee Na2023-05-141-1/+2
| | | | (#104460)