]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
17 months agogh-111259: Document idiomatic RE pattern (?s:.) that matches any character (GH-120745)
Serhiy Storchaka [Thu, 20 Jun 2024 21:03:49 +0000 (00:03 +0300)] 
gh-111259: Document idiomatic RE pattern (?s:.) that matches any character (GH-120745)

17 months agogh-119182: Use public PyUnicodeWriter in contextvar_tp_repr() (#120809)
Victor Stinner [Thu, 20 Jun 2024 19:56:47 +0000 (21:56 +0200)] 
gh-119182: Use public PyUnicodeWriter in contextvar_tp_repr() (#120809)

The public PyUnicodeWriter API enables overallocation by default and
so is more efficient. It also makes the code simpler and shorter.

17 months agogh-119182: Optimize PyUnicode_FromFormat() (#120796)
Victor Stinner [Thu, 20 Jun 2024 19:06:16 +0000 (21:06 +0200)] 
gh-119182: Optimize PyUnicode_FromFormat() (#120796)

Use strchr() and ucs1lib_find_max_char() to optimize the code path
formatting sub-strings between '%' formats.

17 months agogh-120801: Refactor importlib.metadata fixtures. (#120803)
Jason R. Coombs [Thu, 20 Jun 2024 19:00:39 +0000 (15:00 -0400)] 
gh-120801: Refactor importlib.metadata fixtures. (#120803)

These changes released with importlib_metadata 7.2.0.

17 months agogh-119182: Use public PyUnicodeWriter API in union_repr() (#120797)
Victor Stinner [Thu, 20 Jun 2024 18:39:34 +0000 (20:39 +0200)] 
gh-119182: Use public PyUnicodeWriter API in union_repr() (#120797)

The public PyUnicodeWriter API enables overallocation by default and
so is more efficient.

Benchmark:

python -m pyperf timeit \
    -s 't = int | float | complex | str | bytes | bytearray' \
       ' | memoryview | list | dict' \
    'str(t)'

Result:

1.29 us +- 0.02 us -> 1.00 us +- 0.02 us: 1.29x faster

17 months agogh-119182: Use public PyUnicodeWriter API in ga_repr() (#120799)
Victor Stinner [Thu, 20 Jun 2024 18:35:35 +0000 (20:35 +0200)] 
gh-119182: Use public PyUnicodeWriter API in ga_repr() (#120799)

The public PyUnicodeWriter API enables overallocation by default and
so is more efficient.

Benchmark:

python -m pyperf timeit \
    -s 't = list[int, float, complex, str, bytes, bytearray, ' \
                 'memoryview, list, dict]' \
    'str(t)'

Result:

1.49 us +- 0.03 us -> 1.10 us +- 0.02 us: 1.35x faster

17 months agogh-120769: Add pdb meta command to print frame status. (#120770)
Tian Gao [Thu, 20 Jun 2024 17:38:07 +0000 (10:38 -0700)] 
gh-120769: Add pdb meta command to print frame status. (#120770)

17 months agogh-117511: Make PyMutex public in the non-limited API (#117731)
Sam Gross [Thu, 20 Jun 2024 15:29:08 +0000 (11:29 -0400)] 
gh-117511: Make PyMutex public in the non-limited API (#117731)

17 months agogh-120780: Show attribute name for LOAD_SPECIAL in dis output (#120781)
Jelle Zijlstra [Thu, 20 Jun 2024 14:07:24 +0000 (07:07 -0700)] 
gh-120780: Show attribute name for LOAD_SPECIAL in dis output (#120781)

17 months agogh-98442: fix locations of with statement's cleanup instructions (#120763)
Irit Katriel [Thu, 20 Jun 2024 08:32:06 +0000 (09:32 +0100)] 
gh-98442: fix locations of with statement's cleanup instructions (#120763)

gh-98442: fix location of with statement's cleanup instructions

17 months agogh-111259: Optimize complementary character sets in RE (GH-120742)
Serhiy Storchaka [Thu, 20 Jun 2024 07:19:32 +0000 (10:19 +0300)] 
gh-111259: Optimize complementary character sets in RE (GH-120742)

Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled
to the same effective code as a dot with the DOTALL modifier ("(?s:.)").

17 months agogh-119698: symtable: Fix merge race (#120779)
Jelle Zijlstra [Thu, 20 Jun 2024 05:42:30 +0000 (22:42 -0700)] 
gh-119698: symtable: Fix merge race (#120779)

17 months agogh-119698: fix `symtable.Class.get_methods` and document its behaviour correctly...
Bénédikt Tran [Thu, 20 Jun 2024 03:49:30 +0000 (05:49 +0200)] 
gh-119698: fix `symtable.Class.get_methods` and document its behaviour correctly (#120151)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
17 months agoFix typos in comments (#120481)
Xie Yanbo [Thu, 20 Jun 2024 03:16:14 +0000 (11:16 +0800)] 
Fix typos in comments (#120481)

17 months agoGH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120604)
Xarblu [Thu, 20 Jun 2024 00:48:00 +0000 (02:48 +0200)] 
GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120604)

17 months agogh-120606: Allow EOF to exit pdb commands definition (#120607)
Tian Gao [Wed, 19 Jun 2024 22:50:26 +0000 (15:50 -0700)] 
gh-120606: Allow EOF to exit pdb commands definition (#120607)

17 months agogh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` ...
Nikita Sobolev [Wed, 19 Jun 2024 20:35:11 +0000 (23:35 +0300)] 
gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (#120737)

17 months agogh-118820: Zero-valued flag enum has no name (GH-118848)
Nice Zombies [Wed, 19 Jun 2024 20:09:53 +0000 (22:09 +0200)] 
gh-118820: Zero-valued flag enum has no name (GH-118848)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
17 months agoRegen ``Doc/requirements-oldest-sphinx.txt`` (#120753)
Kirill Podoprigora [Wed, 19 Jun 2024 19:21:12 +0000 (22:21 +0300)] 
Regen ``Doc/requirements-oldest-sphinx.txt`` (#120753)

17 months agogh-120521: clarify except* documentation to allow tuples (#120523)
Danny Yang [Wed, 19 Jun 2024 18:49:00 +0000 (14:49 -0400)] 
gh-120521: clarify except* documentation to allow tuples (#120523)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months agogh-119786: move locations doc to InternalDocs (#120445)
Irit Katriel [Wed, 19 Jun 2024 16:58:54 +0000 (17:58 +0100)] 
gh-119786: move locations doc to InternalDocs (#120445)

17 months agoGH-120097: Make FrameLocalsProxy a mapping (#120101)
Mark Shannon [Wed, 19 Jun 2024 16:54:13 +0000 (17:54 +0100)] 
GH-120097: Make FrameLocalsProxy a mapping (#120101)

* Register FrameLocalsProxy as a subclass of collections.abc.Mapping

* Allow FrameLocalsProxy to matching mapping patterns

17 months agoGH-119462: Enforce invariants of type versioning (GH-120731)
Mark Shannon [Wed, 19 Jun 2024 16:38:45 +0000 (17:38 +0100)] 
GH-119462: Enforce invariants of type versioning (GH-120731)

* Remove uses of Py_TPFLAGS_VALID_VERSION_TAG

17 months agogh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh-118322...
Nadeshiko Manju [Wed, 19 Jun 2024 15:34:39 +0000 (23:34 +0800)] 
gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh-118322 (GH-120712)

Co-authored-by: Ken Jin <kenjin4096@gmail.com>
17 months agoFix types in pegen parser generator (GH-120720)
yf-yang [Wed, 19 Jun 2024 14:12:40 +0000 (22:12 +0800)] 
Fix types in pegen parser generator (GH-120720)

17 months agogh-120733: rename internal compiler functions according to naming convention (#120734)
Irit Katriel [Wed, 19 Jun 2024 13:19:59 +0000 (14:19 +0100)] 
gh-120733: rename internal compiler functions according to naming convention (#120734)

17 months agogh-120635: Avoid leaking processes in test_pyrepl (#120676)
Victor Stinner [Wed, 19 Jun 2024 13:14:29 +0000 (15:14 +0200)] 
gh-120635: Avoid leaking processes in test_pyrepl (#120676)

If the child process takes longer than SHORT_TIMEOUT seconds to
complete, kill the process but then wait until it completes with no
timeout to not leak child processes.

17 months agogh-120722: Set position on RETURN_VALUE in lambda (#120724)
Jelle Zijlstra [Wed, 19 Jun 2024 12:56:36 +0000 (05:56 -0700)] 
gh-120722: Set position on RETURN_VALUE in lambda (#120724)

17 months agogh-119960: Add information about regex flags in re module functions (#119978)
Awbert [Wed, 19 Jun 2024 09:42:01 +0000 (12:42 +0300)] 
gh-119960: Add information about regex flags in re module functions (#119978)

17 months agogh-102797: Add more code snippets in test_ast (#102798)
Kirill Podoprigora [Wed, 19 Jun 2024 07:51:43 +0000 (10:51 +0300)] 
gh-102797: Add more code snippets in test_ast (#102798)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Nineteendo <nineteendo19d0@gmail.com>
17 months agogh-120726: Fix compiler warnings on is_core_module() (#120727)
Kirill Podoprigora [Wed, 19 Jun 2024 07:46:04 +0000 (10:46 +0300)] 
gh-120726: Fix compiler warnings on is_core_module() (#120727)

Fix compiler warnings on is_core_module() and
check_interpreter_whence(): only define them when
assertions are built.

17 months agoAdd a link to free-threading HOWTO to the index (follow-up to GH-119366) (GH-120703)
Petr Viktorin [Wed, 19 Jun 2024 07:17:26 +0000 (09:17 +0200)] 
Add a link to free-threading HOWTO to the index (follow-up to GH-119366) (GH-120703)

17 months agogh-120633: Move scrollbar and remove tear-off menus in turtledemo (#120634)
Wulian233 [Wed, 19 Jun 2024 06:20:54 +0000 (14:20 +0800)] 
gh-120633: Move scrollbar and remove tear-off menus in turtledemo (#120634)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
17 months agoGH-119726: Deduplicate JIT trampolines for out-of-range jumps (GH-120250)
Diego Russo [Wed, 19 Jun 2024 01:27:02 +0000 (02:27 +0100)] 
GH-119726: Deduplicate JIT trampolines for out-of-range jumps (GH-120250)

17 months agoIgnore some failing tests in emulated JIT CI (GH-120375)
Diego Russo [Wed, 19 Jun 2024 01:24:29 +0000 (02:24 +0100)] 
Ignore some failing tests in emulated JIT CI (GH-120375)

17 months agoGH-73991: Add follow_symlinks argument to `pathlib.Path.copy()` (#120519)
Barney Gale [Wed, 19 Jun 2024 00:59:54 +0000 (01:59 +0100)] 
GH-73991: Add follow_symlinks argument to `pathlib.Path.copy()` (#120519)

Add support for not following symlinks in `pathlib.Path.copy()`.

On Windows we add the `COPY_FILE_COPY_SYMLINK` flag is following symlinks is disabled. If the source is symlink to a directory, this call will fail with `ERROR_ACCESS_DENIED`. In this case we add `COPY_FILE_DIRECTORY` to the flags and retry. This can fail on old Windowses, which we note in the docs.

No news as `copy()` was only just added.

17 months agoGH-73991: pathlib ABC tests: add `DummyPath.unlink()` and `rmdir()` (#120715)
Barney Gale [Tue, 18 Jun 2024 22:13:45 +0000 (23:13 +0100)] 
GH-73991: pathlib ABC tests: add `DummyPath.unlink()` and `rmdir()` (#120715)

In preparation for the addition of `PathBase.rmtree()`, implement
`DummyPath.unlink()` and `rmdir()`, and move corresponding tests into
`test_pathlib_abc` so they're run against `DummyPath`.

17 months agogh-120367: fix bug where compiler detects redundant jump after pseudo op replacement...
Irit Katriel [Tue, 18 Jun 2024 22:09:23 +0000 (23:09 +0100)] 
gh-120367: fix bug where compiler detects redundant jump after pseudo op replacement (#120714)

17 months agoGH-73991: Use same signature for `shutil._rmtree_[un]safe()`. (#120517)
Barney Gale [Tue, 18 Jun 2024 21:15:18 +0000 (22:15 +0100)] 
GH-73991: Use same signature for `shutil._rmtree_[un]safe()`. (#120517)

Preparatory work for moving `_rmtree_unsafe()` and `_rmtree_safe_fd()` to
`pathlib._os` so that they can be used from both `shutil` and `pathlib`.

Move implementation-specific setup from `rmtree()` into the safe/unsafe
functions, and give them the same signature `(path, dir_fd, onexc)`.

In the tests, mock `os.open` rather than `_rmtree_safe_fd()` to ensure the
FD-based walk is used, and replace a couple references to
`shutil._use_fd_functions` with `shutil.rmtree.avoids_symlink_attacks`
(which has the same value).

No change of behaviour.

17 months agogh-120688: Build WASI with -O3 in debug mode (#120691)
Victor Stinner [Tue, 18 Jun 2024 17:35:44 +0000 (19:35 +0200)] 
gh-120688: Build WASI with -O3 in debug mode (#120691)

On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.

17 months agogh-119574: Add some missing environment variables to '--help-env'. (GH-120006)
devdanzin [Tue, 18 Jun 2024 17:12:58 +0000 (14:12 -0300)] 
gh-119574: Add some missing environment variables to '--help-env'. (GH-120006)

17 months agogh-120417: Add #noqa: F401 to tests (#120627)
Victor Stinner [Tue, 18 Jun 2024 15:51:47 +0000 (17:51 +0200)] 
gh-120417: Add #noqa: F401 to tests (#120627)

Ignore linter "imported but unused" warnings in tests when the linter
doesn't understand how the import is used.

17 months agogh-120496: Add a note about iterator thread-safe (gh-120685)
Donghee Na [Tue, 18 Jun 2024 15:37:34 +0000 (00:37 +0900)] 
gh-120496: Add a note about iterator thread-safe (gh-120685)

17 months agogh-117953: Skip `test_interpreters` properly without GIL (#120689)
Nice Zombies [Tue, 18 Jun 2024 15:22:24 +0000 (17:22 +0200)] 
gh-117953: Skip `test_interpreters` properly without GIL (#120689)

17 months agogh-120417: Use import_helper() in test_regrtest (#120680)
Victor Stinner [Tue, 18 Jun 2024 15:15:04 +0000 (17:15 +0200)] 
gh-120417: Use import_helper() in test_regrtest (#120680)

17 months agogh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450)
Bénédikt Tran [Tue, 18 Jun 2024 14:29:43 +0000 (16:29 +0200)] 
gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450)

17 months agogh-120600: Make Py_TYPE() opaque in limited C API 3.14 (#120601)
Victor Stinner [Tue, 18 Jun 2024 14:28:48 +0000 (16:28 +0200)] 
gh-120600: Make Py_TYPE() opaque in limited C API 3.14 (#120601)

In the limited C API 3.14 and newer, Py_TYPE() is now implemented as
an opaque function call to hide implementation details.

17 months agogh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (#118807)
Sam Gross [Tue, 18 Jun 2024 13:57:23 +0000 (09:57 -0400)] 
gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (#118807)

This exposes `PyUnstable_Object_ClearWeakRefsNoCallbacks` as an unstable
C-API function to provide a thread-safe mechanism for clearing weakrefs
without executing callbacks.

Some C-API extensions need to clear weakrefs without calling callbacks,
such as after running finalizers like we do in subtype_dealloc.
Previously they could use `_PyWeakref_ClearRef` on each weakref, but
that's not thread-safe in the free-threaded build.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
17 months agogh-120659: Skip `test_freethreading` with GIL (#120660)
Nice Zombies [Tue, 18 Jun 2024 13:56:20 +0000 (15:56 +0200)] 
gh-120659: Skip `test_freethreading` with GIL (#120660)

17 months agogh-120417: Move imports to doctests in test_doctest (#120679)
Victor Stinner [Tue, 18 Jun 2024 13:54:53 +0000 (15:54 +0200)] 
gh-120417: Move imports to doctests in test_doctest (#120679)

17 months agogh-119241: Add HOWTO for free-threaded C API extensions (#119877)
Sam Gross [Tue, 18 Jun 2024 13:49:51 +0000 (09:49 -0400)] 
gh-119241: Add HOWTO for free-threaded C API extensions (#119877)

Some sections adapted from https://github.com/Quansight-Labs/free-threaded-compatibility/
written by Nathan Goldbaum.

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
17 months agogh-120381: Fix inspect.ismethoddescriptor() (#120383)
Jan Kaliszewski [Tue, 18 Jun 2024 12:19:43 +0000 (14:19 +0200)] 
gh-120381: Fix inspect.ismethoddescriptor() (#120383)

The `inspect.ismethoddescriptor()` function did not check for the lack of
`__delete__()` and, consequently, erroneously returned True when applied
to *data* descriptors with only `__get__()` and `__delete__()` defined.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
17 months agogh-120674: Protect multi-line macros in _testbuffer.c and _testcapimodule.c (#120675)
Bénédikt Tran [Tue, 18 Jun 2024 12:04:52 +0000 (14:04 +0200)] 
gh-120674: Protect multi-line macros in _testbuffer.c and _testcapimodule.c (#120675)

Add do { ... } while (0) pattern.

17 months agogh-120662: Improve `smtplib` example (#120668)
Bénédikt Tran [Tue, 18 Jun 2024 11:56:58 +0000 (13:56 +0200)] 
gh-120662: Improve `smtplib` example (#120668)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
17 months agoNo longer watch the queue module, remove rhettinger (#120664)
Raymond Hettinger [Tue, 18 Jun 2024 11:47:32 +0000 (06:47 -0500)] 
No longer watch the queue module, remove rhettinger (#120664)

17 months agoGH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. (#120640)
Mark Shannon [Tue, 18 Jun 2024 11:17:46 +0000 (12:17 +0100)] 
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. (#120640)

* Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions.

* Add LOAD_SPECIAL instruction

* Reimplement `with` and `async with` statements using LOAD_SPECIAL

17 months agogh-119897: Add test for lambda generator invocation (#120658)
Irit Katriel [Tue, 18 Jun 2024 09:45:23 +0000 (10:45 +0100)] 
gh-119897: Add test for lambda generator invocation (#120658)

gh-120467: Add test for lambda generator invocation

17 months agogh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615)
Serhiy Storchaka [Tue, 18 Jun 2024 09:19:32 +0000 (12:19 +0300)] 
gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.

17 months agogh-120560: Mark `zip64` tests in `test_zipimport` as CPU-heavy (GH-120564)
Nice Zombies [Mon, 17 Jun 2024 22:18:51 +0000 (00:18 +0200)] 
gh-120560: Mark `zip64` tests in `test_zipimport` as CPU-heavy (GH-120564)

17 months agogh-120417: Remove unused imports in cases_generator (#120622)
Victor Stinner [Mon, 17 Jun 2024 19:58:56 +0000 (21:58 +0200)] 
gh-120417: Remove unused imports in cases_generator (#120622)

17 months agogh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_count...
Eric Snow [Mon, 17 Jun 2024 19:16:00 +0000 (15:16 -0400)] 
gh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_count (gh-120529)

gh-120182 added new global state (interp_count), but didn't add thread-safety for it.  This change eliminates the possible race.

17 months agogh-120417: Modify test_bdb to use the import (#120628)
Victor Stinner [Mon, 17 Jun 2024 19:06:18 +0000 (21:06 +0200)] 
gh-120417: Modify test_bdb to use the import (#120628)

Run test_module_for_bdb with a specific namespace.

17 months agogh-120417: Remove unused imports in tests (part 1) (#120629)
Victor Stinner [Mon, 17 Jun 2024 19:05:56 +0000 (21:05 +0200)] 
gh-120417: Remove unused imports in tests (part 1) (#120629)

17 months agogh-120417: Remove unused imports in tests (part 2) (#120630)
Victor Stinner [Mon, 17 Jun 2024 19:05:37 +0000 (21:05 +0200)] 
gh-120417: Remove unused imports in tests (part 2) (#120630)

17 months agogh-120417: Remove unused imports in tests (part 3) (#120631)
Victor Stinner [Mon, 17 Jun 2024 19:04:58 +0000 (21:04 +0200)] 
gh-120417: Remove unused imports in tests (part 3) (#120631)

17 months agogh-117657: Fix `__slots__` thread safety in free-threaded build (#119368)
Daniele Parmeggiani [Mon, 17 Jun 2024 18:44:54 +0000 (14:44 -0400)] 
gh-117657:  Fix `__slots__` thread safety in free-threaded build (#119368)

Fix a race in `PyMember_GetOne` and `PyMember_SetOne` for `Py_T_OBJECT_EX`.
These functions implement `__slots__` accesses for Python objects.

17 months agogh-117657: Fix TSan reported data race on ioctl_works (#120175)
Sam Gross [Mon, 17 Jun 2024 17:23:40 +0000 (13:23 -0400)] 
gh-117657: Fix TSan reported data race on ioctl_works (#120175)

17 months agogh-120417: Remove unused imports in Tools (#120623)
Victor Stinner [Mon, 17 Jun 2024 16:09:26 +0000 (18:09 +0200)] 
gh-120417: Remove unused imports in Tools (#120623)

17 months agogh-120507: Double WASI memory (#120648)
Victor Stinner [Mon, 17 Jun 2024 16:08:05 +0000 (18:08 +0200)] 
gh-120507: Double WASI memory (#120648)

Use 16 MiB stack with 40 MiB memory limit, instead of 8 MiB stack
with 20 MiB memory limit.

17 months agofix enum doc typo (#120091)
Saul Pwanson [Mon, 17 Jun 2024 16:01:15 +0000 (09:01 -0700)] 
fix enum doc typo (#120091)

17 months agogh-115649: Copy the filename into main interpreter before intern in import.c (#120315)
AN Long [Mon, 17 Jun 2024 15:57:22 +0000 (23:57 +0800)] 
gh-115649: Copy the filename into main interpreter before intern in import.c (#120315)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
17 months agogh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative...
Kirill Podoprigora [Mon, 17 Jun 2024 15:52:07 +0000 (18:52 +0300)] 
gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative option (#120434)

17 months agogh-120417: Remove unused imports in tests (part 4) (#120632)
Victor Stinner [Mon, 17 Jun 2024 15:35:20 +0000 (17:35 +0200)] 
gh-120417: Remove unused imports in tests (part 4) (#120632)

17 months ago gh-119182: Add PyUnicodeWriter C API (#119184)
Victor Stinner [Mon, 17 Jun 2024 15:10:52 +0000 (17:10 +0200)] 
 gh-119182: Add PyUnicodeWriter C API (#119184)

17 months agogh-114091: Reword error message for unawaitable types (#114090)
Steele Farnsworth [Mon, 17 Jun 2024 14:48:17 +0000 (10:48 -0400)] 
gh-114091: Reword error message for unawaitable types (#114090)

Reword error message for unawaitable types.

17 months agoUpdate the documentation howto index page and group docs into 3 logical sections...
Carol Willing [Mon, 17 Jun 2024 14:37:33 +0000 (07:37 -0700)] 
Update the documentation howto index page and group docs into 3 logical sections (GH-119366)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
17 months agogh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions...
Bénédikt Tran [Mon, 17 Jun 2024 13:51:03 +0000 (15:51 +0200)] 
gh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions (#119976)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
17 months agoGH-120619: Clean up `RETURN_VALUE` instruction (GH-120624)
Mark Shannon [Mon, 17 Jun 2024 13:40:11 +0000 (14:40 +0100)] 
GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624)

* Rename _POP_FRAME to _RETURN_VALUE as it returns a value as well as popping a frame.

* Remove remaining _POP_FRAMEs

17 months agoitertools doc: examples for groupby() and tee() (#120618)
Frank Dana [Mon, 17 Jun 2024 13:19:14 +0000 (09:19 -0400)] 
itertools doc: examples for groupby() and tee() (#120618)

17 months agogh-120196: Reuse find_max_char() for bytes objects (#120497)
Ruben Vorderman [Mon, 17 Jun 2024 10:21:58 +0000 (12:21 +0200)] 
gh-120196: Reuse find_max_char() for bytes objects (#120497)

17 months agogh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks...
Irit Katriel [Mon, 17 Jun 2024 10:10:06 +0000 (11:10 +0100)] 
gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (#120425)

17 months agogh-83754: Use the Py_TYPE() macro (#120599)
Victor Stinner [Mon, 17 Jun 2024 08:34:29 +0000 (10:34 +0200)] 
gh-83754: Use the Py_TYPE() macro (#120599)

Don't access directly PyObject.ob_type, but use the Py_TYPE() macro
instead.

17 months agogh-120586: Fix several "unused function" warnings in `posixmodule.c` (#120588)
Nikita Sobolev [Mon, 17 Jun 2024 06:44:13 +0000 (09:44 +0300)] 
gh-120586: Fix several "unused function" warnings in `posixmodule.c` (#120588)

17 months agogh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (#120480)
Gregory P. Smith [Mon, 17 Jun 2024 05:47:10 +0000 (22:47 -0700)] 
gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (#120480)

gh-112346: Describe the "os" byte in gzip output change.

17 months agogh-120567: Clarify weekday return in calendar.monthrange docstring (#120570)
Terry Jan Reedy [Sun, 16 Jun 2024 20:43:57 +0000 (16:43 -0400)] 
gh-120567: Clarify weekday return in calendar.monthrange docstring (#120570)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
17 months agogh-118596: Add thread-safety clarifications to the SSLContext documentation (#118597)
mm-matthias [Sun, 16 Jun 2024 20:27:44 +0000 (22:27 +0200)] 
gh-118596: Add thread-safety clarifications to the SSLContext documentation (#118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.

17 months agogh-120568: fix file leak in PyUnstable_CopyPerfMapFile (#120569)
Carson Radtke [Sun, 16 Jun 2024 17:51:52 +0000 (12:51 -0500)] 
gh-120568: fix file leak in PyUnstable_CopyPerfMapFile (#120569)

17 months agogh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections...
Nikita Sobolev [Sun, 16 Jun 2024 17:13:56 +0000 (20:13 +0300)] 
gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (#120585)

17 months agoDocs: remove temporary hardcoded links (#120348)
Hugo van Kemenade [Sun, 16 Jun 2024 12:51:17 +0000 (06:51 -0600)] 
Docs: remove temporary hardcoded links (#120348)

17 months agogh-120485: Add an override of `allow_reuse_port` on classes subclassing `socketserver...
Idan Kapustian [Sun, 16 Jun 2024 12:15:03 +0000 (15:15 +0300)] 
gh-120485: Add an override of `allow_reuse_port` on classes subclassing `socketserver.TCPServer` (GH-120488)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
17 months agogh-120579: Guard `_testcapi` import in `test_free_threading` (#120580)
Nikita Sobolev [Sun, 16 Jun 2024 08:26:13 +0000 (11:26 +0300)] 
gh-120579: Guard `_testcapi` import in `test_free_threading` (#120580)

17 months agogh-120360: Add self as IDLE doc owner (#120571)
Terry Jan Reedy [Sun, 16 Jun 2024 05:55:47 +0000 (01:55 -0400)] 
gh-120360: Add self as IDLE doc owner (#120571)

Add self as IDLE doc owner

17 months agogh-120572: add missing parentheses in TypeIs documentation (#120573)
Nyuan Zhang [Sun, 16 Jun 2024 05:36:10 +0000 (13:36 +0800)] 
gh-120572: add missing parentheses in TypeIs documentation (#120573)

17 months agogh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486)
Ruben Vorderman [Sat, 15 Jun 2024 18:46:39 +0000 (20:46 +0200)] 
gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486)

This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0.  this keeps things consistent.

17 months agogh-120541: Improve the "less" prompt in pydoc (GH-120543)
Serhiy Storchaka [Sat, 15 Jun 2024 17:56:40 +0000 (20:56 +0300)] 
gh-120541: Improve the "less" prompt in pydoc (GH-120543)

When help() is called with non-string argument, use __qualname__ or
__name__ if available, otherwise use "{typename} object".

17 months agoannotations: expand documentation on "simple" assignment targets (#120535)
Jelle Zijlstra [Sat, 15 Jun 2024 15:18:16 +0000 (08:18 -0700)] 
annotations: expand documentation on "simple" assignment targets (#120535)

This behavior is rather surprising and it was not clearly specified.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
17 months agogh-117657: Make PyType_HasFeature (exported version) atomic (#120484)
Ken Jin [Sat, 15 Jun 2024 14:39:22 +0000 (22:39 +0800)] 
gh-117657: Make PyType_HasFeature (exported version) atomic (#120484)

Make PyType_HasFeature (exported version) atomic

17 months agoAdd some more edge-case tests for `inspect.get_annotations` with `eval_str=True`...
Alex Waygood [Sat, 15 Jun 2024 12:51:58 +0000 (13:51 +0100)] 
Add some more edge-case tests for `inspect.get_annotations` with `eval_str=True` (#120550)

17 months agogh-120495: Fix incorrect exception handling in Tab Nanny (#120498)
Wulian233 [Sat, 15 Jun 2024 11:04:14 +0000 (19:04 +0800)] 
gh-120495: Fix incorrect exception handling in Tab Nanny (#120498)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
17 months agogh-120544: Add `else: fail()` to tests where exception is expected (#120545)
Nikita Sobolev [Sat, 15 Jun 2024 10:33:14 +0000 (13:33 +0300)] 
gh-120544: Add `else: fail()` to tests where exception is expected (#120545)