]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-88233: zipfile: handle extras after a zip64 extra (GH-96161)
Tim Hatch [Mon, 20 Feb 2023 17:07:03 +0000 (09:07 -0800)] 
gh-88233: zipfile: handle extras after a zip64 extra (GH-96161)

Previously, any data _after_ the zip64 extra would be removed.

With many new tests.

Fixes #88233

Automerge-Triggered-By: GH:jaraco
2 years agogh-101981: Apply HOMEBREW related environment variables (gh-102074)
Dong-hee Na [Mon, 20 Feb 2023 15:20:18 +0000 (00:20 +0900)] 
gh-101981: Apply HOMEBREW related environment variables (gh-102074)

2 years agogh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)
Steve Dower [Mon, 20 Feb 2023 14:56:48 +0000 (14:56 +0000)] 
gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)

* gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h

* Make cases_generator correct on Windows

2 years agogh-101819: Adapt _io types to heap types, batch 1 (GH-101949)
Erlend E. Aasland [Mon, 20 Feb 2023 13:46:20 +0000 (14:46 +0100)] 
gh-101819: Adapt _io types to heap types, batch 1 (GH-101949)

Adapt StringIO, TextIOWrapper, FileIO, Buffered*, and BytesIO types.

Automerge-Triggered-By: GH:erlend-aasland
2 years agogh-101981: Build macOS as recommended by the devguide (GH-102070)
Erlend E. Aasland [Mon, 20 Feb 2023 13:07:25 +0000 (14:07 +0100)] 
gh-101981: Build macOS as recommended by the devguide (GH-102070)

