Commit Graph

120149 Commits

Author SHA1 Message Date
Stéphane Bidoul 4a24bf9a13
gh-113246: Updated bundled pip to 23.3.2 (gh-113249)
Updated bundled pip to 23.3.2
2023-12-18 10:21:46 +00:00
Hugo van Kemenade f428c4dafb
gh-101100: Fix Sphinx warnings in library/tarfile.rst (#113237)
Fix Sphinx warnings in library/tarfile.rst
2023-12-18 08:57:45 +02:00
Jakub Kulík 2b93f52242
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>
2023-12-17 21:34:57 +00:00
Hugo van Kemenade 32d87a8899
Docs: Add label to grammar spec for linking from PEPs (#113235) 2023-12-17 12:23:14 -07:00
Carson Radtke cfa25fe3e3
gh-113149: Improve error message when JSON has trailing comma (GH-113227) 2023-12-17 20:52:26 +02:00
Taylor Packard 21d52995ea
gh-112890: `unittest` Test Discovery page updated "`unittest` dropped the namspace packages support" (GH-113195) 2023-12-17 13:14:21 +02:00
Jakub Kulík 48c907a15c
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.
2023-12-17 05:19:05 +00:00
Terry Jan Reedy cde1335485
IDLE: Add util and stub example comments (#113222) 2023-12-17 00:51:25 +00:00
Barney Gale 2f0ec7fa94
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.
2023-12-17 00:07:32 +00:00
Barney Gale d91e43ed78
GH-110109: Move tests for pathlib ABCs to new module. (#112904) 2023-12-16 19:04:33 +00:00
Raymond Hettinger 1583c40be9
gh-113202: Add a strict option to itertools.batched() (gh-113203) 2023-12-16 09:13:50 -06:00
Mark Dickinson fe479fb8a9
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>
2023-12-16 10:58:31 +00:00
Terry Jan Reedy 84df3172ef
gh-113046: Revise csv.reader doc (#113207)
Clarify nature of csvfile.
2023-12-16 03:12:39 -05:00
Sam Gross 5ae75e1be2
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.
2023-12-15 18:56:55 -07:00
Raymond Hettinger 40574da019
Add reshape() recipe to demonstrate a use case for batched() and chained.from_iterable() (gh-113198) 2023-12-15 18:03:44 -06:00
Akshat Khandelwal 00d2b6d1fc
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>
2023-12-15 21:53:16 +01:00
Brandt Bucher d07483292b
GH-112383: Fix test_loop_quicken when an executor is installed (GH-113153) 2023-12-15 17:27:57 +00:00
Alex Waygood 1addde0c69
gh-101100: Fix various Sphinx warnings for dunder references in the `library/` directory (#113163) 2023-12-15 19:15:34 +02:00
Alex Waygood c2c4879b0a
gh-101100: Fix Sphinx nitpicks in `library/numbers.rst` (#113162) 2023-12-15 19:05:12 +02:00
Serhiy Storchaka e365c943f2
gh-113172: Fix compiler warnings in Modules/_xxinterpqueuesmodule.c (GH-113173)
Fix compiler waarnings in Modules/_xxinterpqueuesmodule.c
2023-12-15 17:36:25 +02:00
Victor Stinner 4a153a1d3b
[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>
2023-12-15 16:10:40 +01:00
Victor Stinner 4026ad5b2c
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.
2023-12-15 15:57:49 +01:00
AN Long d1a2adfb08
gh-112278: Add retry in WMI tests in case of slow initialization (GH-113154) 2023-12-15 13:42:37 +00:00
Serhiy Storchaka 8f8f0f97e1
gh-61648: Detect line numbers of properties in doctests (GH-113161) 2023-12-15 15:24:30 +02:00
Brandt Bucher 737d23ffcd
GH-111485: Mark some instructions as `TIER_ONE_ONLY` (GH-113155) 2023-12-15 13:03:17 +00:00
Irit Katriel 55ef998a8d
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) 2023-12-15 12:28:22 +00:00
Alex Waygood 7bb00f053e
gh-101100: Fix Sphinx nitpicks in `library/rlcompleter.rst` (#113125) 2023-12-15 10:57:23 +02:00
Furkan Onder f34e22c647
gh-112535: Update _Py_ThreadId() to support RISC-V (gh-113084)
Update _Py_ThreadId() to support RISC-V
2023-12-15 08:42:33 +09:00
Raymond Hettinger 5f7d7353b4
Optimize unique_justseen() recipe for a common case. (gh-113147) 2023-12-14 17:27:39 -06:00
Alex Waygood 25061f5c98
gh-101100: Cleanup `mailbox` docs (#113124) 2023-12-14 14:10:26 -07:00
Hugo van Kemenade 961f1043a0
gh-101100: Fix Sphinx warnings in `whatsnew/2.3.rst` (#112373) 2023-12-14 13:48:36 -07:00
Raymond Hettinger becad9a2a1
Remove itertool recipe with low pedagogical value (gh-113138) 2023-12-14 14:36:40 -06:00
Alex Waygood 006355b2a9
gh-101100: Fix Sphinx nitpicks in `library/collections.abc.rst` (#113116) 2023-12-14 19:25:55 +00:00
Raymond Hettinger 93cf7358d9
Add recipe for totient() to demonstrate unique_justseen() and factor(). (gh-113131) 2023-12-14 13:15:29 -06:00
Ronald Oussoren 22511f77c2
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>
2023-12-14 20:14:50 +01:00
Zackery Spytz a723a13bf1
bpo-36796: Clean the error handling in _testcapimodule.c (GH-13085) 2023-12-14 19:06:53 +00:00
Mark Shannon e24eccbc1c
GH-111485: Sort metadata tables for easier checking of future diffs (GH-113101) 2023-12-14 16:41:52 +00:00
jeremy-dolan fb4cb7ce31
gh-113113: doc: use less ambiguously named variable (gh-113114) 2023-12-14 15:40:24 +00:00
Steve Dower fd81afc624
gh-86179: Avoid making case-only changes when calculating realpath() during initialization (GH-113077) 2023-12-14 15:16:39 +00:00
Mark Shannon 6873555955
GH-112354: Treat _EXIT_TRACE like an unconditional side exit (GH-113104) 2023-12-14 14:26:44 +00:00
Alex Waygood d9e1b5794a
gh-101100: Fix Sphinx nitpicks in `library/traceback.rst` (#113106) 2023-12-14 14:10:35 +00:00
Alex Waygood 4b3cb082da
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` (#113107) 2023-12-14 13:30:57 +00:00
Serhiy Storchaka 1161c14e8c
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.
2023-12-14 14:24:24 +02:00
Hugo van Kemenade 12f0bbd6e0
gh-112730: Update docs for colour env vars (#112837) 2023-12-14 13:36:48 +02:00
Serhiy Storchaka 29f7eb4859
gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049) 2023-12-14 13:28:37 +02:00
Serhiy Storchaka c6e953be12
gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091) 2023-12-14 13:27:43 +02:00
Donghee Na 23a5711100
gh-112205: Update textio module to use `@getter` as possible. (gh-113095) 2023-12-14 10:26:46 +00:00
Daniel Wysocki b3c21265fa
Fixing typo in DocTestRunner docs (GH-112326) 2023-12-14 12:07:37 +02:00
Serhiy Storchaka bb36f72efc
gh-111049: Fix crash during garbage collection of the BytesIO buffer object (GH-111221) 2023-12-14 10:04:23 +00:00
Stephen Gildea 4d5d9acb22
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.
2023-12-14 09:53:08 +02:00