]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-103092: Isolate `_collections` (#103093)
Erlend E. Aasland [Wed, 12 Apr 2023 12:51:28 +0000 (14:51 +0200)] 
gh-103092: Isolate `_collections` (#103093)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years agoGH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083)
Mark Shannon [Wed, 12 Apr 2023 11:04:55 +0000 (12:04 +0100)] 
GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083)

* The majority of the monitoring code is in instrumentation.c

* The new instrumentation bytecodes are in bytecodes.c

* legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs

2 years agogh-103092: Isolate msvcrt (#103248)
AN Long [Wed, 12 Apr 2023 10:41:21 +0000 (18:41 +0800)] 
gh-103092: Isolate msvcrt (#103248)

2 years agogh-103417: use time.monotonic in the example for sched.scheduler (#103418)
Nick Burns [Wed, 12 Apr 2023 08:59:21 +0000 (01:59 -0700)] 
gh-103417: use time.monotonic in the example for sched.scheduler (#103418)

2 years agoGH-83893: Cross reference env. vars and -X command line options (GH-103414)
Furkan Onder [Wed, 12 Apr 2023 08:44:35 +0000 (11:44 +0300)] 
GH-83893: Cross reference env. vars and -X command line options (GH-103414)

Co-authored-by: Erlend E. Aasland
2 years agogh-103357: Add logging.Formatter defaults support to logging.config fileConfig and...
Bar Harel [Wed, 12 Apr 2023 07:35:56 +0000 (08:35 +0100)] 
gh-103357: Add logging.Formatter defaults support to logging.config fileConfig and dictConfig (GH-103359)

2 years agogh-103237: Polish pdb docs (#103238)
Tian Gao [Wed, 12 Apr 2023 06:18:34 +0000 (23:18 -0700)] 
gh-103237: Polish pdb docs (#103238)

2 years agogh-103143: Polish pdb help messages and doc strings (GH-103144)
Tian Gao [Tue, 11 Apr 2023 22:40:30 +0000 (15:40 -0700)] 
gh-103143: Polish pdb help messages and doc strings  (GH-103144)

* Made all the command part of the docstring match the official documentation
* Always have a space between the command and the description in docstring
* Added a helper function to format the help message

Before:

```
(Pdb) h a
a(rgs)
        Print the argument list of the current function.
(Pdb) h commands
commands [bpnumber]
        (com) ...
        (com) end
        (Pdb)
        ...
(Pdb) h interact
interact

        Start an interactive interpreter whose global namespace
        contains all the (global and local) names found in the current scope.
```

After
```
(Pdb) h a
      Usage: a(rgs)

      Print the argument list of the current function.
(Pdb) h commands
      Usage: (Pdb) commands [bpnumber]
             (com) ...
             (com) end
             (Pdb)
             ...
(Pdb) h interact
      Usage: interact

      Start an interactive interpreter whose global namespace
      contains all the (global and local) names found in the current scope.
```

Automerge-Triggered-By: GH:brandtbucher
2 years agoRemove redundant words from interpreter_definition.md. (GH-103455)
Benjamin Peterson [Tue, 11 Apr 2023 20:30:05 +0000 (15:30 -0500)] 
Remove redundant words from interpreter_definition.md. (GH-103455)

2 years agogh-87092: fix refleak in peepholer test harness (#103448)
Irit Katriel [Tue, 11 Apr 2023 20:08:29 +0000 (21:08 +0100)] 
gh-87092: fix refleak in peepholer test harness (#103448)

2 years agogh-103088: Sanitize venv paths when using MSYS or Cygwin Bash (GH-103325)
Stanislav Syekirin [Tue, 11 Apr 2023 19:20:46 +0000 (21:20 +0200)] 
gh-103088: Sanitize venv paths when using MSYS or Cygwin Bash (GH-103325)

2 years agoGH-103220: Fix `ntpath.join()` of partial UNC drive with trailing slash (GH-103221)
Barney Gale [Tue, 11 Apr 2023 16:26:45 +0000 (17:26 +0100)] 
GH-103220: Fix `ntpath.join()` of partial UNC drive with trailing slash (GH-103221)

2 years agogh-87864: Use correct function definition syntax in the docs (#103312)
Nikita Sobolev [Tue, 11 Apr 2023 13:50:25 +0000 (16:50 +0300)] 
gh-87864: Use correct function definition syntax in the docs (#103312)

2 years agogh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__...
Irit Katriel [Tue, 11 Apr 2023 10:53:06 +0000 (11:53 +0100)] 
gh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__ (#103402)

2 years agogh-103373: `__mro_entries__` docs: improve cross references (#103398)
Alex Waygood [Tue, 11 Apr 2023 10:25:45 +0000 (11:25 +0100)] 
gh-103373: `__mro_entries__` docs: improve cross references (#103398)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agogh-91276: remove unused _PyOpcode_RelativeJump (#103156)
Irit Katriel [Tue, 11 Apr 2023 10:20:39 +0000 (11:20 +0100)] 
gh-91276: remove unused _PyOpcode_RelativeJump (#103156)

2 years agogh-87092: move assembler related code from compile.c to assemble.c (#103277)
Irit Katriel [Tue, 11 Apr 2023 10:15:09 +0000 (11:15 +0100)] 
gh-87092: move assembler related code from compile.c to assemble.c (#103277)

2 years agogh-103176: sys._current_exceptions() returns mapping to exception instances instead...
Irit Katriel [Tue, 11 Apr 2023 08:38:37 +0000 (09:38 +0100)] 
gh-103176: sys._current_exceptions() returns mapping to exception instances instead of exc_info tuples (#103177)

2 years agogh-102828: set stacklevel on deprecation warning (#103422)
Irit Katriel [Tue, 11 Apr 2023 08:31:39 +0000 (09:31 +0100)] 
gh-102828: set stacklevel on deprecation warning (#103422)

2 years agogh-99553: add tests for ExceptionGroup wrapping (#99615)
Zac Hatfield-Dodds [Tue, 11 Apr 2023 06:44:53 +0000 (23:44 -0700)] 
gh-99553: add tests for ExceptionGroup wrapping (#99615)

2 years agoDocs: don't render files in includes/, they're for embedding only (#103313)
Hugo van Kemenade [Tue, 11 Apr 2023 06:17:34 +0000 (09:17 +0300)] 
Docs: don't render files in includes/, they're for embedding only (#103313)

2 years agoDoc: Avoid error lexing multiprocessing docs code block on Pygments 2.15.0 (#103421)
C.A.M. Gerlach [Tue, 11 Apr 2023 03:57:36 +0000 (22:57 -0500)] 
Doc: Avoid error lexing multiprocessing docs code block on Pygments 2.15.0 (#103421)

2 years agogh-103000: Optimise dataclasses asdict/astuple for common types (#103005)
David Ellis [Mon, 10 Apr 2023 21:50:58 +0000 (22:50 +0100)] 
gh-103000: Optimise dataclasses asdict/astuple for common types (#103005)

Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-103092: Isolate winsound (#103249)
AN Long [Mon, 10 Apr 2023 21:01:05 +0000 (05:01 +0800)] 
gh-103092: Isolate winsound (#103249)

2 years agogh-83004: Harden winreg init (#103386)
Erlend E. Aasland [Mon, 10 Apr 2023 20:58:25 +0000 (22:58 +0200)] 
gh-83004: Harden winreg init (#103386)

2 years agogh-83004: Harden `msvcrt` init (#103383)
Erlend E. Aasland [Mon, 10 Apr 2023 17:09:33 +0000 (19:09 +0200)] 
gh-83004: Harden `msvcrt` init (#103383)

2 years agogh-103059: Clarify gc.freeze documentation (#103058)
raylu [Mon, 10 Apr 2023 16:30:32 +0000 (09:30 -0700)] 
gh-103059: Clarify gc.freeze documentation (#103058)

2 years agogh-103334: Ignore `Tools/c-analyzer/cpython/_parser.py` from `patchcheck` (GH-103335)
Nikita Sobolev [Mon, 10 Apr 2023 14:58:48 +0000 (17:58 +0300)] 
gh-103334: Ignore `Tools/c-analyzer/cpython/_parser.py` from `patchcheck` (GH-103335)

I've also added a small comment to `Tools/c-analyzer/cpython/_parser.py` to trigger the `patchcheck` CI. It must pass now.

Automerge-Triggered-By: GH:ericsnowcurrently
2 years agogh-97797: Mention `__metadata__` in docstrings of `typing.{_AnnotatedAlias, Annotated...
Nikita Sobolev [Mon, 10 Apr 2023 14:57:17 +0000 (17:57 +0300)] 
gh-97797: Mention `__metadata__` in docstrings of `typing.{_AnnotatedAlias, Annotated}` (#103405)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Kirill <80244920+Eclips4@users.noreply.github.com>
2 years agogh-103395: Improve `typing._GenericAlias.__dir__` coverage (#103396)
Nikita Sobolev [Mon, 10 Apr 2023 11:09:19 +0000 (14:09 +0300)] 
gh-103395: Improve `typing._GenericAlias.__dir__` coverage (#103396)

2 years agoFix old behaviour in typing documentation (#103400)
James Hilton-Balfe [Sun, 9 Apr 2023 21:55:32 +0000 (22:55 +0100)] 
Fix old behaviour in typing documentation (#103400)

2 years agogh-83004: Harden winsound init (#103385)
Erlend E. Aasland [Sun, 9 Apr 2023 20:00:22 +0000 (22:00 +0200)] 
gh-83004: Harden winsound init (#103385)

2 years agoItertool recipe improvements (GH-103399)
Raymond Hettinger [Sun, 9 Apr 2023 19:17:37 +0000 (14:17 -0500)] 
Itertool recipe improvements (GH-103399)

2 years agoGH-101362: Omit path anchor from `pathlib.PurePath()._parts` (GH-102476)
Barney Gale [Sun, 9 Apr 2023 17:40:03 +0000 (18:40 +0100)] 
GH-101362: Omit path anchor from `pathlib.PurePath()._parts` (GH-102476)

Improve performance of path construction by skipping the addition of the path anchor (`drive + root`) to the internal `_parts` list. Rename this attribute to `_tail` for clarity.

2 years agoGH-103379: Fix up old tests for `pathlib.PurePath._parse_path` (GH-103380)
Barney Gale [Sun, 9 Apr 2023 15:48:45 +0000 (16:48 +0100)] 
GH-103379: Fix up old tests for `pathlib.PurePath._parse_path` (GH-103380)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years agoGh-68586: use run_python_until_end in test_capi (GH-102729) 30216/head
Furkan Onder [Sun, 9 Apr 2023 08:44:49 +0000 (11:44 +0300)] 
Gh-68586: use run_python_until_end in test_capi (GH-102729)

Co-authored-by: Aidin Gharibnavaz
Automerge-Triggered-By: GH:kumaraditya303
2 years agoRemove useless symbol in pystats.h (#101864)
Stepfen Shawn [Sun, 9 Apr 2023 08:43:21 +0000 (16:43 +0800)] 
Remove useless symbol in pystats.h (#101864)

2 years agoctypes docs: fix missing `not` in variadic functions section (#102611)
mara004 [Sun, 9 Apr 2023 08:26:52 +0000 (10:26 +0200)] 
ctypes docs: fix missing `not` in variadic functions section (#102611)

2 years agogh-103300: Fix `Popen.wait()` deadlock in patchcheck.py (#103301)
Oleg Iarygin [Sun, 9 Apr 2023 08:18:53 +0000 (12:18 +0400)] 
gh-103300: Fix `Popen.wait()` deadlock in patchcheck.py (#103301)

2 years agoFix typos in test_tempfile.py (#102841)
JakobDev [Sun, 9 Apr 2023 08:13:40 +0000 (10:13 +0200)] 
Fix typos in test_tempfile.py (#102841)

2 years agobuild(deps): bump actions/stale from 7 to 8 (#103169)
dependabot[bot] [Sun, 9 Apr 2023 08:12:43 +0000 (13:42 +0530)] 
build(deps): bump actions/stale from 7 to 8 (#103169)

Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoAdd hugovk as a .github code owner (GH-103394)
Hugo van Kemenade [Sun, 9 Apr 2023 07:43:01 +0000 (10:43 +0300)] 
Add hugovk as a .github code owner (GH-103394)

Automerge-Triggered-By: GH:hugovk
2 years agoCI: Do not allow merge if labelled DO-NOT-MERGE (#103337)
Hugo van Kemenade [Sun, 9 Apr 2023 06:39:03 +0000 (09:39 +0300)] 
CI: Do not allow merge if labelled DO-NOT-MERGE (#103337)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agogh-102799: use `sys.exception()` instead of `sys.exc_info()` in pdb (#103294)
Irit Katriel [Sun, 9 Apr 2023 02:05:50 +0000 (03:05 +0100)] 
gh-102799: use `sys.exception()` instead of `sys.exc_info()` in pdb (#103294)

2 years agoDocs: Fix broken reference `__getitem__` in `string.rst` (#103371)
yuki [Sun, 9 Apr 2023 02:02:16 +0000 (11:02 +0900)] 
Docs: Fix broken reference `__getitem__` in `string.rst` (#103371)

2 years agoDocument `asyncio` performance improvement in What's New (#103370)
Kumar Aditya [Sun, 9 Apr 2023 01:59:08 +0000 (07:29 +0530)] 
Document `asyncio` performance improvement in What's New  (#103370)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-103092: Isolate `socket` module (#103094)
Erlend E. Aasland [Sun, 9 Apr 2023 01:03:52 +0000 (03:03 +0200)] 
gh-103092: Isolate `socket` module (#103094)

2 years agogh-103242: Migrate SSLContext.set_ecdh_curve not to use deprecated APIs (#103378)
Dong-hee Na [Sat, 8 Apr 2023 17:56:42 +0000 (02:56 +0900)] 
gh-103242: Migrate SSLContext.set_ecdh_curve not to use deprecated APIs (#103378)

Migrate `SSLContext.set_ecdh_curve()` not to use deprecated OpenSSL APIs.

2 years agogh-103373: Improve documentation for `__mro_entries__` (#103374)
Alex Waygood [Sat, 8 Apr 2023 14:09:00 +0000 (15:09 +0100)] 
gh-103373: Improve documentation for `__mro_entries__` (#103374)

2 years agogh-100176: Tools/iobench: Remove redundant compat code for Python <= 3.2 (#100197)
Hugo van Kemenade [Sat, 8 Apr 2023 09:04:47 +0000 (12:04 +0300)] 
gh-100176: Tools/iobench: Remove redundant compat code for Python <= 3.2 (#100197)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-100574: add examples/links to the `strptime`/`strftime` docs (#100575)
Ezio Melotti [Sat, 8 Apr 2023 08:46:47 +0000 (16:46 +0800)] 
gh-100574: add examples/links to the `strptime`/`strftime` docs (#100575)

2 years agoDocs: use Node.findall to avoid a deprecation warning (#99403)
Adam Turner [Sat, 8 Apr 2023 07:56:20 +0000 (08:56 +0100)] 
Docs: use Node.findall to avoid a deprecation warning (#99403)

2 years agogh-75729: Fix os.spawn tests not handling spaces on Windows (#99150)
C.A.M. Gerlach [Sat, 8 Apr 2023 07:37:23 +0000 (02:37 -0500)] 
gh-75729: Fix os.spawn tests not handling spaces on Windows (#99150)

* Quote paths in os.spawn tests on Windows so they work with spaces

* Add NEWS entry for os spawn test fix

* Fix code style to avoid double negative in os.spawn tests

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
---------

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-102809: Remove gdbinit mention in Misc/README (#103269)
Tomáš Hrnčiar [Sat, 8 Apr 2023 07:04:23 +0000 (09:04 +0200)] 
gh-102809: Remove gdbinit mention in Misc/README (#103269)

2 years agogh-103329: Add regression test for PropertyMock with side effect (#103358)
Russell Keith-Magee [Sat, 8 Apr 2023 02:09:00 +0000 (10:09 +0800)] 
gh-103329: Add regression test for PropertyMock with side effect (#103358)

2 years agogh-83004: Harden _socket init (GH-103261)
Erlend E. Aasland [Fri, 7 Apr 2023 23:43:44 +0000 (01:43 +0200)] 
gh-83004: Harden _socket init (GH-103261)

Automerge-Triggered-By: GH:erlend-aasland
2 years agogh-74690: Document changes made to runtime-checkable protocols in 3.12 (#103348)
Alex Waygood [Fri, 7 Apr 2023 21:06:37 +0000 (22:06 +0100)] 
gh-74690: Document changes made to runtime-checkable protocols in 3.12 (#103348)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-103272: regression test for getattr exception in property (#103336)
sunmy2019 [Fri, 7 Apr 2023 19:11:11 +0000 (03:11 +0800)] 
gh-103272: regression test for getattr exception in property (#103336)

2 years agogh-100220: Fix error handling in make rules (GH-100328)
Michał Górny [Fri, 7 Apr 2023 18:23:59 +0000 (18:23 +0000)] 
gh-100220: Fix error handling in make rules (GH-100328)

Set `SHELL = /bin/sh -e` to ensure that complex recipes fail on the first error rather than incorrectly reporting success.

Co-authored-by: Zachary Ware <zach@python.org>
2 years agogh-103225: Fixed zero lineno issue for pdb (#103265)
Tian Gao [Fri, 7 Apr 2023 17:57:46 +0000 (10:57 -0700)] 
gh-103225: Fixed zero lineno issue for pdb (#103265)

Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2 years agogh-74690: Add more tests for runtime-checkable protocols (#103347)
Alex Waygood [Fri, 7 Apr 2023 17:21:19 +0000 (18:21 +0100)] 
gh-74690: Add more tests for runtime-checkable protocols (#103347)

2 years agogh-103193: Celebrate performance improvements to `inspect.getattr_static` in 'What...
Alex Waygood [Fri, 7 Apr 2023 17:14:50 +0000 (18:14 +0100)] 
gh-103193: Celebrate performance improvements to `inspect.getattr_static` in 'What's New in Python 3.12' (#103349)

2 years agoGH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813)
AN Long [Fri, 7 Apr 2023 11:56:00 +0000 (19:56 +0800)] 
GH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813)

2 years agobpo-46523: fix tests rerun when `setUp[Class|Module]` fails (#30895)
Nikita Sobolev [Fri, 7 Apr 2023 10:43:41 +0000 (13:43 +0300)] 
bpo-46523: fix tests rerun when `setUp[Class|Module]` fails (#30895)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years agogh-102213: Revert "gh-102213: Optimize the performance of `__getattr__` (GH-102248...
Nikita Sobolev [Fri, 7 Apr 2023 09:22:36 +0000 (12:22 +0300)] 
gh-102213: Revert "gh-102213: Optimize the performance of `__getattr__`  (GH-102248)" (GH-103332)

This reverts commit aa0a73d1bc53dcb6348a869df1e775138991e561.

2 years agogh-103256: Fix hmac algorithm to support fallback implementation (gh-103286)
Dong-hee Na [Fri, 7 Apr 2023 01:51:29 +0000 (10:51 +0900)] 
gh-103256: Fix hmac algorithm to support fallback implementation (gh-103286)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agogh-103266: Fix a typo in example code for bisect() function (#103267)
Oleg Iarygin [Fri, 7 Apr 2023 00:34:19 +0000 (04:34 +0400)] 
gh-103266: Fix a typo in example code for bisect() function (#103267)

2 years agogh-93121: fix test_mailbox where some test cases were accidentally dropped (#93242)
AGZain [Thu, 6 Apr 2023 22:19:11 +0000 (18:19 -0400)] 
gh-93121: fix test_mailbox where some test cases were accidentally dropped (#93242)

2 years agoGH-102700: allow built-in modules to be submodules (GH-103162)
Brett Cannon [Thu, 6 Apr 2023 21:19:54 +0000 (14:19 -0700)] 
GH-102700: allow built-in modules to be submodules (GH-103162)

2 years agogh-103193: Speedup and inline `inspect._is_type` (#103321)
Alex Waygood [Thu, 6 Apr 2023 20:49:24 +0000 (21:49 +0100)] 
gh-103193: Speedup and inline `inspect._is_type` (#103321)

Improve performance of `inspect.getattr_static`

2 years agogh-103193: Use LBYL idioms rather than EAFP in `inspect.getattr_static` (#103318)
Alex Waygood [Thu, 6 Apr 2023 19:17:53 +0000 (20:17 +0100)] 
gh-103193: Use LBYL idioms rather than EAFP in `inspect.getattr_static` (#103318)

2 years agogh-103186: assert in tests that UnsafeMailcapInput warnings are provided (#103217)
Ijtaba Hussain [Thu, 6 Apr 2023 18:13:33 +0000 (23:13 +0500)] 
gh-103186: assert in tests that UnsafeMailcapInput warnings are provided (#103217)

2 years agogh-100227: Use an Array for _PyRuntime's Set of Locks During Init (gh-103315)
Eric Snow [Thu, 6 Apr 2023 18:00:49 +0000 (12:00 -0600)] 
gh-100227: Use an Array for _PyRuntime's Set of Locks During Init (gh-103315)

This cleans things up a bit and simplifies adding new granular global locks.

2 years agogh-99202: Fix extension type from documentation for compiling in C++20 mode (#102518)
Jeffrey Newman [Thu, 6 Apr 2023 15:59:36 +0000 (10:59 -0500)] 
gh-99202: Fix extension type from documentation for compiling in C++20 mode  (#102518)

2 years agogh-48330: assert warning is emitted on unittest.TestResult with no addDuration (...
Irit Katriel [Thu, 6 Apr 2023 13:05:23 +0000 (14:05 +0100)] 
gh-48330: assert warning is emitted on unittest.TestResult with no addDuration (#103309)

2 years agogh-102799: use sys.exception() instead of sys.exc_info() in tests (#103293)
Irit Katriel [Thu, 6 Apr 2023 10:08:25 +0000 (11:08 +0100)] 
gh-102799: use sys.exception() instead of sys.exc_info() in tests (#103293)

2 years ago[Enum] unchain exception property.__get__ (GH-103305)
Ethan Furman [Thu, 6 Apr 2023 04:30:11 +0000 (21:30 -0700)] 
[Enum] unchain exception property.__get__ (GH-103305)

2 years agogh-103207: Fix Welcome formatting issues when macOS Installer is run in dark mode...
Ned Deily [Thu, 6 Apr 2023 03:42:14 +0000 (23:42 -0400)] 
gh-103207: Fix Welcome formatting issues when macOS Installer is run in dark mode. (GH-103303)

2 years agogh-101659: Add _Py_AtExit() (gh-103298)
Eric Snow [Thu, 6 Apr 2023 00:42:02 +0000 (18:42 -0600)] 
gh-101659: Add _Py_AtExit() (gh-103298)

The function is like Py_AtExit() but for a single interpreter.  This is a companion to the atexit module's register() function, taking a C callback instead of a Python one.

We also update the _xxinterpchannels module to use _Py_AtExit(), which is the motivating case.  (This is inspired by pain points felt while working on gh-101660.)

2 years agogh-93910: [Enum] remove member.member deprecation (GH-103236)
Ethan Furman [Thu, 6 Apr 2023 00:33:52 +0000 (17:33 -0700)] 
gh-93910: [Enum] remove member.member deprecation (GH-103236)

i.e. Color.RED.BLUE is now officially supported.

2 years agoGH-88691: Shrink the CALL caches (GH-103230)
Brandt Bucher [Wed, 5 Apr 2023 21:15:49 +0000 (14:15 -0700)] 
GH-88691: Shrink the CALL caches (GH-103230)

2 years agogh-101659: Use the Raw Allocator in the _xxinterpchannels Module (gh-103287)
Eric Snow [Wed, 5 Apr 2023 21:13:12 +0000 (15:13 -0600)] 
gh-101659: Use the Raw Allocator in the _xxinterpchannels Module (gh-103287)

Using the raw allocator for any of the global state makes sense, especially as we move to a per-interpreter obmalloc state (gh-101660).

2 years agogh-74690: Further optimise `typing._ProtocolMeta.__instancecheck__` (#103280)
Alex Waygood [Wed, 5 Apr 2023 16:37:36 +0000 (17:37 +0100)] 
gh-74690: Further optimise `typing._ProtocolMeta.__instancecheck__` (#103280)

2 years agogh-99069: Consolidate checks for static_assert (#94766)
Joshua Root [Wed, 5 Apr 2023 15:09:19 +0000 (01:09 +1000)] 
gh-99069: Consolidate checks for static_assert (#94766)

Several platforms don't define the static_assert macro despite having
compiler support for the _Static_assert keyword. The macro needs to be
defined since it is used unconditionally in the Python code. So it
should always be safe to define it if undefined and not in C++11 (or
later) mode.

Hence, remove the checks for particular platforms or libc versions,
and just define static_assert anytime it needs to be defined but isn't.
That way, all platforms that need the fix will get it, regardless of
whether someone specifically thought of them.

Also document that certain macOS versions are among the platforms that
need this.

The C2x draft (currently expected to become C23) makes static_assert
a keyword to match C++. So only define the macro for up to C17.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years agogh-102899: Fix doc link for getting filesystem error handler (#102901)
Olivier Gayot [Wed, 5 Apr 2023 14:54:43 +0000 (16:54 +0200)] 
gh-102899: Fix doc link for getting filesystem error handler (#102901)

2 years agogh-89058: remove skip from test_no_hang_on_context_chain_cycle2 (#102903)
Irit Katriel [Wed, 5 Apr 2023 14:52:38 +0000 (15:52 +0100)] 
gh-89058: remove skip from test_no_hang_on_context_chain_cycle2 (#102903)

2 years agogh-86094: Add support for Unicode Path Extra Field in ZipFile (gh-102566)
Yeojin Kim [Wed, 5 Apr 2023 11:54:48 +0000 (20:54 +0900)] 
gh-86094: Add support for Unicode Path Extra Field in ZipFile (gh-102566)

2 years agogh-100408: Fix a traceback in multiprocessing example (#100409)
Serhiy Storchaka [Wed, 5 Apr 2023 11:43:26 +0000 (14:43 +0300)] 
gh-100408: Fix a traceback in multiprocessing example (#100409)

2 years agogh-74690: typing: Call `_get_protocol_attrs` and `_callable_members_only` at protocol...
Alex Waygood [Wed, 5 Apr 2023 11:19:03 +0000 (12:19 +0100)] 
gh-74690: typing: Call `_get_protocol_attrs` and `_callable_members_only` at protocol class creation time, not during `isinstance()` checks (#103160)

2 years agogh-81762: Clarify and simplify description of print's flush param (#103264)
C.A.M. Gerlach [Wed, 5 Apr 2023 11:16:36 +0000 (06:16 -0500)] 
gh-81762: Clarify and simplify description of print's flush param (#103264)

2 years agogh-74690: typing: Simplify and optimise `_ProtocolMeta.__instancecheck__` (#103159)
Alex Waygood [Wed, 5 Apr 2023 09:07:30 +0000 (10:07 +0100)] 
gh-74690: typing: Simplify and optimise `_ProtocolMeta.__instancecheck__` (#103159)

2 years agogh-103193: Micro-optimise helper functions for `inspect.getattr_static` (#103195)
Alex Waygood [Wed, 5 Apr 2023 07:27:01 +0000 (08:27 +0100)] 
gh-103193: Micro-optimise helper functions for `inspect.getattr_static` (#103195)

2 years agogh-103167: Fix `-Wstrict-prototypes` warnings by using `(void)` for functions with...
Nikita Sobolev [Wed, 5 Apr 2023 07:22:33 +0000 (10:22 +0300)] 
gh-103167: Fix `-Wstrict-prototypes` warnings by using `(void)` for functions with no args (GH-103168)

2 years agogh-66897: Upgrade HTTP CONNECT to protocol HTTP/1.1 (#8305)
Michael Handler [Wed, 5 Apr 2023 04:55:24 +0000 (21:55 -0700)] 
gh-66897: Upgrade HTTP CONNECT to protocol HTTP/1.1 (#8305)

* bpo-22708: Upgrade HTTP CONNECT to protocol HTTP/1.1 (GH-NNNN)

Use protocol HTTP/1.1 when sending HTTP CONNECT tunnelling requests;
generate Host: headers if one is not already provided (required by
HTTP/1.1), convert IDN domains to punycode in HTTP CONNECT requests.

* Refactor tests to pass under -bb (fix ByteWarnings); missed some lines >80.

* Use consistent 'tunnelling' spelling in Lib/http/client.py

* Lib/test/test_httplib: Remove remnant of obsoleted test.

* Use dict.copy() not copy.copy()

* fix version changed

* Update Lib/http/client.py

Co-authored-by: bgehman <bgehman@users.noreply.github.com>
* Switch to for/else: syntax, as suggested

* Don't use for: else:

* Sure, fine, w/e

* Oops

* 1nm to the left

---------

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: bgehman <bgehman@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years agogh-101525: Disable peephole optimization process of BOLT (gh-103187)
Dong-hee Na [Wed, 5 Apr 2023 00:10:45 +0000 (09:10 +0900)] 
gh-101525: Disable peephole optimization process of BOLT (gh-103187)

Co-authored-by: Dong-hee Na <donghee.na@linecorp.com>
2 years agogh-102660: Fix is_core_module() (gh-103257)
Eric Snow [Tue, 4 Apr 2023 23:03:40 +0000 (17:03 -0600)] 
gh-102660: Fix is_core_module() (gh-103257)

In gh-102744 we added is_core_module() (in Python/import.c), which relies on get_core_module_dict() (also added in that PR).  The problem is that_PyImport_FixupBuiltin(), which ultimately calls is_core_module(), is called on the builtins module before interp->builtins_copyis set.  Consequently, the builtins module isn't considered a "core" module while it is getting "fixed up" and its module def m_copy erroneously gets set.  Under isolated interpreters this causes problems since sys and builtins are allowed even though they are still single-phase init modules.  (This was discovered while working on gh-101660.)

The solution is to stop relying on get_core_module_dict() in is_core_module().

2 years agoImprove some grammar in the socket docs (#103254)
Tim Burke [Tue, 4 Apr 2023 22:46:46 +0000 (15:46 -0700)] 
Improve some grammar in the socket docs (#103254)

2 years agoGH-75586: Make shutil.which() on Windows more consistent with the OS (GH-103179)
Charles Machalow [Tue, 4 Apr 2023 22:24:13 +0000 (15:24 -0700)] 
GH-75586: Make shutil.which() on Windows more consistent with the OS (GH-103179)

2 years agogh-103207: Add instructions to the macOS installer welcome display on how to workarou...
Ned Deily [Tue, 4 Apr 2023 21:06:00 +0000 (17:06 -0400)] 
gh-103207: Add instructions to the macOS installer welcome display on how to workaround  the macOS 13 Ventura “The installer encountered an error” failure. (GH-103251)

2 years agoMerge branch 'main' of https://github.com/python/cpython into main
Thomas Wouters [Tue, 4 Apr 2023 20:01:07 +0000 (22:01 +0200)] 
Merge branch 'main' of https://github.com/python/cpython into main