Automerge-Triggered-By: GH:erlend-aasland
2 years agogh-97786: Fix compiler warnings in pytime.c (#101826)
Mark Dickinson [Mon, 20 Feb 2023 01:16:11 +0000 (01:16 +0000)] 
gh-97786: Fix compiler warnings in pytime.c (#101826)

Fixes compiler warnings in pytime.c.

2 years agogh-101578: Amend PyErr_{Set,Get}RaisedException docs (#101962)
Erlend E. Aasland [Sun, 19 Feb 2023 20:22:29 +0000 (21:22 +0100)] 
gh-101578: Amend PyErr_{Set,Get}RaisedException docs (#101962)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agoMisc improvements to the float tutorial (GH-102052)
Raymond Hettinger [Sun, 19 Feb 2023 19:21:37 +0000 (13:21 -0600)] 
Misc improvements to the float tutorial (GH-102052)

2 years agogh-85417: Clarify behaviour on branch cuts in cmath module (#102046)
Mark Dickinson [Sun, 19 Feb 2023 19:15:44 +0000 (19:15 +0000)] 
gh-85417: Clarify behaviour on branch cuts in cmath module (#102046)

This PR updates the cmath module documentation to reflect the reality that Python is almost always (and as far as I can tell, that "almost" can be omitted) running on a machine whose C double supports signed zeros.

* Removes misleading references to functions being continuous from above / below / the left / the right at branch cuts
* Expands the note on branch cuts at the top of the module documentation to explain the double-sided sign-of-zero-based behaviour

2 years agogh-100425: Update tutorial docs related to sum() accuracy (FH-101854)
neuralstring [Sun, 19 Feb 2023 16:39:03 +0000 (16:39 +0000)] 
gh-100425: Update tutorial docs related to sum() accuracy (FH-101854)

2 years agoAdd missing 'is' to `cmath.log()` docstring (#102049)
Owain Davies [Sun, 19 Feb 2023 15:00:59 +0000 (22:00 +0700)] 
Add missing 'is' to `cmath.log()` docstring (#102049)

Fix missing 'is' in cmath.log() docstring

2 years agogh-100210: Correct the comment link for unescaping HTML (#100212)
Jean-Christophe Amiel [Sun, 19 Feb 2023 10:18:12 +0000 (11:18 +0100)] 
gh-100210: Correct the comment link for unescaping HTML (#100212)

gh-100210: correct the comment link for unescaping HTML

2 years agogh-97930: Also include subdirectory in makefile. (#102030)
Jason R. Coombs [Sun, 19 Feb 2023 02:32:50 +0000 (21:32 -0500)] 
gh-97930: Also include subdirectory in makefile. (#102030)

2 years agogh-99735: Use required=True in argparse subparsers example (#100927)
Patricio Paez [Sun, 19 Feb 2023 01:06:03 +0000 (19:06 -0600)] 
gh-99735: Use required=True in argparse subparsers example (#100927)

2 years agoFix incorrectly documented attribute in csv docs (#101250)
Reza Rastak [Sun, 19 Feb 2023 00:55:43 +0000 (19:55 -0500)] 
Fix incorrectly documented attribute in csv docs (#101250)

2 years agoGH-84783: Make the slice object hashable (GH-101264)
Furkan Onder [Sun, 19 Feb 2023 00:22:02 +0000 (00:22 +0000)] 
GH-84783: Make the slice object hashable (GH-101264)

2 years agogh-97930: Apply changes from importlib_resources 5.12. (GH-102010)
Jason R. Coombs [Sat, 18 Feb 2023 21:29:22 +0000 (16:29 -0500)] 
gh-97930: Apply changes from importlib_resources 5.12. (GH-102010)

2 years agobpo-46978: Correct docstrings for in-place builtin operators (#31802)
Nicko van Someren [Sat, 18 Feb 2023 18:44:41 +0000 (11:44 -0700)] 
bpo-46978: Correct docstrings for in-place builtin operators (#31802)

2 years agogh-101536: [docs] Improve attributes of `urllib.error.HTTPError` (#101612)
Nikita Sobolev [Sat, 18 Feb 2023 15:46:33 +0000 (18:46 +0300)] 
gh-101536: [docs] Improve attributes of `urllib.error.HTTPError` (#101612)

* gh-101536: [docs] Improve attributes of `urllib.error.HTTPError`

* Address review

2 years agogh-101967: add a missing error check (#101968)
Eclips4 [Sat, 18 Feb 2023 00:52:23 +0000 (03:52 +0300)] 
gh-101967: add a missing error check (#101968)

2 years agogh-101739: [Enum] update docs - default boundary for Flag is CONFORM (GH-101746)
Owain Davies [Fri, 17 Feb 2023 21:36:47 +0000 (04:36 +0700)] 
gh-101739: [Enum] update docs - default boundary for Flag is CONFORM (GH-101746)

2 years agogh-100226: Clarify StreamReader.read behavior (#101807)
Jan Gosmann [Fri, 17 Feb 2023 21:01:26 +0000 (22:01 +0100)] 
gh-100226: Clarify StreamReader.read behavior (#101807)

2 years agogh-101992: update plistlib examples to be runnable (#101994)
Dustin Rodrigues [Fri, 17 Feb 2023 19:30:29 +0000 (14:30 -0500)] 
gh-101992: update plistlib examples to be runnable (#101994)

* gh-101992: update plistlib examples to be runnable

* Update Doc/library/plistlib.rst

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years agogh-101766: Fix refleak for _BlockingOnManager resources from test suite level (gh...
Dong-hee Na [Fri, 17 Feb 2023 15:18:47 +0000 (00:18 +0900)] 
gh-101766: Fix refleak for _BlockingOnManager resources from test suite level (gh-101988)

2 years agogh-100809: Fix handling of drive-relative paths in pathlib.Path.absolute() (GH-100812)
Barney Gale [Fri, 17 Feb 2023 14:08:14 +0000 (14:08 +0000)] 
gh-100809: Fix handling of drive-relative paths in pathlib.Path.absolute() (GH-100812)

Resolving the drive independently uses the OS API, which ensures it starts from the current directory on that drive.

2 years agogh-101360: Fix anchor matching in pathlib.PureWindowsPath.match() (GH-101363)
Barney Gale [Fri, 17 Feb 2023 14:05:38 +0000 (14:05 +0000)] 
gh-101360: Fix anchor matching in pathlib.PureWindowsPath.match() (GH-101363)

Use `fnmatch` to match path and pattern anchors, just as we do for other
path parts. This allows patterns such as `'*:/Users/*'` to be matched.

2 years agogh-101766: Fix refleak for _BlockingOnManager resources (gh-101942)
Dong-hee Na [Fri, 17 Feb 2023 10:14:07 +0000 (19:14 +0900)] 
gh-101766: Fix refleak for _BlockingOnManager resources (gh-101942)

2 years agoDocs: fix typos in PyFunction_WatchCallback docs and in 3.12 NEWS (GH-101980)
Yeojin Kim [Fri, 17 Feb 2023 08:47:02 +0000 (17:47 +0900)] 
Docs: fix typos in PyFunction_WatchCallback docs and in 3.12 NEWS (GH-101980)

- possitibility => possibility
- disaallowed => disallowed

2 years agogh-101973: Fix parameter reference for PyModule_FromDefAndSpec (#101976)
Oleg Iarygin [Fri, 17 Feb 2023 08:43:07 +0000 (12:43 +0400)] 
gh-101973: Fix parameter reference for PyModule_FromDefAndSpec (#101976)

2 years agogh-101758: Fix Refleak-Related Failures in test_singlephase_variants (gh-101969)
Eric Snow [Fri, 17 Feb 2023 00:21:22 +0000 (17:21 -0700)] 
gh-101758: Fix Refleak-Related Failures in test_singlephase_variants (gh-101969)

gh-101891 is causing failures under `$> ./python -m test test_imp -R 3:3`.  Furthermore, with that fixed, "test_singlephase_variants" is leaking references.  This change addresses the first part, but skips the leaking tests until we can follow up with a fix.

https://github.com/python/cpython/issues/101758

2 years agogh-101758: Add _PyState_AddModule() Back for the Stable ABI (gh-101956)
Eric Snow [Thu, 16 Feb 2023 21:05:31 +0000 (14:05 -0700)] 
gh-101758: Add _PyState_AddModule() Back for the Stable ABI (gh-101956)

We're adding the function back, only for the stable ABI symbol and not as any form of API. I had removed it yesterday.

This undocumented "private" function was added with the implementation for PEP 3121 (3.0, 2007) for internal use and later moved out of the limited API (3.6, 2016) and then into the internal API (3.9, 2019). I removed it completely yesterday, including from the stable ABI manifest (where it was added because the symbol happened to be exported). It's unlikely that anyone is using _PyState_AddModule(), especially any stable ABI extensions built against 3.2-3.5, but we're playing it safe.

https://github.com/python/cpython/issues/101758

2 years agoGH-96764: rewrite `asyncio.wait_for` to use `asyncio.timeout` (#98518)
Kumar Aditya [Thu, 16 Feb 2023 18:48:21 +0000 (00:18 +0530)] 
GH-96764: rewrite `asyncio.wait_for` to use `asyncio.timeout` (#98518)

Changes `asyncio.wait_for` to use `asyncio.timeout` as its underlying implementation.

2 years agogh-99942: correct the pkg-config/python-config flags for cygwin/android
Eli Schwartz [Thu, 16 Feb 2023 17:57:59 +0000 (12:57 -0500)] 
gh-99942: correct the pkg-config/python-config flags for cygwin/android

2 years agogh-101952: Fix possible segfault in `BUILD_SET` opcode (#101958)
Eclips4 [Thu, 16 Feb 2023 17:46:43 +0000 (20:46 +0300)] 
gh-101952: Fix possible segfault in `BUILD_SET` opcode (#101958)

2 years agogh-93573: Replace wrong example domains in configparser doc (GH-93574)
sblondon [Thu, 16 Feb 2023 15:13:21 +0000 (16:13 +0100)] 
gh-93573: Replace wrong example domains in configparser doc (GH-93574)

* Replace bitbucket.org domain by forge.example
* Update example to python.org
* Use explicitly invalid domain

topsecret.server.com domain is not controled by PSF. It's replaced by invalid topsecret.server.example domain. It follows RFC 2606, which advise .example as TLD for documentation.

2 years agogh-101881: Support (non-)blocking read/write functions on Windows pipes (GH-101882)
Rayyan Ansari [Thu, 16 Feb 2023 14:52:24 +0000 (14:52 +0000)] 
gh-101881: Support (non-)blocking read/write functions on Windows pipes (GH-101882)

* fileutils: handle non-blocking pipe IO on Windows

Handle erroring operations on non-blocking pipes by reading the _doserrno code.
Limit writes on non-blocking pipes that are too large.

* Support blocking functions on Windows

Use the GetNamedPipeHandleState and SetNamedPipeHandleState Win32 API functions to add support for os.get_blocking and os.set_blocking.

2 years agogh-101951: use textwrap.dedent in compiler tests to make them more readable (GH-101950)
Irit Katriel [Thu, 16 Feb 2023 12:31:59 +0000 (12:31 +0000)] 
gh-101951: use textwrap.dedent in compiler tests to make them more readable (GH-101950)

Fixes #101951.

Automerge-Triggered-By: GH:iritkatriel
2 years agogh-101928: fix crash in compiler on multi-line lambda in function call (#101933)
penguin_wwy [Thu, 16 Feb 2023 11:31:41 +0000 (19:31 +0800)] 
gh-101928: fix crash in compiler on multi-line lambda in function call (#101933)

2 years agogh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)
Gregory P. Smith [Thu, 16 Feb 2023 06:08:20 +0000 (22:08 -0800)] 
gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)

This merges their code. They're backed by the same single HACL* static library, having them be a single module simplifies maintenance.

This should unbreak the wasm enscripten builds that currently fail due to linking in --whole-archive mode and the HACL* library appearing twice.

Long unnoticed error fixed: _sha512.SHA384Type was doubly assigned and was actually SHA512Type. Nobody depends on those internal names.

Also rename LIBHACL_ make vars to LIBHACL_SHA2_ in preperation for other future HACL things.

2 years agogh-98627: Add an Optional Check for Extension Module Subinterpreter Compatibility...
Eric Snow [Thu, 16 Feb 2023 01:16:00 +0000 (18:16 -0700)] 
gh-98627: Add an Optional Check for Extension Module Subinterpreter Compatibility (gh-99040)

Enforcing (optionally) the restriction set by PEP 489 makes sense. Furthermore, this sets the stage for a potential restriction related to a per-interpreter GIL.

This change includes the following:

* add tests for extension module subinterpreter compatibility
* add _PyInterpreterConfig.check_multi_interp_extensions
* add Py_RTFLAGS_MULTI_INTERP_EXTENSIONS
* add _PyImport_CheckSubinterpIncompatibleExtensionAllowed()
* fail iff the module does not implement multi-phase init and the current interpreter is configured to check

https://github.com/python/cpython/issues/98627

2 years agogh-101758: Fix the wasm Buildbots (gh-101943)
Eric Snow [Thu, 16 Feb 2023 00:54:05 +0000 (17:54 -0700)] 
gh-101758: Fix the wasm Buildbots (gh-101943)

They were broken by gh-101920.

https://github.com/python/cpython/issues/101758

2 years agogh-101758: Add a Test For Single-Phase Init Modules in Multiple Interpreters (gh...
Eric Snow [Wed, 15 Feb 2023 23:05:07 +0000 (16:05 -0700)] 
gh-101758: Add a Test For Single-Phase Init Modules in Multiple Interpreters (gh-101920)

The test verifies the behavior of single-phase init modules when loaded in multiple interpreters.

https://github.com/python/cpython/issues/101758

2 years agogh-101758: Clean Up Uses of Import State (gh-101919)
Eric Snow [Wed, 15 Feb 2023 22:32:31 +0000 (15:32 -0700)] 
gh-101758: Clean Up Uses of Import State (gh-101919)

This change is almost entirely moving code around and hiding import state behind internal API.  We introduce no changes to behavior, nor to non-internal API.  (Since there was already going to be a lot of churn, I took this as an opportunity to re-organize import.c into topically-grouped sections of code.)  The motivation is to simplify a number of upcoming changes.

Specific changes:

* move existing import-related code to import.c, wherever possible
* add internal API for interacting with import state (both global and per-interpreter)
* use only API outside of import.c (to limit churn there when changing the location, etc.)
* consolidate the import-related state of PyInterpreterState into a single struct field (this changes layout slightly)
* add macros for import state in import.c (to simplify changing the location)
* group code in import.c into sections
*remove _PyState_AddModule()

https://github.com/python/cpython/issues/101758

2 years agogh-99138: Isolate _zoneinfo (#99218)
Erlend E. Aasland [Wed, 15 Feb 2023 21:58:48 +0000 (22:58 +0100)] 
gh-99138: Isolate _zoneinfo (#99218)

* Convert zone info type to heap type and add it to module state
* Add global variables to module state

2 years agogh-101819: Remove _PyWindowsConsoleIO_Type from the Windows DLL (GH-101904)
Erlend E. Aasland [Wed, 15 Feb 2023 13:07:59 +0000 (14:07 +0100)] 
gh-101819: Remove _PyWindowsConsoleIO_Type from the Windows DLL (GH-101904)

Automerge-Triggered-By: GH:erlend-aasland
2 years agoGH-87849: Fix refleak in SEND instruction. (GH-101908)
Mark Shannon [Wed, 15 Feb 2023 12:21:40 +0000 (12:21 +0000)] 
GH-87849: Fix refleak in SEND instruction. (GH-101908)

Fix refleak in SEND instruction.

2 years agogh-101819: Remove _testcapi dependencies on specific _io symbols (#101918)
Erlend E. Aasland [Wed, 15 Feb 2023 10:18:27 +0000 (11:18 +0100)] 
gh-101819: Remove _testcapi dependencies on specific _io symbols (#101918)

2 years agogh-101693: In sqlite3, deprecate using named placeholders with parameters supplied...
Erlend E. Aasland [Wed, 15 Feb 2023 05:27:16 +0000 (06:27 +0100)] 
gh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequence (#101698)

2 years agogh-99108: Build the hashlib HACL* code as a static library. (#101917)
Gregory P. Smith [Tue, 14 Feb 2023 23:57:01 +0000 (15:57 -0800)] 
gh-99108: Build the hashlib HACL* code as a static library. (#101917)

This builds HACL* as a library in one place.

A followup to #101707 which broke some WASM builds. This fixes 2/4 of them, but the enscripten toolchain in the others don't deduplicate linker arguments and error out. A follow-on PR will address those.

2 years agogh-101758: Add a Test For Single-Phase Init Module Variants (gh-101891)
Eric Snow [Tue, 14 Feb 2023 21:26:03 +0000 (14:26 -0700)] 
gh-101758: Add a Test For Single-Phase Init Module Variants (gh-101891)

The new test exercises the most important variants for single-phase init extension modules. We also add some explanation about those variants to import.c.

https://github.com/python/cpython/issues/101758

2 years agogh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
Irit Katriel [Tue, 14 Feb 2023 11:54:13 +0000 (11:54 +0000)] 
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)

2 years agoGH-101898: Fix missing term references for hashable definition (#101899)
Furkan Onder [Tue, 14 Feb 2023 10:20:11 +0000 (10:20 +0000)] 
GH-101898: Fix missing term references for hashable definition (#101899)

Fix missing term references for hashable definition

2 years agogh-99108: Import SHA2-384/512 from HACL* (#101707)
Jonathan Protzenko [Tue, 14 Feb 2023 09:25:16 +0000 (01:25 -0800)] 
gh-99108: Import SHA2-384/512 from HACL* (#101707)

Replace the builtin hashlib implementations of SHA2-384 and SHA2-512
originally from LibTomCrypt with formally verified, side-channel resistant
code from the [HACL*](https://github.com/hacl-star/hacl-star/) project.
The builtins remain a fallback only used when OpenSSL does not provide them.

2 years agogh-101857: Allow xattr detection on musl libc (#101858)
Sam James [Tue, 14 Feb 2023 07:21:58 +0000 (07:21 +0000)] 
gh-101857: Allow xattr detection on musl libc (#101858)

Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agogh-74895: getaddrinfo no longer raises OverflowError (#2435)
Radek Smejkal [Tue, 14 Feb 2023 01:37:34 +0000 (02:37 +0100)] 
gh-74895: getaddrinfo no longer raises OverflowError (#2435)

`socket.getaddrinfo()` no longer raises `OverflowError` based on the **port** argument. Error reporting (or not) for its value is left up to the underlying C library `getaddrinfo()` implementation.

2 years agogh-101849: Add upgrade codes for old versions of launcher that ended up with later...
Steve Dower [Mon, 13 Feb 2023 20:33:48 +0000 (20:33 +0000)] 
gh-101849: Add upgrade codes for old versions of launcher that ended up with later version numbers (GH-101877)

2 years agogh-101810: Remove duplicated st_ino calculation (GH-101811)
James Lee [Mon, 13 Feb 2023 13:49:44 +0000 (05:49 -0800)] 
gh-101810: Remove duplicated st_ino calculation (GH-101811)

2 years agogh-92547: Purge sqlite3_enable_shared_cache() detection from configure (#101873)
Erlend E. Aasland [Mon, 13 Feb 2023 12:36:42 +0000 (13:36 +0100)] 
gh-92547: Purge sqlite3_enable_shared_cache() detection from configure (#101873)

2 years agoGH-100987: Refactor `_PyInterpreterFrame` a bit, to assist generator improvement...
Mark Shannon [Mon, 13 Feb 2023 11:31:15 +0000 (11:31 +0000)] 
GH-100987: Refactor `_PyInterpreterFrame` a bit, to assist generator improvement. (GH-100988)

Refactor _PyInterpreterFrame a bit, to assist generator improvement.

2 years agoGH-87849: Simplify stack effect of SEND and specialize it for generators and coroutin...
Mark Shannon [Mon, 13 Feb 2023 11:24:55 +0000 (11:24 +0000)] 
GH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (GH-101788)

2 years agoCorrect trivial grammar in reset_mock docs (#101861)
Steve Kowalik [Mon, 13 Feb 2023 09:11:43 +0000 (20:11 +1100)] 
Correct trivial grammar in reset_mock docs (#101861)

2 years agogh-101845: pyspecific: Fix i18n for availability directive (GH-101846)
Jean Abou-Samra [Sun, 12 Feb 2023 14:20:11 +0000 (15:20 +0100)] 
gh-101845: pyspecific: Fix i18n for availability directive (GH-101846)

pyspecific: Fix i18n for availability directive

If the directive has content, the previous code would nest paragraph
nodes from that content inside a general paragraph node, which confuses
Sphinx and leads it to drop the content when translating. Instead, use a
container node for the body.

Also use set_source_info so that any warnings have location info.

2 years agogh-89792: Limit test_tools freeze test build parallelism based on the number of cores...
Gregory P. Smith [Sun, 12 Feb 2023 06:07:52 +0000 (22:07 -0800)] 
gh-89792: Limit test_tools freeze test build parallelism based on the number of cores (#101841)

unhardcode freeze test build parallelism. base it on the number of cpus, don't use more than max(2, os.cpu_count()/3).

2 years agogh-85984: Utilize new "winsize" functions from termios in pty tests. (#101831)
Soumendra Ganguly [Sun, 12 Feb 2023 05:24:43 +0000 (23:24 -0600)] 
gh-85984: Utilize new "winsize" functions from termios in pty tests. (#101831)

Utilize new functions termios.tcgetwinsize() and termios.tcsetwinsize in test_pty.py.

Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agogh-89792: Prevent test_tools from copying 1000M of "source" in freeze test (#101837)
Gregory P. Smith [Sun, 12 Feb 2023 04:54:28 +0000 (20:54 -0800)] 
gh-89792: Prevent test_tools from copying 1000M of "source" in freeze test (#101837)

Prevent test_tools from copying 1000M of "source"

It doesn't need a git repo, just the checkout.  We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold.

This should significantly reduce IO and presumably time on buildbots during this long test.

2 years agoFix typo in test_fstring.py (#101823)
mjoerg [Sat, 11 Feb 2023 15:34:15 +0000 (16:34 +0100)] 
Fix typo in test_fstring.py (#101823)

2 years agoGH-101797: allocate `PyExpat_CAPI` capsule on heap (#101798)
Kumar Aditya [Sat, 11 Feb 2023 08:37:39 +0000 (14:07 +0530)] 
GH-101797: allocate `PyExpat_CAPI` capsule on heap (#101798)

2 years agogh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call it a...
busywhitespace [Fri, 10 Feb 2023 23:29:24 +0000 (00:29 +0100)] 
gh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call it a class method (GH-101391)

2 years agoDocs: Fix getstatus() -> getcode() typos (#101296)
Hugo van Kemenade [Fri, 10 Feb 2023 18:46:12 +0000 (20:46 +0200)] 
Docs: Fix getstatus() -> getcode() typos (#101296)

2 years agoDocs: use parameter list for sqlite3.Cursor.execute* (#101782)
Erlend E. Aasland [Fri, 10 Feb 2023 17:54:04 +0000 (18:54 +0100)] 
Docs: use parameter list for sqlite3.Cursor.execute* (#101782)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-101763: Update bundled copy of libffi to 3.4.4 on Windows (GH-101784)
Steve Dower [Fri, 10 Feb 2023 16:57:30 +0000 (16:57 +0000)] 
gh-101763: Update bundled copy of libffi to 3.4.4 on Windows (GH-101784)

2 years agogh-101517: make bdb avoid looking up in linecache with lineno=None (#101787)
Irit Katriel [Fri, 10 Feb 2023 16:49:29 +0000 (16:49 +0000)] 
gh-101517: make bdb avoid looking up in linecache with lineno=None (#101787)

2 years agogh-101759: Update Windows installer to SQLite 3.40.1 (#101762)
Erlend E. Aasland [Fri, 10 Feb 2023 16:38:26 +0000 (17:38 +0100)] 
gh-101759: Update Windows installer to SQLite 3.40.1 (#101762)

2 years agogh-101277: Finalise isolating itertools (GH-101305)
Erlend E. Aasland [Fri, 10 Feb 2023 11:58:14 +0000 (12:58 +0100)] 
gh-101277: Finalise isolating itertools (GH-101305)

Add repeat, islice, chain, tee, teedataobject, and batched types to module state.

Automerge-Triggered-By: GH:erlend-aasland
2 years agogh-101759: Update macOS installer to SQLite 3.40.1 (#101761)
Erlend E. Aasland [Fri, 10 Feb 2023 07:25:02 +0000 (08:25 +0100)] 
gh-101759: Update macOS installer to SQLite 3.40.1 (#101761)

2 years agoFix some typos in asdl_c.py (GH-101757)
abel1502 [Fri, 10 Feb 2023 03:10:46 +0000 (06:10 +0300)] 
Fix some typos in asdl_c.py (GH-101757)

2 years agogh-101747: Fix refleak in new `OrderedDict` repr (GH-101748)
Nikita Sobolev [Fri, 10 Feb 2023 03:00:58 +0000 (06:00 +0300)] 
gh-101747: Fix refleak in new `OrderedDict` repr (GH-101748)

2 years agogh-101430: Update tracemalloc to handle presize properly. (gh-101745)
Dong-hee Na [Thu, 9 Feb 2023 23:30:03 +0000 (08:30 +0900)] 
gh-101430: Update tracemalloc to handle presize properly. (gh-101745)

2 years agoGH-101228: Fix typo in docstring for read method of `_io.TextIOWrapper` class (#101227)
Partha P. Mukherjee [Thu, 9 Feb 2023 17:46:40 +0000 (12:46 -0500)] 
GH-101228: Fix typo in docstring for read method of `_io.TextIOWrapper` class (#101227)

2 years agoFix typo in `test_fstring.py` (#101600)
Ikko Eltociear Ashimine [Thu, 9 Feb 2023 17:45:58 +0000 (02:45 +0900)] 
Fix typo in `test_fstring.py` (#101600)

2 years agogh-101726: Update the OpenSSL version to 1.1.1t (GH-101727)
Gregory P. Smith [Thu, 9 Feb 2023 17:40:51 +0000 (09:40 -0800)] 
gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727)

Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt

2 years agogh-101283: Fix 'versionchanged' for the shell=True fallback on Windows in 3.12 (GH...
Oleg Iarygin [Thu, 9 Feb 2023 17:36:24 +0000 (21:36 +0400)] 
gh-101283: Fix 'versionchanged' for the shell=True fallback on Windows in 3.12 (GH-101728)

2 years agoLibFFI build requires x64 Cygwin, and skip the ARM build (GH-101743)
Steve Dower [Thu, 9 Feb 2023 17:15:19 +0000 (17:15 +0000)] 
LibFFI build requires x64 Cygwin, and skip the ARM build (GH-101743)

2 years agogh-101670: typo fix in PyImport_ExtendInittab() (#101723)
Sergey B Kirpichev [Thu, 9 Feb 2023 16:49:02 +0000 (19:49 +0300)] 
gh-101670: typo fix in PyImport_ExtendInittab() (#101723)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years agoGH-99293: Document that `Py_TPFLAGS_VALID_VERSION_TAG` shouldn't be used. (#GH-101736)
Mark Shannon [Thu, 9 Feb 2023 13:05:53 +0000 (13:05 +0000)] 
GH-99293: Document that `Py_TPFLAGS_VALID_VERSION_TAG` shouldn't be used. (#GH-101736)

Document that Py_TPFLAGS_VALID_VERSION_TAG shouldn't be used.

2 years agono-issue: Add Dong-hee Na as the cjkcodecs codeowner (gh-101731)
Dong-hee Na [Thu, 9 Feb 2023 12:01:32 +0000 (21:01 +0900)] 
no-issue: Add Dong-hee Na as the cjkcodecs codeowner (gh-101731)

2 years agogh-101678: Merge math_1_to_whatever() and math_1() (#101730)
Sergey B Kirpichev [Thu, 9 Feb 2023 09:40:13 +0000 (12:40 +0300)] 
gh-101678: Merge math_1_to_whatever() and math_1() (#101730)

`math_1_to_whatever()` is no longer useful, since all existing uses of it convert to `float`.
Earlier versions of Python used `math_1_to_whatever` with an integer target; see
gh-16991 for the PR where that use was removed.

2 years agogh-101678: refactor the math module to use special functions from c11 (GH-101679)
Sergey B Kirpichev [Thu, 9 Feb 2023 08:40:52 +0000 (11:40 +0300)] 
gh-101678: refactor the math module to use special functions from c11 (GH-101679)

Shouldn't affect users, hence no news.

Automerge-Triggered-By: GH:mdickinson
2 years agogh-85984: Remove legacy Lib/pty.py code. (#92365)
Soumendra Ganguly [Thu, 9 Feb 2023 01:00:17 +0000 (19:00 -0600)] 
gh-85984: Remove legacy Lib/pty.py code. (#92365)

Refactored the implementation of pty.fork to use os.login_tty.

A DeprecationWarning is now raised by pty.master_open() and pty.slave_open(). They were
undocumented and deprecated long long ago in the docstring in favor of pty.openpty.

Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agogh-98831: Use opcode metadata for stack_effect() (#101704)
Guido van Rossum [Thu, 9 Feb 2023 00:23:19 +0000 (16:23 -0800)] 
gh-98831: Use opcode metadata for stack_effect() (#101704)

* Write output and metadata in a single run
  This halves the time to run the cases generator
  (most of the time goes into parsing the input).
* Declare or define opcode metadata based on NEED_OPCODE_TABLES
* Use generated metadata for stack_effect()
* compile.o depends on opcode_metadata.h
* Return -1 from _PyOpcode_num_popped/pushed for unknown opcode

2 years agogh-101283: Version was just released, so should be changed in 3.11.3 (GH-101719)
Steve Dower [Wed, 8 Feb 2023 23:52:03 +0000 (23:52 +0000)] 
gh-101283: Version was just released, so should be changed in 3.11.3 (GH-101719)

2 years agogh-101283: Fix use of unbound variable (GH-101712)
Steve Dower [Wed, 8 Feb 2023 23:38:56 +0000 (23:38 +0000)] 
gh-101283: Fix use of unbound variable (GH-101712)

2 years agogh-101283: Improved fallback logic for subprocess with shell=True on Windows (GH...
Oleg Iarygin [Wed, 8 Feb 2023 22:12:19 +0000 (02:12 +0400)] 
gh-101283: Improved fallback logic for subprocess with shell=True on Windows (GH-101286)

2 years agogh-101277: Port more itertools static types to heap types (#101304)
Erlend E. Aasland [Wed, 8 Feb 2023 20:25:42 +0000 (21:25 +0100)] 
gh-101277: Port more itertools static types to heap types (#101304)

Add accumulate, compress, count, filterfalse, pairwise, product,
and zip_longest types to module state.

2 years agogh-98831: Modernize CALL and family (#101508)
Guido van Rossum [Wed, 8 Feb 2023 19:40:10 +0000 (11:40 -0800)] 
gh-98831: Modernize CALL and family (#101508)

Includes a slight improvement to `DECREF_INPUTS()`.

2 years agoGH-101696: invalidate type version tag in `_PyStaticType_Dealloc` (#101697)
Kumar Aditya [Wed, 8 Feb 2023 18:02:15 +0000 (23:32 +0530)] 
GH-101696: invalidate type version tag in `_PyStaticType_Dealloc` (#101697)

2 years agogh-100221: Fix creating dirs in `make sharedinstall` (GH-100329)
Michał Górny [Wed, 8 Feb 2023 16:50:43 +0000 (17:50 +0100)] 
gh-100221: Fix creating dirs in `make sharedinstall` (GH-100329)

Fix creating install directories in `make sharedinstall` if they exist already outside `DESTDIR`.  The previous make rules assumed that the directories would be created via a dependency on a rule for `$(DESTSHARED)` that did not fire if the directory did exist outside `$(DESTDIR)`.

While technically `$(DESTDIR)` could be prepended to the rule name, moving the rules for creating directories straight into the `sharedinstall` rule seems to fit the common practices better. Since the rule explicitly checks whether the individual directories exist anyway, there seems to be no reason to rely on make determining that implicitly as well.

2 years agogh-101670: typo fix in PyImport_AppendInittab() (GH-101672)
Sergey B Kirpichev [Wed, 8 Feb 2023 15:49:04 +0000 (18:49 +0300)] 
gh-101670: typo fix in PyImport_AppendInittab() (GH-101672)

2 years agogh-101196: Make isdir/isfile/exists faster on Windows (GH-101324)
Michael Droettboom [Wed, 8 Feb 2023 14:34:24 +0000 (09:34 -0500)] 
gh-101196: Make isdir/isfile/exists faster on Windows (GH-101324)

Co-authored-by: Eryk Sun <eryksun@gmail.com>
2 years agogh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules...
David Hewitt [Wed, 8 Feb 2023 14:23:57 +0000 (14:23 +0000)] 
gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615)