]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
23 months agobpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)
Zackery Spytz [Mon, 25 Dec 2023 15:07:51 +0000 (07:07 -0800)] 
bpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)

The maildir format specification states that files with a leading dot
should be ignored.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months agofix bullet-list in `LOAD_SUPER_ATTR` documentation on `dis` page (#113461)
denballakh [Sun, 24 Dec 2023 20:28:39 +0000 (23:28 +0300)] 
fix bullet-list in `LOAD_SUPER_ATTR` documentation on `dis` page (#113461)

23 months agoGH-111485: Fix handling of FOR_ITER in Tier 2 (GH-113394)
Mark Shannon [Sun, 24 Dec 2023 18:07:34 +0000 (18:07 +0000)] 
GH-111485:  Fix handling of FOR_ITER in Tier 2 (GH-113394)

23 months agogh-113407: Fix import of unittest.mock when CPython is built without docstrings ...
Serhiy Storchaka [Sun, 24 Dec 2023 11:38:56 +0000 (13:38 +0200)] 
gh-113407: Fix import of unittest.mock when CPython is built without docstrings (GH-113408)

23 months agoAdd codeowners for `Lib/ensurepip/` (#112805)
Alex Waygood [Sun, 24 Dec 2023 11:09:50 +0000 (11:09 +0000)] 
Add codeowners for `Lib/ensurepip/` (#112805)

23 months agogh-113191: Add support of os.fchmod() on Windows (GH-113192)
Serhiy Storchaka [Sun, 24 Dec 2023 10:57:11 +0000 (12:57 +0200)] 
gh-113191: Add support of os.fchmod() on Windows (GH-113192)

Also support a file descriptor in os.chmod().

23 months agogh-113440: Ignore the "ver" command failure with exit code 0xc0000142 (GH-113435)
Serhiy Storchaka [Sun, 24 Dec 2023 10:31:23 +0000 (12:31 +0200)] 
gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 (GH-113435)

23 months agogh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423)
Xu Song [Sun, 24 Dec 2023 10:04:12 +0000 (18:04 +0800)] 
gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423)

23 months agogh-113028: Correctly memoize str in pickle when escapes added (GH-113436)
Jeff Allen [Sun, 24 Dec 2023 09:43:44 +0000 (09:43 +0000)] 
gh-113028: Correctly memoize str in pickle when escapes added (GH-113436)

This fixes a divergence between the Python and C implementations of pickle
for protocol 0, such that it pickle.py fails to re-use the first pickled
representation of strings involving characters that have to be escaped.

23 months agogh-111784: Fix two segfaults in the elementtree module (GH-113405)
Kirill Podoprigora [Sun, 24 Dec 2023 08:57:41 +0000 (11:57 +0300)] 
gh-111784: Fix two segfaults in the elementtree module (GH-113405)

First fix resolve situation when pyexpat module (which contains expat_CAPI
capsule) deallocates before _elementtree, so we need to hold a strong
reference to pyexpat module to.

Second fix resolve situation when module state is deallocated before
deallocation of XMLParser instances, which uses module state to clear
some stuff.

23 months agogh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (#113040)
Yilei Yang [Sun, 24 Dec 2023 01:07:52 +0000 (17:07 -0800)] 
gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (#113040)

23 months agogh-112800: Ignore PermissionError on SubprocessTransport.close() in asyncio (#112803)
Allison Karlitskaya [Sun, 24 Dec 2023 00:43:39 +0000 (01:43 +0100)] 
gh-112800: Ignore PermissionError on SubprocessTransport.close() in asyncio (#112803)

In case the spawned process is setuid, we may not be able to send
signals to it, in which case our .kill() call will raise
PermissionError.

Ignore that in order to avoid .close() raising an exception.  Hopefully
the process will exit as a result of receiving EOF on its stdin.

23 months agogh-113317: Move more formatting helpers into libclinic (#113438)
Erlend E. Aasland [Sat, 23 Dec 2023 17:08:10 +0000 (18:08 +0100)] 
gh-113317: Move more formatting helpers into libclinic (#113438)

Move the following global helpers into libclinic:
- format_escape()
- normalize_snippet()
- wrap_declarations()

Also move strip_leading_and_trailing_blank_lines() and make it internal to libclinic.

23 months agoFix trivial typo in test_interpreters (GH-113381)
Jeff Allen [Sat, 23 Dec 2023 14:10:41 +0000 (14:10 +0000)] 
Fix trivial typo in test_interpreters (GH-113381)

23 months agogh-74573: document that ndbm can silently corrupt databases on macOS (#113354)
Ronald Oussoren [Sat, 23 Dec 2023 12:33:34 +0000 (13:33 +0100)] 
gh-74573: document that ndbm can silently corrupt databases on macOS (#113354)

* gh-74573: document that ndbm can silently corrupt databases on macOS

The system ndbm implementation on macOS has an undocumented limitation
on the size of values and can silently corrupt database files when those
are exceeded.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
23 months agogh-113188: Fix shutil.copymode() on Windows (GH-113189)
Serhiy Storchaka [Sat, 23 Dec 2023 11:07:54 +0000 (13:07 +0200)] 
gh-113188: Fix shutil.copymode() on Windows (GH-113189)

Previously it worked differently if dst is a symbolic link:
it modified the permission bits of dst itself rather than the file
it points to if follow_symlinks is true or src is not a symbolic link,
and did nothing if follow_symlinks is false and src is a symbolic link.

Also document similar changes in shutil.copystat().

23 months agogh-112925: Fix error in example of `datetime.time.fromisoformat` and add doctest...
F-park [Sat, 23 Dec 2023 10:44:27 +0000 (18:44 +0800)] 
gh-112925: Fix error in example of `datetime.time.fromisoformat` and add doctest marker (GH-112931)

23 months agogh-81682: Fix test failures when CPython is built without docstrings (GH-113410)
Serhiy Storchaka [Sat, 23 Dec 2023 09:56:30 +0000 (11:56 +0200)] 
gh-81682: Fix test failures when CPython is built without docstrings (GH-113410)

23 months agogh-113317: Clean up Argument Clinic global namespace (#113414)
Erlend E. Aasland [Sat, 23 Dec 2023 00:37:39 +0000 (01:37 +0100)] 
gh-113317: Clean up Argument Clinic global namespace (#113414)

Split up clinic.py by establishing libclinic as a support package for
Argument Clinic. Get rid of clinic.py globals by either making them
class members, or by putting them into libclinic.

- Move INCLUDE_COMMENT_COLUMN to BlockPrinter
- Move NO_VARARG to CLanguage
- Move formatting helpers to libclinic
- Move some constants to libclinic (and annotate them as Final)

23 months agogh-113317: Remove TextAccumulator type alias from clinic.py (#113413)
Erlend E. Aasland [Fri, 22 Dec 2023 22:35:16 +0000 (23:35 +0100)] 
gh-113317: Remove TextAccumulator type alias from clinic.py (#113413)

Clean-up after gh-113402.

23 months agoGH-110109: Adjust `test_pathlib_abc` imports to ease backporting (#113411)
Barney Gale [Fri, 22 Dec 2023 20:59:17 +0000 (20:59 +0000)] 
GH-110109: Adjust `test_pathlib_abc` imports to ease backporting (#113411)

This very boring patch reduces the number of changes needed in
`test_pathlib_abc.py` when backporting to the external `pathlib_abc`
package.

23 months agogh-113317: Argument Clinic: tear out internal text accumulator APIs (#113402)
Erlend E. Aasland [Fri, 22 Dec 2023 20:28:15 +0000 (21:28 +0100)] 
gh-113317: Argument Clinic: tear out internal text accumulator APIs (#113402)

Replace the internal accumulator APIs by using lists of strings and join().

Yak-shaving for separating out formatting code into a separate file.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months agoGH-110109: pathlib ABCs: do not vary path syntax by host OS. (#113219)
Barney Gale [Fri, 22 Dec 2023 18:09:50 +0000 (18:09 +0000)] 
GH-110109: pathlib ABCs: do not vary path syntax by host OS. (#113219)

Change the value of `pathlib._abc.PurePathBase.pathmod` from `os.path` to
`posixpath`.

User subclasses of `PurePathBase` and `PathBase` previously used the host
OS's path syntax, e.g. backslashes as separators on Windows. This is wrong
in most use cases, and likely to catch developers out unless they test on
both Windows and non-Windows machines.

In this patch we change the default to POSIX syntax, regardless of OS. This
is somewhat arguable (why not make all aspects of syntax abstract and
individually configurable?) but an improvement all the same.

This change has no effect on `PurePath`, `Path`, nor their subclasses. Only
private APIs are affected.

23 months agoGH-112855: Slightly improve tests for `pathlib.PurePath` pickling (#113243)
Barney Gale [Fri, 22 Dec 2023 17:49:09 +0000 (17:49 +0000)] 
GH-112855: Slightly improve tests for `pathlib.PurePath` pickling (#113243)

Add a few more simple test cases, like non-anchored paths. Remove misplaced
and indirect test that pickling doesn't change the `stat()` value.

23 months agogh-113212: Improve error message & document zero-arg super inside nested functions...
Yan Yanchii [Fri, 22 Dec 2023 15:12:08 +0000 (16:12 +0100)] 
gh-113212: Improve error message & document zero-arg super inside nested functions and generator expressions (GH-113307)

23 months agoGH-110109: Fix misleading `pathlib._abc.PurePathBase` repr (#113376)
Barney Gale [Fri, 22 Dec 2023 15:11:16 +0000 (15:11 +0000)] 
GH-110109: Fix misleading `pathlib._abc.PurePathBase` repr (#113376)

`PurePathBase.__repr__()` produces a string like `MyPath('/foo')`. This
repr is incorrect/misleading when a subclass's `__init__()` method is
customized, which I expect to be the very common.

This commit moves the `__repr__()` method to `PurePath`, leaving
`PurePathBase` with the default `object` repr.

No user-facing changes because the `pathlib._abc` module remains private.

23 months agoGH-112215: Increase C recursion limit for non debug builds (GH-113397)
Mark Shannon [Fri, 22 Dec 2023 14:25:25 +0000 (14:25 +0000)] 
GH-112215: Increase C recursion limit for non debug builds (GH-113397)

23 months agogh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (#113378)
Ronald Oussoren [Fri, 22 Dec 2023 11:09:16 +0000 (12:09 +0100)] 
gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (#113378)

* gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set

This fixes the existing tests when PYTHONIOENCODING is
set by unsetting PYTHONIOENCODING.

Also add a test that explicitly checks what happens
when PYTHONIOENCODING is set.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
23 months agogh-113384: Skip test_freeze for framework builds on macOS (#113390)
Ronald Oussoren [Fri, 22 Dec 2023 10:35:54 +0000 (11:35 +0100)] 
gh-113384: Skip test_freeze for framework builds on macOS (#113390)

23 months agogh-113297: Fix segfault in compiler for with statement with 19 context managers ...
Irit Katriel [Fri, 22 Dec 2023 01:50:26 +0000 (01:50 +0000)] 
gh-113297: Fix segfault in compiler for with statement with 19 context managers (#113327)

23 months agogh-112027: Don't print mimalloc warning after mmap() call (gh-113372)
Sam Gross [Fri, 22 Dec 2023 00:38:27 +0000 (19:38 -0500)] 
gh-112027: Don't print mimalloc warning after mmap() call (gh-113372)

gh-112027: Don't print mimalloc warning after mmap

This changes the warning to a "verbose"-level message in prim.c. The
address passed to mmap is only a hint -- it's normal for mmap() to
sometimes not respect the hint and return a different address.

23 months agoBump mypy to 1.8.0 (#113385)
Alex Waygood [Thu, 21 Dec 2023 23:14:24 +0000 (23:14 +0000)] 
Bump mypy to 1.8.0 (#113385)

23 months agogh-113157 gh-89519: Fix method descriptors (gh-113233)
Raymond Hettinger [Thu, 21 Dec 2023 22:08:35 +0000 (16:08 -0600)] 
gh-113157 gh-89519:  Fix method descriptors (gh-113233)

Restore behaviors before classmethod descriptor chaining was introduced.

23 months agogh-113313: Note that slice support is not required for all sequences. (gh-113377)
Raymond Hettinger [Thu, 21 Dec 2023 21:54:59 +0000 (15:54 -0600)] 
gh-113313: Note that slice support is not required for all sequences. (gh-113377)

23 months agogh-113370: Add missing obmalloc.o dependencies on mimalloc (#113371)
Sam Gross [Thu, 21 Dec 2023 21:44:55 +0000 (16:44 -0500)] 
gh-113370: Add missing obmalloc.o dependencies on mimalloc (#113371)

23 months agogh-95754: Better AttributeError on partially initialised module (#112577)
Shantanu [Thu, 21 Dec 2023 21:24:10 +0000 (13:24 -0800)] 
gh-95754: Better AttributeError on partially initialised module (#112577)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months agogh-113174: Sync with importlib_metadata 7.0 (#113175)
Jason R. Coombs [Thu, 21 Dec 2023 20:04:05 +0000 (15:04 -0500)] 
gh-113174: Sync with importlib_metadata 7.0 (#113175)

* Sync with importlib_metadata 7.0.0

* Add blurb

* Update docs to reflect changes.

* Link datamodel docs for object.__getitem__

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add what's new for removed __getattr__

* Link datamodel docs for object.__getitem__

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add exclamation point, as that seems to be used for other classes.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months agogh-113343: Fix error check on mmap(2) (#113342)
Namhyung Kim [Thu, 21 Dec 2023 19:28:55 +0000 (11:28 -0800)] 
gh-113343: Fix error check on mmap(2) (#113342)

Fix error check on mmap(2)

It should check MAP_FAILED instead of NULL for error.

On mmap(2) man page:

  RETURN VALUE
       On success, mmap() returns a pointer to the mapped area.
       On error, the value MAP_FAILED (that is, (void *) -1) is
       returned, and errno is set to indicate the error.

23 months agogh-113325: Remove a debugging print accidentally left in test_symtable (GH-113368)
Serhiy Storchaka [Thu, 21 Dec 2023 18:12:07 +0000 (20:12 +0200)] 
gh-113325: Remove a debugging print accidentally left in test_symtable (GH-113368)

23 months agogh-65701: document that freeze doesn't work with framework builds on macOS (#113352)
Ronald Oussoren [Thu, 21 Dec 2023 15:28:00 +0000 (16:28 +0100)] 
gh-65701: document that freeze doesn't work with framework builds on macOS (#113352)

* gh-65701: document that freeze doesn't work with framework builds on macOS

The framework install is inherently incompatible with freeze. Document
that that freeze doesn't work with framework builds and bail out
early when trying to run freeze anyway.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
23 months agogh-110383: Improve accuracy of str.split() and str.rsplit() docstrings (#113355)
Erlend E. Aasland [Thu, 21 Dec 2023 14:22:39 +0000 (15:22 +0100)] 
gh-110383: Improve accuracy of str.split() and str.rsplit() docstrings (#113355)

Clarify split direction in the docstring body,
instead of in the 'maxsplit' param docstring.

23 months agogh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480)
Ronald Oussoren [Thu, 21 Dec 2023 13:43:38 +0000 (14:43 +0100)] 
gh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480)

The installation of XQuartz on macOS will unconditionally
set the $DISPLAY variable. The X11 server will be launched
when a program tries to access the display.  This results
in launching the X11 server when using the webbrowser module,
even though X11 browsers won't be used in practice.

23 months agoGH-111485: Delete the old generator code. (GH-113321)
Mark Shannon [Thu, 21 Dec 2023 12:46:28 +0000 (12:46 +0000)] 
GH-111485: Delete the old generator code. (GH-113321)

23 months agogh-113336: Remove the 'version' directive from Argument Clinic (#113341)
Erlend E. Aasland [Thu, 21 Dec 2023 12:10:41 +0000 (13:10 +0100)] 
gh-113336: Remove the 'version' directive from Argument Clinic (#113341)

The 'version' directive was introduced with gh-63929 in Nov 2013. It has
not been in use in the CPython code base, and the 'version' variable has
never been bumped.

23 months agoDocs: update URL in Argument Clinic CLI help text (#113351)
Erlend E. Aasland [Thu, 21 Dec 2023 09:28:43 +0000 (10:28 +0100)] 
Docs: update URL in Argument Clinic CLI help text (#113351)

The Argument Clinic docs was moved to the devguide earlier in 2023.

23 months agoDocs: OpenSSL wording ambiguity (#113296)
Jan Brasna [Thu, 21 Dec 2023 07:50:25 +0000 (08:50 +0100)] 
Docs: OpenSSL wording ambiguity (#113296)

23 months agogh-112305: Fix check-clean-src to detect frozen_modules .h files. (#113344)
Gregory P. Smith [Thu, 21 Dec 2023 07:32:13 +0000 (23:32 -0800)] 
gh-112305: Fix check-clean-src to detect frozen_modules .h files. (#113344)

A typo left this check broken so many of us who do out-of-tree builds
were seeing strange failures due to bad `Python/frozen_modules/*.h`
files being picked up from the source tree and used at build time from
different Python versions leading to errors like:

`Fatal Python error: _PyImport_InitCore: failed to initialize importlib`

Or similar once our build got to an "invoke the interpreter"
bootstrapping step due to incorrect bytecode being embedded.

23 months agogh-111375: Use `NULL` rather than `None` in the exception stack to indicate that...
Carey Metcalfe [Thu, 21 Dec 2023 01:46:41 +0000 (20:46 -0500)] 
gh-111375: Use `NULL` rather than `None` in the exception stack to indicate that an exception was handled (#113302)

23 months agoGH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334)
Martijn Pieters [Wed, 20 Dec 2023 23:09:01 +0000 (23:09 +0000)] 
GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334)

When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.

This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).

23 months agogh-113330: Fix mimalloc headers reference (#113331)
Sam Gross [Wed, 20 Dec 2023 21:07:17 +0000 (16:07 -0500)] 
gh-113330: Fix mimalloc headers reference (#113331)

The `MIMALLOC_HEADERS` variable is defined in the Makefile.pre.in, not
the configure script, so we should use the `$(MIMALLOC_HEADERS)` syntax
instead of the `@MIMALLOC_HEADERS@` syntax.

23 months agoGH-111485: Fix DEFAULT_OUTPUT in opcode_metadata_generator.py (#113324)
Guido van Rossum [Wed, 20 Dec 2023 18:05:48 +0000 (10:05 -0800)] 
GH-111485: Fix DEFAULT_OUTPUT in opcode_metadata_generator.py (#113324)

23 months agogh-113257: Automatically generate pip SBOM metadata from wheel (#113295)
Seth Michael Larson [Wed, 20 Dec 2023 17:28:20 +0000 (11:28 -0600)] 
gh-113257: Automatically generate pip SBOM metadata from wheel (#113295)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months agogh-113255: Clarify docs for `typing.reveal_type` (#113286)
Kir [Wed, 20 Dec 2023 17:21:23 +0000 (02:21 +0900)] 
gh-113255: Clarify docs for `typing.reveal_type` (#113286)

Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
23 months agoGH-111485: Generate `TARGET` table for computed goto dispatch. (GH-113319)
Mark Shannon [Wed, 20 Dec 2023 15:09:12 +0000 (15:09 +0000)] 
GH-111485: Generate `TARGET` table for computed goto dispatch. (GH-113319)

23 months agoGH-111485: Generate instruction and uop metadata (GH-113287)
Mark Shannon [Wed, 20 Dec 2023 14:27:25 +0000 (14:27 +0000)] 
GH-111485: Generate instruction and uop metadata (GH-113287)

23 months agogh-111178: Make slot functions in typeobject.c have compatible types (GH-112752)
Christopher Chavez [Wed, 20 Dec 2023 14:13:44 +0000 (08:13 -0600)] 
gh-111178: Make slot functions in typeobject.c have compatible types (GH-112752)

23 months agogh-112205: Support docstring for `@getter` (#113160)
Donghee Na [Wed, 20 Dec 2023 12:52:12 +0000 (12:52 +0000)] 
gh-112205: Support docstring for `@getter` (#113160)

---------

Co-authored-by: Erlend E. Aasland <erlend@python.org>
23 months agoFix typo in datamodel docs (#113314)
Rodrigo Girão Serrão [Wed, 20 Dec 2023 11:58:38 +0000 (11:58 +0000)] 
Fix typo in datamodel docs (#113314)

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
23 months agoFix typo in collections.abc docs example (#113310)
David Greaves [Wed, 20 Dec 2023 09:51:16 +0000 (09:51 +0000)] 
Fix typo in collections.abc docs example (#113310)

Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"

23 months agoadd Ujan to ACKS for work on enum docs (GH-113301)
Ethan Furman [Wed, 20 Dec 2023 01:55:24 +0000 (17:55 -0800)] 
add Ujan to ACKS for work on enum docs (GH-113301)

23 months agogh-111973: Update Windows installer to use SQLite 3.44.2 (#113281)
Erlend E. Aasland [Tue, 19 Dec 2023 22:31:52 +0000 (23:31 +0100)] 
gh-111973: Update Windows installer to use SQLite 3.44.2 (#113281)

23 months agogh-87264: Convert tarinfo type to stat type (GH-113230)
Marat Idrisov [Tue, 19 Dec 2023 19:04:43 +0000 (22:04 +0300)] 
gh-87264: Convert tarinfo type to stat type (GH-113230)

Co-authored-by: val-shkolnikov <val@nvsoft.net>
23 months agogh-111973: Update macOS installer to use SQLite 3.44.2 (GH-113279)
Erlend E. Aasland [Tue, 19 Dec 2023 18:23:52 +0000 (19:23 +0100)] 
gh-111973: Update macOS installer to use SQLite 3.44.2 (GH-113279)

23 months agogh-101100: Fix Sphinx warnings in `library/ast.rst` (#113289)
Hugo van Kemenade [Tue, 19 Dec 2023 15:44:57 +0000 (17:44 +0200)] 
gh-101100: Fix Sphinx warnings in `library/ast.rst` (#113289)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months agogh-112205: Require @getter and @setter to be methods (#113278)
Erlend E. Aasland [Tue, 19 Dec 2023 11:32:28 +0000 (12:32 +0100)] 
gh-112205: Require @getter and @setter to be methods (#113278)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months agogh-113054: Compiler no longer replaces a redundant jump with no line number by a...
Irit Katriel [Tue, 19 Dec 2023 11:04:44 +0000 (11:04 +0000)] 
gh-113054: Compiler no longer replaces a redundant jump with no line number by a NOP (#113139)

23 months agogh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)
ryan-duve [Tue, 19 Dec 2023 10:29:55 +0000 (05:29 -0500)] 
gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)

23 months agogh-113208: Mention namespace packages don't require __init__.py (#113209)
Unique-Usman [Tue, 19 Dec 2023 08:39:57 +0000 (14:09 +0530)] 
gh-113208: Mention namespace packages don't require __init__.py (#113209)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
23 months agogh-113257: Fix SBOM metadata for pip 23.3.2 (#113262)
Seth Michael Larson [Tue, 19 Dec 2023 06:34:53 +0000 (00:34 -0600)] 
gh-113257: Fix SBOM metadata for pip 23.3.2 (#113262)

Fix SBOM metadata for pip 23.3.2

23 months agogh-113269: IDLE - Fix test_editor hang (macOS) (#113271)
Terry Jan Reedy [Tue, 19 Dec 2023 05:26:11 +0000 (00:26 -0500)] 
gh-113269: IDLE - Fix test_editor hang (macOS) (#113271)

Hangs on installed 3.13.0a2 on macOS Catalina.
Behavior on installed 3.12.1 and 3.11.7 is unknown.

23 months agogh-113119: Fix the macOS framework installer build (#113268)
Gregory P. Smith [Tue, 19 Dec 2023 05:18:30 +0000 (21:18 -0800)] 
gh-113119: Fix the macOS framework installer build (#113268)

`--enable-framework` builds were failing.  we apparently do not have good CI & buildbot coverage here.

23 months agogh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942)
Ronald Oussoren [Mon, 18 Dec 2023 23:51:58 +0000 (00:51 +0100)] 
gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.

23 months agogh-108269: Add CFBundleAllowMixedLocalizations to Info.plist on macOS (GH-113213)
Ronald Oussoren [Mon, 18 Dec 2023 23:41:41 +0000 (00:41 +0100)] 
gh-108269: Add CFBundleAllowMixedLocalizations to Info.plist on macOS (GH-113213)

Adding this key with a value of true enables detecting the
users prefered language in libraries accessing system APIs
for this.

23 months agogh-113199: Make read1() and readline() of HTTPResponse close IO after reading all...
Illia Volochii [Mon, 18 Dec 2023 20:17:16 +0000 (22:17 +0200)] 
gh-113199: Make read1() and readline() of HTTPResponse close IO after reading all data (GH-113200)

23 months agogh-113039: Avoid using leading dots in the include path for frozen getpath.py (GH...
Itamar Oren [Mon, 18 Dec 2023 17:04:40 +0000 (09:04 -0800)] 
gh-113039: Avoid using leading dots in the include path for frozen getpath.py (GH-113022)

23 months agogh-112535: Implement fallback implementation of _Py_ThreadId() (gh-113185)
Donghee Na [Mon, 18 Dec 2023 16:54:49 +0000 (16:54 +0000)] 
gh-112535: Implement fallback implementation of _Py_ThreadId() (gh-113185)

---------

Co-authored-by: Sam Gross <colesbury@gmail.com>
23 months agogh-108113: [docs] mention PyCF_OPTIMIZED_AST in ast Compiler Flags (#113241)
dreamflow [Mon, 18 Dec 2023 16:14:15 +0000 (17:14 +0100)] 
gh-108113: [docs] mention PyCF_OPTIMIZED_AST in ast Compiler Flags (#113241)

23 months agoGH-111485: Break up instructions with unused cache entries into component micro-ops...
Mark Shannon [Mon, 18 Dec 2023 13:16:45 +0000 (13:16 +0000)] 
GH-111485: Break up instructions with unused cache entries into component micro-ops (GH-113169)

23 months agoGH-111485: Test the new cases generator (GH-113252)
Mark Shannon [Mon, 18 Dec 2023 11:14:40 +0000 (11:14 +0000)] 
GH-111485: Test the new cases generator (GH-113252)

23 months agogh-113246: Updated bundled pip to 23.3.2 (gh-113249)
Stéphane Bidoul [Mon, 18 Dec 2023 10:21:46 +0000 (11:21 +0100)] 
gh-113246: Updated bundled pip to 23.3.2 (gh-113249)

Updated bundled pip to 23.3.2

23 months agogh-101100: Fix Sphinx warnings in library/tarfile.rst (#113237)
Hugo van Kemenade [Mon, 18 Dec 2023 06:57:45 +0000 (08:57 +0200)] 
gh-101100: Fix Sphinx warnings in library/tarfile.rst (#113237)

Fix Sphinx warnings in library/tarfile.rst

23 months agogh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118)
Jakub Kulík [Sun, 17 Dec 2023 21:34:57 +0000 (22:34 +0100)] 
gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118)

Add support for `os.POSIX_SPAWN_CLOSEFROM` and
`posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use
them when available.  This means `posix_spawn` can now be used in the default
`close_fds=True` situation on many platforms.

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
23 months agoDocs: Add label to grammar spec for linking from PEPs (#113235)
Hugo van Kemenade [Sun, 17 Dec 2023 19:23:14 +0000 (21:23 +0200)] 
Docs: Add label to grammar spec for linking from PEPs (#113235)

23 months agogh-113149: Improve error message when JSON has trailing comma (GH-113227)
Carson Radtke [Sun, 17 Dec 2023 18:52:26 +0000 (12:52 -0600)] 
gh-113149: Improve error message when JSON has trailing comma (GH-113227)

23 months agogh-112890: `unittest` Test Discovery page updated "`unittest` dropped the namspace...
Taylor Packard [Sun, 17 Dec 2023 11:14:21 +0000 (06:14 -0500)] 
gh-112890: `unittest` Test Discovery page updated "`unittest` dropped the namspace packages support" (GH-113195)

23 months agogh-113119 fix environment handling in subprocess.Popen when posix_spawn is used ...
Jakub Kulík [Sun, 17 Dec 2023 05:19:05 +0000 (06:19 +0100)] 
gh-113119 fix environment handling in subprocess.Popen when posix_spawn is used (#113120)

* Allow posix_spawn to inherit environment form parent environ variable.

With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.

23 months agoIDLE: Add util and stub example comments (#113222)
Terry Jan Reedy [Sun, 17 Dec 2023 00:51:25 +0000 (19:51 -0500)] 
IDLE: Add util and stub example comments (#113222)

23 months agoGH-110109: pathlib tests: store base directory as test class attribute (#113221)
Barney Gale [Sun, 17 Dec 2023 00:07:32 +0000 (00:07 +0000)] 
GH-110109: pathlib tests: store base directory as test class attribute (#113221)

Store the test base directory as a class attribute named `base` rather than
module constants named `BASE`.

The base directory is a local file path, and therefore not ideally suited
to the pathlib ABC tests. In a future commit we'll change its value in
`test_pathlib_abc.py` such that it points to a totally fictitious path, which
will help to ensure we're not touching the local filesystem.

23 months agoGH-110109: Move tests for pathlib ABCs to new module. (#112904)
Barney Gale [Sat, 16 Dec 2023 19:04:33 +0000 (19:04 +0000)] 
GH-110109: Move tests for pathlib ABCs to new module. (#112904)

23 months agogh-113202: Add a strict option to itertools.batched() (gh-113203)
Raymond Hettinger [Sat, 16 Dec 2023 15:13:50 +0000 (09:13 -0600)] 
gh-113202: Add a strict option to itertools.batched() (gh-113203)

23 months agogh-67790: Support basic formatting for Fraction (#111320)
Mark Dickinson [Sat, 16 Dec 2023 10:58:31 +0000 (10:58 +0000)] 
gh-67790: Support basic formatting for Fraction (#111320)

PR #100161 added fancy float-style formatting for the Fraction type,
but left us in a state where basic formatting for fractions (alignment,
fill, minimum width, thousands separators) still wasn't supported.

This PR adds that support.

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months agogh-113046: Revise csv.reader doc (#113207)
Terry Jan Reedy [Sat, 16 Dec 2023 08:12:39 +0000 (03:12 -0500)] 
gh-113046: Revise csv.reader doc (#113207)

Clarify nature of csvfile.

23 months agogh-111964: Add _PyRWMutex a "readers-writer" lock (gh-112859)
Sam Gross [Sat, 16 Dec 2023 01:56:55 +0000 (20:56 -0500)] 
gh-111964: Add _PyRWMutex a "readers-writer" lock (gh-112859)

This adds `_PyRWMutex`, a "readers-writer" lock, which wil be used to
serialize global stop-the-world pauses with per-interpreter pauses.

23 months agoAdd reshape() recipe to demonstrate a use case for batched() and chained.from_iterabl...
Raymond Hettinger [Sat, 16 Dec 2023 00:03:44 +0000 (18:03 -0600)] 
Add reshape() recipe to demonstrate a use case for batched() and chained.from_iterable() (gh-113198)

23 months agogh-110746: Improve markup in ``tkinter.ttk.rst`` (#111236)
Akshat Khandelwal [Fri, 15 Dec 2023 20:53:16 +0000 (02:23 +0530)] 
gh-110746: Improve markup in ``tkinter.ttk.rst`` (#111236)

* gh-110746: Improve markup in tkinter.ttk.rst

* gh-110746: Improve markup in tkinter.ttk.rst

* 📜🤖 Added by blurb_it.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
23 months agoGH-112383: Fix test_loop_quicken when an executor is installed (GH-113153)
Brandt Bucher [Fri, 15 Dec 2023 17:27:57 +0000 (09:27 -0800)] 
GH-112383: Fix test_loop_quicken when an executor is installed (GH-113153)

23 months agogh-101100: Fix various Sphinx warnings for dunder references in the `library/` direct...
Alex Waygood [Fri, 15 Dec 2023 17:15:34 +0000 (17:15 +0000)] 
gh-101100: Fix various Sphinx warnings for dunder references in the `library/` directory (#113163)

23 months agogh-101100: Fix Sphinx nitpicks in `library/numbers.rst` (#113162)
Alex Waygood [Fri, 15 Dec 2023 17:05:12 +0000 (17:05 +0000)] 
gh-101100: Fix Sphinx nitpicks in `library/numbers.rst` (#113162)

23 months agogh-113172: Fix compiler warnings in Modules/_xxinterpqueuesmodule.c (GH-113173)
Serhiy Storchaka [Fri, 15 Dec 2023 15:36:25 +0000 (17:36 +0200)] 
gh-113172: Fix compiler warnings in Modules/_xxinterpqueuesmodule.c (GH-113173)

Fix compiler waarnings in Modules/_xxinterpqueuesmodule.c

23 months ago[CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (#111116)
Victor Stinner [Fri, 15 Dec 2023 15:10:40 +0000 (16:10 +0100)] 
[CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (#111116)

Detect email address parsing errors and return empty tuple to
indicate the parsing error (old API). Add an optional 'strict'
parameter to getaddresses() and parseaddr() functions. Patch by
Thomas Dwyer.

Co-Authored-By: Thomas Dwyer <github@tomd.tel>