]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
22 months agogh-57795: Add news to idlelib/News3.txt (#113522)
Terry Jan Reedy [Wed, 27 Dec 2023 20:51:49 +0000 (15:51 -0500)] 
gh-57795: Add news to idlelib/News3.txt (#113522)

22 months agogh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream...
Stanley [Wed, 27 Dec 2023 17:16:36 +0000 (09:16 -0800)] 
gh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream (GH-31610)

22 months agobpo-26791: Update shutil.move() to provide the same symlink move behavior as the...
Jeffrey Kintscher [Wed, 27 Dec 2023 16:23:42 +0000 (08:23 -0800)] 
bpo-26791: Update shutil.move() to provide the same symlink move behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759)

22 months agoGH-110109: pathlib ABCs: drop use of `warnings._deprecated()` (#113419)
Barney Gale [Wed, 27 Dec 2023 15:40:03 +0000 (15:40 +0000)] 
GH-110109: pathlib ABCs: drop use of `warnings._deprecated()` (#113419)

The `pathlib._abc` module will be made available as a PyPI backport
supporting Python 3.8+. The `warnings._deprecated()` function was only
added last year, and it's private from an external package perspective, so
here we switch to `warnings.warn()` instead.

22 months agoGH-110109: pathlib ABCs: drop use of `io.text_encoding()` (#113417)
Barney Gale [Wed, 27 Dec 2023 15:32:35 +0000 (15:32 +0000)] 
GH-110109: pathlib ABCs: drop use of `io.text_encoding()` (#113417)

Do not use the locale-specific default encoding in `PathBase.read_text()`
and `write_text()`. Locale settings shouldn't influence the operation of
these base classes, which are intended mostly for implementing rich paths
on *nonlocal* filesystems.

22 months agogh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593)
Zackery Spytz [Wed, 27 Dec 2023 14:27:40 +0000 (06:27 -0800)] 
gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593)

Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
22 months agogh-64020: Deprecate pydoc.ispackage() (GH-20908)
Zackery Spytz [Wed, 27 Dec 2023 14:04:31 +0000 (06:04 -0800)] 
gh-64020: Deprecate pydoc.ispackage() (GH-20908)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
22 months agogh-101100: Fix Sphinx warnings in `library/cmd.rst` (#113502)
Hugo van Kemenade [Wed, 27 Dec 2023 10:17:30 +0000 (12:17 +0200)] 
gh-101100: Fix Sphinx warnings in `library/cmd.rst` (#113502)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
22 months agogh-101100: Fix Sphinx warnings in `library/calendar.rst` (#113500)
Hugo van Kemenade [Wed, 27 Dec 2023 09:36:17 +0000 (11:36 +0200)] 
gh-101100: Fix Sphinx warnings in `library/calendar.rst` (#113500)

22 months agogh-111615: Fix regression in QueueHandler configuration. (GH-111638)
Vinay Sajip [Wed, 27 Dec 2023 09:35:15 +0000 (09:35 +0000)] 
gh-111615: Fix regression in QueueHandler configuration. (GH-111638)

22 months agogh-113350: Improve the wording of python logging docs to remove an ambiguity around...
Vaishnavi Maheshwari [Wed, 27 Dec 2023 07:51:45 +0000 (13:21 +0530)] 
gh-113350: Improve the wording of python logging docs to remove an ambiguity around use of the word "higher". (GH-113491)

Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
22 months agogh-113332: Simplify calls to SSL_(CTX_)set_verify in _ssl.c (#113333)
David Benjamin [Tue, 26 Dec 2023 21:35:41 +0000 (16:35 -0500)] 
gh-113332: Simplify calls to SSL_(CTX_)set_verify in _ssl.c (#113333)

_ssl.c currently tries to preserve the verification callback, but at no
point does it ever set one. Just pass in NULL.

22 months agogh-101100: Fix Sphinx warnings in `library/bisect.rst` (#113496)
Hugo van Kemenade [Tue, 26 Dec 2023 21:12:15 +0000 (23:12 +0200)] 
gh-101100: Fix Sphinx warnings in `library/bisect.rst` (#113496)

22 months agogh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` (#113493)
Hugo van Kemenade [Tue, 26 Dec 2023 19:40:48 +0000 (21:40 +0200)] 
gh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` (#113493)

22 months agobpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408)
Gordon P. Hemsley [Tue, 26 Dec 2023 19:26:17 +0000 (14:26 -0500)] 
bpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408)

Previously some error messages complained about incompatible
combinations of directives that are not contained in the format string.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
22 months agogh-112532: Fix peg generator build.py for mimalloc build (gh-113492)
Donghee Na [Tue, 26 Dec 2023 17:54:16 +0000 (17:54 +0000)] 
gh-112532: Fix peg generator build.py for mimalloc build (gh-113492)

gh-112532: Fix peg generator for mimalloc build

22 months agogh-112532: Use separate mimalloc heaps for GC objects (gh-113263)
Sam Gross [Tue, 26 Dec 2023 16:53:20 +0000 (11:53 -0500)] 
gh-112532: Use separate mimalloc heaps for GC objects (gh-113263)

* gh-112532: Use separate mimalloc heaps for GC objects

In `--disable-gil` builds, we now use four separate heaps in
anticipation of using mimalloc to find GC objects when the GIL is
disabled. To support this, we also make a few changes to mimalloc:

* `mi_heap_t` and `mi_tld_t` initialization is split from allocation.
  This allows us to have a `mi_tld_t` per-`PyThreadState`, which is
  important to keep interpreter isolation, since the same OS thread may
  run in multiple interpreters (using different PyThreadStates.)

* Heap abandoning (mi_heap_collect_ex) can now be called from a
  different thread than the one that created the heap. This is necessary
  because we may clear and delete the containing PyThreadStates from a
  different thread during finalization and after fork().

* Use enum instead of defines and guard mimalloc includes.

* The enum typedef will be convenient for future PRs that use the type.
* Guarding the mimalloc includes allows us to unconditionally include
  pycore_mimalloc.h from other header files that rely on things like
  `struct _mimalloc_thread_state`.

* Only define _mimalloc_thread_state in Py_GIL_DISABLED builds

22 months agogh-111971: Make _PyUnicode_FromId thread-safe in --disable-gil (gh-113489)
Donghee Na [Tue, 26 Dec 2023 16:48:33 +0000 (16:48 +0000)] 
gh-111971: Make _PyUnicode_FromId thread-safe in --disable-gil (gh-113489)

22 months agoDocs: make htmllive: open browser when ready (#113288)
Hugo van Kemenade [Tue, 26 Dec 2023 12:02:13 +0000 (14:02 +0200)] 
Docs: make htmllive: open browser when ready (#113288)

22 months agogh-113468: Remove the "_new_ suffix from class names in pydocfodder (GH-113469)
Serhiy Storchaka [Tue, 26 Dec 2023 10:54:05 +0000 (12:54 +0200)] 
gh-113468: Remove the "_new_ suffix from class names in pydocfodder (GH-113469)

22 months agogh-66515: mailbox.MH now supports folders withou the ".mh_sequences" file (GH-804)
Serhiy Storchaka [Tue, 26 Dec 2023 09:15:14 +0000 (11:15 +0200)] 
gh-66515: mailbox.MH now supports folders withou the ".mh_sequences" file (GH-804)

(for example Claws Mail IMAP-cache folders).

22 months agoMisc minor improvements to the itertools recipes (gh-113477)
Raymond Hettinger [Mon, 25 Dec 2023 22:26:04 +0000 (16:26 -0600)] 
Misc minor improvements to the itertools recipes (gh-113477)

22 months agogh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call...
Yilei Yang [Mon, 25 Dec 2023 17:36:59 +0000 (09:36 -0800)] 
gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. (GH-113035)

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
22 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>
22 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)

22 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)

22 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)

22 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)

22 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().

22 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)

22 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)

22 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.

22 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.

22 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)

22 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.

22 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.

22 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)

22 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>
22 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().

22 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)

22 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)

22 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)

22 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.

22 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.

22 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>
22 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.

22 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.

22 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)

22 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.

22 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)

22 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>
22 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)

22 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)

22 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.

22 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)

22 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.

22 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)

22 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)

22 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>
22 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>
22 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.

22 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)

22 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>
22 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.

22 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.

22 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)

22 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.

22 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.

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

22 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.

22 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)

22 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).

22 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.

22 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)

22 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>
22 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>
22 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)

22 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)

22 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)

22 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>
22 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>
22 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"

22 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)

22 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)

22 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>
22 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)

22 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>
22 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>
22 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)

22 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)

22 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>
22 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

22 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.

22 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.

22 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.

22 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.

22 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)

22 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)

22 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>
22 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)