]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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>
23 months agogh-113009: Fix multiprocessing Process.terminate() on Windows (#113128)
Victor Stinner [Fri, 15 Dec 2023 14:57:49 +0000 (15:57 +0100)] 
gh-113009: Fix multiprocessing Process.terminate() on Windows (#113128)

On Windows, Process.terminate() no longer sets the returncode
attribute to always call WaitForSingleObject() in Process.wait().
Previously, sometimes the process was still running after
TerminateProcess() even if GetExitCodeProcess() is not STILL_ACTIVE.

23 months agogh-112278: Add retry in WMI tests in case of slow initialization (GH-113154)
AN Long [Fri, 15 Dec 2023 13:42:37 +0000 (21:42 +0800)] 
gh-112278: Add retry in WMI tests in case of slow initialization (GH-113154)

23 months agogh-61648: Detect line numbers of properties in doctests (GH-113161)
Serhiy Storchaka [Fri, 15 Dec 2023 13:24:30 +0000 (15:24 +0200)] 
gh-61648: Detect line numbers of properties in doctests (GH-113161)

23 months agoGH-111485: Mark some instructions as `TIER_ONE_ONLY` (GH-113155)
Brandt Bucher [Fri, 15 Dec 2023 13:03:17 +0000 (05:03 -0800)] 
GH-111485: Mark some instructions as `TIER_ONE_ONLY` (GH-113155)

23 months agogh-112720: Move dis's cache output code to the Formatter, labels lookup to the arg_re...
Irit Katriel [Fri, 15 Dec 2023 12:28:22 +0000 (12:28 +0000)] 
gh-112720: Move dis's cache output code to the Formatter, labels lookup to the arg_resolver. Reduce the number of parameters passed around. (#113108)

23 months agogh-101100: Fix Sphinx nitpicks in `library/rlcompleter.rst` (#113125)
Alex Waygood [Fri, 15 Dec 2023 08:57:23 +0000 (08:57 +0000)] 
gh-101100: Fix Sphinx nitpicks in `library/rlcompleter.rst` (#113125)

23 months agogh-112535: Update _Py_ThreadId() to support RISC-V (gh-113084)
Furkan Onder [Thu, 14 Dec 2023 23:42:33 +0000 (02:42 +0300)] 
gh-112535: Update _Py_ThreadId() to support RISC-V (gh-113084)

Update _Py_ThreadId() to support RISC-V

23 months agoOptimize unique_justseen() recipe for a common case. (gh-113147)
Raymond Hettinger [Thu, 14 Dec 2023 23:27:39 +0000 (17:27 -0600)] 
Optimize unique_justseen() recipe for a common case. (gh-113147)

23 months agogh-101100: Cleanup `mailbox` docs (#113124)
Alex Waygood [Thu, 14 Dec 2023 21:10:26 +0000 (21:10 +0000)] 
gh-101100: Cleanup `mailbox` docs (#113124)

23 months agogh-101100: Fix Sphinx warnings in `whatsnew/2.3.rst` (#112373)
Hugo van Kemenade [Thu, 14 Dec 2023 20:48:36 +0000 (22:48 +0200)] 
gh-101100: Fix Sphinx warnings in `whatsnew/2.3.rst` (#112373)

23 months agoRemove itertool recipe with low pedagogical value (gh-113138)
Raymond Hettinger [Thu, 14 Dec 2023 20:36:40 +0000 (14:36 -0600)] 
Remove itertool recipe with low pedagogical value (gh-113138)

23 months agogh-101100: Fix Sphinx nitpicks in `library/collections.abc.rst` (#113116)
Alex Waygood [Thu, 14 Dec 2023 19:25:55 +0000 (19:25 +0000)] 
gh-101100: Fix Sphinx nitpicks in `library/collections.abc.rst` (#113116)

23 months agoAdd recipe for totient() to demonstrate unique_justseen() and factor(). (gh-113131)
Raymond Hettinger [Thu, 14 Dec 2023 19:15:29 +0000 (13:15 -0600)] 
Add recipe for totient() to demonstrate unique_justseen() and factor(). (gh-113131)

23 months agogh-105912: document gotcha with using os.fork on macOS (#112871)
Ronald Oussoren [Thu, 14 Dec 2023 19:14:50 +0000 (20:14 +0100)] 
gh-105912: document gotcha with using os.fork on macOS (#112871)

* gh-105912: document gotcha with using os.fork on macOS

Using ``fork(2)`` on macOS when also using higher-level
system APIs in the parent proces can crash on macOS because
those system APIs are not written to handle this usage
pattern.

There's nothing we can do about this other than documenting
the problem.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
23 months agobpo-36796: Clean the error handling in _testcapimodule.c (GH-13085)
Zackery Spytz [Thu, 14 Dec 2023 19:06:53 +0000 (11:06 -0800)] 
bpo-36796: Clean the error handling in _testcapimodule.c (GH-13085)

23 months agoGH-111485: Sort metadata tables for easier checking of future diffs (GH-113101)
Mark Shannon [Thu, 14 Dec 2023 16:41:52 +0000 (16:41 +0000)] 
GH-111485: Sort metadata tables for easier checking of future diffs (GH-113101)

23 months agogh-113113: doc: use less ambiguously named variable (gh-113114)
jeremy-dolan [Thu, 14 Dec 2023 15:40:24 +0000 (10:40 -0500)] 
gh-113113: doc: use less ambiguously named variable (gh-113114)

23 months agogh-86179: Avoid making case-only changes when calculating realpath() during initializ...
Steve Dower [Thu, 14 Dec 2023 15:16:39 +0000 (15:16 +0000)] 
gh-86179: Avoid making case-only changes when calculating realpath() during initialization (GH-113077)

23 months agoGH-112354: Treat _EXIT_TRACE like an unconditional side exit (GH-113104)
Mark Shannon [Thu, 14 Dec 2023 14:26:44 +0000 (14:26 +0000)] 
GH-112354: Treat _EXIT_TRACE like an unconditional side exit (GH-113104)

23 months agogh-101100: Fix Sphinx nitpicks in `library/traceback.rst` (#113106)
Alex Waygood [Thu, 14 Dec 2023 14:10:35 +0000 (14:10 +0000)] 
gh-101100: Fix Sphinx nitpicks in `library/traceback.rst` (#113106)

23 months agogh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts...
Alex Waygood [Thu, 14 Dec 2023 13:30:57 +0000 (13:30 +0000)] 
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` (#113107)

23 months agogh-112716: Fix SystemError when __builtins__ is not a dict (GH-112770)
Serhiy Storchaka [Thu, 14 Dec 2023 12:24:24 +0000 (14:24 +0200)] 
gh-112716: Fix SystemError when __builtins__ is not a dict (GH-112770)

It was raised in two cases:
* in the import statement when looking up __import__
* in pickling some builtin type when looking up built-ins iter, getattr, etc.

23 months agogh-112730: Update docs for colour env vars (#112837)
Hugo van Kemenade [Thu, 14 Dec 2023 11:36:48 +0000 (13:36 +0200)] 
gh-112730: Update docs for colour env vars (#112837)

23 months agogh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049)
Serhiy Storchaka [Thu, 14 Dec 2023 11:28:37 +0000 (13:28 +0200)] 
gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049)

23 months agogh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091)
Serhiy Storchaka [Thu, 14 Dec 2023 11:27:43 +0000 (13:27 +0200)] 
gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091)

23 months agogh-112205: Update textio module to use `@getter` as possible. (gh-113095)
Donghee Na [Thu, 14 Dec 2023 10:26:46 +0000 (10:26 +0000)] 
gh-112205: Update textio module to use `@getter` as possible. (gh-113095)

23 months agoFixing typo in DocTestRunner docs (GH-112326)
Daniel Wysocki [Thu, 14 Dec 2023 10:07:37 +0000 (04:07 -0600)] 
Fixing typo in DocTestRunner docs (GH-112326)

23 months agogh-111049: Fix crash during garbage collection of the BytesIO buffer object (GH-111221)
Serhiy Storchaka [Thu, 14 Dec 2023 10:04:23 +0000 (12:04 +0200)] 
gh-111049: Fix crash during garbage collection of the BytesIO buffer object (GH-111221)

23 months agogh-90890: Reorder mailbox.Maildir method documentation (GH-113071)
Stephen Gildea [Thu, 14 Dec 2023 07:53:08 +0000 (23:53 -0800)] 
gh-90890: Reorder mailbox.Maildir method documentation (GH-113071)

When new mailbox.Maildir methods were added for 3.13.0a2, their
documentation was added at the end of the mailbox.Maildir section
instead of grouping them with other methods Maildir adds to Mailbox.

This commit moves the new methods' documentation adjacent to
documentation for existing Maildir-specific methods, so that
the "special remarks" for common methods remains at the end.

23 months agogh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087)
Serhiy Storchaka [Thu, 14 Dec 2023 07:16:06 +0000 (09:16 +0200)] 
gh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087)

Also make test_copymode_symlink_to_symlink in test_shutil more strict.

23 months agogh-86179: Implement realpath() on Windows for getpath.py calculations (GH-113033)
Steve Dower [Wed, 13 Dec 2023 23:41:43 +0000 (23:41 +0000)] 
gh-86179: Implement realpath() on Windows for getpath.py calculations (GH-113033)

23 months agoMove optimizer/executor tests to new file test_capi/test_opt.py (#113072)
Guido van Rossum [Wed, 13 Dec 2023 21:49:29 +0000 (13:49 -0800)] 
Move optimizer/executor tests to new file test_capi/test_opt.py (#113072)

23 months agobpo-40648: Test modes that file can get with chmod() on Windows (GH-20130)
Pavol Babinčák‏ [Wed, 13 Dec 2023 20:23:13 +0000 (21:23 +0100)] 
bpo-40648: Test modes that file can get with chmod() on Windows (GH-20130)

Order of tests matter second part makes testing file writable and
possible to remove again.

23 months agogh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960)
Christoph Anton Mitterer [Wed, 13 Dec 2023 19:55:31 +0000 (20:55 +0100)] 
gh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960)

POSIX specifies that implementations are not required to support changing the
file mode of symbolic links, but may do so.
Consequently, `lchmod()` is not part of POSIX (but mentioned for implementations
which do support the above).

The current wording of the availability of `os.lchmod()` is rather vague and
improved to clearly tell which POSIX/Unix/BSD-like support the function in
general (those that support changing the file mode of symbolic links).
Further, some examples of major implementations are added.

Data for the BSDs taken from their online manpages.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
23 months agoDocs: Fix external link to devguide.python.org (GH-112899)
Miro Hrončok [Wed, 13 Dec 2023 19:37:13 +0000 (20:37 +0100)] 
Docs: Fix external link to devguide.python.org (GH-112899)

23 months agogh-101100: Improve docs on exception attributes (GH-113057)
Alex Waygood [Wed, 13 Dec 2023 18:59:36 +0000 (18:59 +0000)] 
gh-101100: Improve docs on exception attributes (GH-113057)

* Improve docs on exception attributes

* thanks sphinx-lint

* fix doctests

* argh, okay, give up on doctests

* Various improvements

23 months agoUse match/case in grouper() recipe (gh-113059)
Raymond Hettinger [Wed, 13 Dec 2023 18:11:52 +0000 (12:11 -0600)] 
Use match/case in grouper() recipe (gh-113059)

Use match/case in grouper() reciper

23 months agogh-76785: Fix CODEOWNERS (gh-113038)
Eric Snow [Wed, 13 Dec 2023 16:29:40 +0000 (09:29 -0700)] 
gh-76785: Fix CODEOWNERS (gh-113038)

In gh-112982 I made some changes to .github/CODEOWNERS.  Later, @ezio-melotti pointed out that some of those changes were unnecessary.