]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
18 months agogh-117953: Share More Machinery Code Between Builtin and Dynamic Extensions (gh-118204)
Eric Snow [Mon, 29 Apr 2024 18:53:04 +0000 (12:53 -0600)] 
gh-117953: Share More Machinery Code Between Builtin and Dynamic Extensions (gh-118204)

This change will make some later changes simpler. It also brings more consistent behavior and lower maintenance costs.

18 months agogh-117783: Immortalize objects that use deferred reference counting (#118112)
Sam Gross [Mon, 29 Apr 2024 18:36:02 +0000 (14:36 -0400)] 
gh-117783: Immortalize objects that use deferred reference counting (#118112)

Deferred reference counting is not fully implemented yet. As a temporary
measure, we immortalize objects that would use deferred reference
counting to avoid multi-threaded scaling bottlenecks.

This is only performed in the free-threaded build once the first
non-main thread is started. Additionally, some tests, including refleak
tests, suppress this behavior.

18 months agoDocs: Upgrade to Sphinx 7.3 (#118397)
Hugo van Kemenade [Mon, 29 Apr 2024 17:40:50 +0000 (20:40 +0300)] 
Docs: Upgrade to Sphinx 7.3 (#118397)

18 months agogh-118331: Don't raise an error if tuple allocation fails when clearing weakrefs...
mpage [Mon, 29 Apr 2024 16:56:51 +0000 (09:56 -0700)] 
gh-118331: Don't raise an error if tuple allocation fails when clearing weakrefs (#118338)

It's not safe to raise an exception in `PyObject_ClearWeakRefs()` if one
is not already set, since it may be called by `_Py_Dealloc()`, which
requires that the active exception does not change.

Additionally, make sure we clear the weakrefs even when tuple allocation
fails.

18 months agogh-118285: Fix signatures of operator.{attrgetter,itemgetter,methodcaller} instances...
Serhiy Storchaka [Mon, 29 Apr 2024 16:30:48 +0000 (19:30 +0300)] 
gh-118285: Fix signatures of operator.{attrgetter,itemgetter,methodcaller} instances (GH-118316)

* Allow to specify the signature of custom callable instances of extension
  type by the __text_signature__ attribute.
* Specify signatures of operator.attrgetter, operator.itemgetter, and
  operator.methodcaller instances.

18 months agogh-118351: Adapt support.TEST_MODULES_ENABLED for builds without the config variable...
Kirill Podoprigora [Mon, 29 Apr 2024 15:50:11 +0000 (18:50 +0300)] 
gh-118351: Adapt support.TEST_MODULES_ENABLED for builds without the config variable (GH-118354)

18 months agogh-117953: Split Up _PyImport_LoadDynamicModuleWithSpec() (gh-118203)
Eric Snow [Mon, 29 Apr 2024 15:29:07 +0000 (09:29 -0600)] 
gh-117953: Split Up _PyImport_LoadDynamicModuleWithSpec() (gh-118203)

Basically, I've turned most of _PyImport_LoadDynamicModuleWithSpec() into two new functions (_PyImport_GetModInitFunc() and _PyImport_RunModInitFunc()) and moved the rest of it out into _imp_create_dynamic_impl().  There shouldn't be any changes in behavior.

This change makes some future changes simpler.  This is particularly relevant to potentially calling each module init function in the main interpreter first.  Thus the critical part of the PR is the addition of _PyImport_RunModInitFunc(), which is strictly focused on running the init func and validating the result.  A later PR will take it a step farther by capturing error information rather than raising exceptions.

FWIW, this change also helps readers by clarifying a bit more about what happens when an extension/builtin module is imported.

18 months agoUncomment one grammar test (#118361)
Nikita Sobolev [Mon, 29 Apr 2024 11:16:51 +0000 (14:16 +0300)] 
Uncomment one grammar test (#118361)

18 months agogh-114099: Fix typos in iOS/README.rst (GH-118378)
Xie Yanbo [Mon, 29 Apr 2024 11:15:15 +0000 (19:15 +0800)] 
gh-114099: Fix typos in iOS/README.rst (GH-118378)

18 months agoFix typo in Doc/c-api/exceptions.rst (GH-118371)
Xie Yanbo [Mon, 29 Apr 2024 11:02:54 +0000 (19:02 +0800)] 
Fix typo in Doc/c-api/exceptions.rst (GH-118371)

18 months agoFix typo in Doc/howto/timerfd.rst (GH-118376)
Xie Yanbo [Mon, 29 Apr 2024 11:01:03 +0000 (19:01 +0800)] 
Fix typo in Doc/howto/timerfd.rst (GH-118376)

18 months agoFix typo in Doc/c-api/typeobj.rst (GH-118377)
Xie Yanbo [Mon, 29 Apr 2024 10:59:38 +0000 (18:59 +0800)] 
Fix typo in Doc/c-api/typeobj.rst (GH-118377)

18 months agogh-107674: Lazy load line number to improve performance of tracing (GH-118127)
Tian Gao [Mon, 29 Apr 2024 08:54:52 +0000 (01:54 -0700)] 
gh-107674: Lazy load line number to improve performance of tracing (GH-118127)

18 months agogh-115119: Detect _decimal dependencies using pkg-config (#115406)
Erlend E. Aasland [Mon, 29 Apr 2024 06:58:57 +0000 (08:58 +0200)] 
gh-115119: Detect _decimal dependencies using pkg-config (#115406)

pkg-config is supported for libmpdec 4.0.0 and newer.

18 months agoGH-118095: Allow a variant of RESUME_CHECK in tier 2 (GH-118286)
Mark Shannon [Mon, 29 Apr 2024 06:54:05 +0000 (07:54 +0100)] 
GH-118095: Allow a variant of RESUME_CHECK in tier 2 (GH-118286)

18 months agogh-118374: test_ast: Add ``ctx`` argument to ``ast.Name`` calls (#118375)
Kirill Podoprigora [Mon, 29 Apr 2024 05:38:46 +0000 (08:38 +0300)] 
gh-118374: test_ast: Add ``ctx`` argument to ``ast.Name`` calls (#118375)

18 months agogh-118293: Suppress mouse cursor feedback when launching Windows processes with multi...
Henrik Tunedal [Sun, 28 Apr 2024 21:10:44 +0000 (23:10 +0200)] 
gh-118293: Suppress mouse cursor feedback when launching Windows processes with multiprocessing (GH-118315)

18 months agogh-101100: Fix Sphinx warnings in `whatsnew/3.10.rst` (#118356)
Hugo van Kemenade [Sun, 28 Apr 2024 18:12:25 +0000 (21:12 +0300)] 
gh-101100: Fix Sphinx warnings in `whatsnew/3.10.rst` (#118356)

18 months agogh-101100: Fix Sphinx warnings in `library/faulthandler.rst` (#118353)
Hugo van Kemenade [Sun, 28 Apr 2024 18:06:45 +0000 (21:06 +0300)] 
gh-101100: Fix Sphinx warnings in `library/faulthandler.rst` (#118353)

18 months agogh-101100: Fix Sphinx warnings in `whatsnew/3.9.rst` (#118364)
Hugo van Kemenade [Sun, 28 Apr 2024 17:31:22 +0000 (20:31 +0300)] 
gh-101100: Fix Sphinx warnings in `whatsnew/3.9.rst` (#118364)

18 months agoFix typo in Tools/wasm/README.md(#118358)
Xie Yanbo [Sun, 28 Apr 2024 17:00:48 +0000 (01:00 +0800)] 
Fix typo in Tools/wasm/README.md(#118358)

18 months agogh-109118: Make comprehensions work within annotation scopes, but without inlining...
Jelle Zijlstra [Sun, 28 Apr 2024 13:21:28 +0000 (06:21 -0700)] 
gh-109118: Make comprehensions work within annotation scopes, but without inlining (#118160)

Co-authored-by: Carl Meyer <carl@oddbird.net>
18 months agogh-118323: Document `&&` grammar syntax (#118324)
Nikita Sobolev [Sat, 27 Apr 2024 10:36:06 +0000 (13:36 +0300)] 
gh-118323: Document `&&` grammar syntax (#118324)

18 months agoCorrect typo in iOS README (#118341)
Wulian233 [Sat, 27 Apr 2024 09:25:32 +0000 (17:25 +0800)] 
Correct typo in iOS README (#118341)

18 months agoCorrect spelling error in recent NEWS entry (#118308)
Xie Yanbo [Sat, 27 Apr 2024 02:06:08 +0000 (10:06 +0800)] 
Correct spelling error in recent NEWS entry (#118308)

18 months agogh-110693: Use a Larger Queue for Per-Interpreter Pending Calls (gh-118302)
Eric Snow [Sat, 27 Apr 2024 01:13:44 +0000 (19:13 -0600)] 
gh-110693: Use a Larger Queue for Per-Interpreter Pending Calls (gh-118302)

This is an improvement over the status quo, reducing the likelihood of completely filling the pending calls queue.  However, the problem won't go away completely unless we move to an unbounded linked list or add a mechanism for waiting until the queue isn't full.

18 months agobpo-32839: Add the after_info() method for Tkinter widgets (GH-5664)
Cheryl Sabella [Fri, 26 Apr 2024 21:27:58 +0000 (14:27 -0700)] 
bpo-32839: Add the after_info() method for Tkinter widgets (GH-5664)

18 months agogh-112730: Respect tests that require environment variables with no-colorize fixes...
Pablo Galindo Salgado [Fri, 26 Apr 2024 20:23:30 +0000 (21:23 +0100)] 
gh-112730: Respect tests that require environment variables with no-colorize fixes (#118288)

18 months agogh-116749: Disable GIL by default in free-threaded build (#118295)
Sam Gross [Fri, 26 Apr 2024 18:22:29 +0000 (14:22 -0400)] 
gh-116749: Disable GIL by default in free-threaded build (#118295)

Switch GIL to disabled by default in free-threaded build so that the
free-threaded CIs catch thread-safety issues.

18 months agoGH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 (GH-118279)
Mark Shannon [Fri, 26 Apr 2024 17:08:50 +0000 (18:08 +0100)] 
GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 (GH-118279)

18 months agogh-117680: Fix msvc warning in instruction_sequence.c (#118326)
neonene [Fri, 26 Apr 2024 16:20:30 +0000 (01:20 +0900)] 
gh-117680: Fix msvc warning in instruction_sequence.c (#118326)

18 months agogh-117385: Remove unhooked events on sys.settrace (GH-117386)
Tian Gao [Fri, 26 Apr 2024 16:01:44 +0000 (09:01 -0700)] 
gh-117385: Remove unhooked events on sys.settrace (GH-117386)

18 months agogh-117657: Fix race data race in `_Py_IsOwnedByCurrentThread()` (#118258)
mpage [Fri, 26 Apr 2024 14:39:08 +0000 (07:39 -0700)] 
gh-117657: Fix race data race in `_Py_IsOwnedByCurrentThread()` (#118258)

18 months agoFix note in Enum.__new__ docs (#118284)
Philipp A [Fri, 26 Apr 2024 14:06:53 +0000 (16:06 +0200)] 
Fix note in Enum.__new__ docs (#118284)

18 months agogh-117928: Bump the minimum Sphinx version to 6.2.1 (#117853)
Kirill Podoprigora [Fri, 26 Apr 2024 10:10:16 +0000 (13:10 +0300)] 
gh-117928: Bump the minimum Sphinx version to 6.2.1 (#117853)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
18 months agogh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237)
Petr Viktorin [Fri, 26 Apr 2024 09:01:30 +0000 (11:01 +0200)] 
gh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237)

18 months agogh-110693: Pending Calls Machinery Cleanups (gh-118296)
Eric Snow [Fri, 26 Apr 2024 01:05:51 +0000 (19:05 -0600)] 
gh-110693: Pending Calls Machinery Cleanups (gh-118296)

This does some cleanup in preparation for later changes.

18 months agogh-112075: _Py_dict_lookup needs to lock shared keys (#117528)
Dino Viehland [Thu, 25 Apr 2024 22:34:05 +0000 (15:34 -0700)] 
gh-112075: _Py_dict_lookup needs to lock shared keys (#117528)

Lock shared keys in `Py_dict_lookup` and use thread-safe lookup in `insertdict`

Co-authored-by: Sam Gross <colesbury@gmail.com>
18 months agoRemove tests_gui variables from Tkinter tests (GH-118280)
Serhiy Storchaka [Thu, 25 Apr 2024 16:27:51 +0000 (19:27 +0300)] 
Remove tests_gui variables from Tkinter tests (GH-118280)

They were only used in runtktests.py which was removed in
f59ed3c310a7ceebf2a56a84ea969a7f75d95b64 (bpo-45229).

18 months agogh-117657: Fixes a few small TSAN issues in dictobject (#118200)
Dino Viehland [Thu, 25 Apr 2024 15:53:29 +0000 (08:53 -0700)] 
gh-117657: Fixes a few small TSAN issues in dictobject (#118200)

Fixup TSAN errors for dict

18 months agogh-117657: Add a couple more TSAN suppressions (#118256)
mpage [Thu, 25 Apr 2024 15:48:16 +0000 (08:48 -0700)] 
gh-117657: Add a couple more TSAN suppressions (#118256)

18 months agogh-117657: Fix data race in `_Py_IsImmortal` (#118261)
mpage [Thu, 25 Apr 2024 15:31:57 +0000 (08:31 -0700)] 
gh-117657: Fix data race in `_Py_IsImmortal` (#118261)

The load of `ob_ref_local races with stores. Using a relaxed load is
sufficient; stores to the field are relaxed.

18 months agogh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567)
Faidon Liambotis [Thu, 25 Apr 2024 15:17:40 +0000 (18:17 +0300)] 
gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567)

While properties like IPv6Address.is_private account for IPv4-mapped
IPv6 addresses, such as for example:

    >>> ipaddress.ip_address("192.168.0.1").is_private
    True
    >>> ipaddress.ip_address("::ffff:192.168.0.1").is_private
    True
...the same doesn't currently apply to the is_loopback property:
    >>> ipaddress.ip_address("127.0.0.1").is_loopback
    True
    >>> ipaddress.ip_address("::ffff:127.0.0.1").is_loopback
    False

At minimum, this inconsistency between different properties is
counter-intuitive. Moreover, ::ffff:127.0.0.0/104 is for all intents and
purposes a loopback address, and should be treated as such.

18 months agogh-112069: Do not require lock if the set has never been exposed. (gh-118069)
Donghee Na [Thu, 25 Apr 2024 15:13:57 +0000 (00:13 +0900)] 
gh-112069: Do not require lock if the set has never been exposed. (gh-118069)

18 months agoFix incorrect usage of ``support.requires_gil_enabled`` (#118170)
Kirill Podoprigora [Thu, 25 Apr 2024 15:11:59 +0000 (18:11 +0300)] 
Fix incorrect usage of ``support.requires_gil_enabled`` (#118170)

18 months agogh-117578: Introduce _PyType_GetModuleByDef2 private function (GH-117661)
neonene [Thu, 25 Apr 2024 11:51:31 +0000 (20:51 +0900)] 
gh-117578: Introduce _PyType_GetModuleByDef2 private function (GH-117661)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
18 months agoGH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)
Mark Shannon [Thu, 25 Apr 2024 10:32:47 +0000 (11:32 +0100)] 
GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)

18 months agogh-102511: Speed up os.path.splitroot() with native helpers (GH-118089)
Nice Zombies [Thu, 25 Apr 2024 09:07:38 +0000 (11:07 +0200)] 
gh-102511: Speed up os.path.splitroot() with native helpers (GH-118089)

18 months agogh-118221: Always use the default row factory in sqlite3.iterdump() (#118223)
Erlend E. Aasland [Thu, 25 Apr 2024 08:11:45 +0000 (10:11 +0200)] 
gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223)

sqlite3.iterdump() depends on the row factory returning resulting rows
as tuples; it will fail with custom row factories like for example a
dict factory.

With this commit, we explicitly reset the row factory of the cursor used
by iterdump(), so we always get predictable results. This does not
affect the row factory of the parent connection.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
18 months agogh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use...
Itamar Oren [Thu, 25 Apr 2024 06:49:15 +0000 (23:49 -0700)] 
gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208)

18 months agogh-117968: Make the test for closed file more safe in the C API tests (GH-118230)
Serhiy Storchaka [Thu, 25 Apr 2024 05:00:42 +0000 (08:00 +0300)] 
gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)

The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.

18 months agogh-117786: Fix venv created from Windows Store install by restoring __PYVENV_LAUNCHER...
Steve Dower [Wed, 24 Apr 2024 22:00:55 +0000 (23:00 +0100)] 
gh-117786: Fix venv created from Windows Store install by restoring __PYVENV_LAUNCHER__ smuggling (GH-117814)

18 months agoGH-118246: Exclude test_pathlib and test_posixpath from emulated JIT CI (GH-118247)
Savannah Ostrowski [Wed, 24 Apr 2024 21:43:50 +0000 (14:43 -0700)] 
GH-118246: Exclude test_pathlib and test_posixpath from emulated JIT CI (GH-118247)

18 months agogh-108191: Add support of positional argument in SimpleNamespace constructor (GH...
Serhiy Storchaka [Wed, 24 Apr 2024 21:39:54 +0000 (00:39 +0300)] 
gh-108191: Add support of positional argument in SimpleNamespace constructor (GH-108195)

SimpleNamespace({'a': 1, 'b': 2}) and SimpleNamespace([('a', 1), ('b', 2)])
are now the same as SimpleNamespace(a=1, b=2).

18 months agogh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)
Eric Snow [Wed, 24 Apr 2024 21:23:45 +0000 (15:23 -0600)] 
gh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)

A couple of refleaks slipped through in gh-118194. This takes care of them.

(AKA _Py_ext_module_loader_info_init() does not steal references.)

18 months agogh-112730: Make the test suite resilient to color-activation environment variables...
Pablo Galindo Salgado [Wed, 24 Apr 2024 20:25:22 +0000 (21:25 +0100)] 
gh-112730: Make the test suite resilient to color-activation environment variables (#117672)

18 months agogh-85453: Make numeric literals consistent across datetime.rst (#118245)
edson duarte [Wed, 24 Apr 2024 20:19:54 +0000 (17:19 -0300)] 
gh-85453: Make numeric literals consistent across datetime.rst (#118245)

Remove code formatting from remaining numeric literals.

18 months agogh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variab...
edson duarte [Wed, 24 Apr 2024 19:53:52 +0000 (16:53 -0300)] 
gh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables (#118068)

Also remove formatting from numeric literals.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
18 months agogh-117953: Add Internal struct _Py_ext_module_loader_info (gh-118194)
Eric Snow [Wed, 24 Apr 2024 17:42:01 +0000 (11:42 -0600)] 
gh-117953: Add Internal struct _Py_ext_module_loader_info (gh-118194)

This helps with a later change that splits up _PyImport_LoadDynamicModuleWithSpec().

18 months agogh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004)
David Rubin [Wed, 24 Apr 2024 17:16:06 +0000 (10:16 -0700)] 
gh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004)

18 months agogh-117953: Let update_global_state_for_extension() Caller Decide If Singlephase or...
Eric Snow [Wed, 24 Apr 2024 16:28:35 +0000 (10:28 -0600)] 
gh-117953: Let update_global_state_for_extension() Caller Decide If Singlephase or Not (gh-118193)

This change makes other upcoming changes simpler.

18 months agogh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)
Eric Snow [Wed, 24 Apr 2024 16:18:24 +0000 (10:18 -0600)] 
gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)

See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.

18 months agogh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)
Eric Snow [Wed, 24 Apr 2024 15:55:48 +0000 (09:55 -0600)] 
gh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)

These are cleanups I've pulled out of gh-118116.  Mostly, this change moves code around to align with some future changes and to improve clarity a little.  There is one very small change in behavior: we now add the module to the per-interpreter caches after updating the global state, rather than before.

18 months agogh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` (#118202)
Alex Waygood [Wed, 24 Apr 2024 14:55:02 +0000 (15:55 +0100)] 
gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` (#118202)

18 months agoGH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)
Mark Shannon [Wed, 24 Apr 2024 13:41:30 +0000 (14:41 +0100)] 
GH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)

18 months agoGH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs (GH-118106)
Mark Shannon [Wed, 24 Apr 2024 13:37:55 +0000 (14:37 +0100)] 
GH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs (GH-118106)

Covert DEOPT_IFs on likely side exits to EXIT_IFs

18 months agoGH-117536: GH-117894: fix athrow().throw(...) unawaited warning (GH-117851)
Thomas Grainger [Wed, 24 Apr 2024 12:20:19 +0000 (13:20 +0100)] 
GH-117536: GH-117894: fix athrow().throw(...) unawaited warning (GH-117851)

18 months agogh-117225: Add color to doctest output (#117583)
Hugo van Kemenade [Wed, 24 Apr 2024 11:27:40 +0000 (14:27 +0300)] 
gh-117225: Add color to doctest output (#117583)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
18 months agono-issue: devcontainer: update to Fedora 40 (gh-118161)
rindeal [Wed, 24 Apr 2024 11:13:35 +0000 (11:13 +0000)] 
no-issue: devcontainer: update to Fedora 40 (gh-118161)

18 months agogh-117901: Add option for compiler's codegen to save nested instruction sequences...
Irit Katriel [Wed, 24 Apr 2024 09:46:17 +0000 (10:46 +0100)] 
gh-117901: Add option for compiler's codegen to save nested instruction sequences for introspection (#118007)

18 months agogh-116023: Add `show_empty=False` to `ast.dump` (#116037)
Nikita Sobolev [Wed, 24 Apr 2024 08:02:38 +0000 (11:02 +0300)] 
gh-116023: Add `show_empty=False` to `ast.dump` (#116037)

Co-authored-by: Carl Meyer <carl@oddbird.net>
18 months agogh-118074: Immortal executors are not GC-able (#118182)
Guido van Rossum [Tue, 23 Apr 2024 20:38:23 +0000 (13:38 -0700)] 
gh-118074: Immortal executors are not GC-able (#118182)

Better version of gh-118117.
Just check for immortality instead of an address range check.

18 months agogh-118189: Revert accidentally added incl.tar (#118190)
Oleg Iarygin [Tue, 23 Apr 2024 17:38:33 +0000 (20:38 +0300)] 
gh-118189: Revert accidentally added incl.tar (#118190)

18 months agogh-117657: Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state...
mpage [Tue, 23 Apr 2024 17:20:14 +0000 (10:20 -0700)] 
gh-117657: Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state` (#118165)

Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state`

18 months agoFix typo in py_compile.rst (GH-118102)
Animesh Kumar [Tue, 23 Apr 2024 17:12:49 +0000 (22:42 +0530)] 
Fix typo in py_compile.rst (GH-118102)

18 months agogh-117151: optimize BufferedWriter(), do not buffer writes that are the buffer size...
morotti [Tue, 23 Apr 2024 15:51:20 +0000 (16:51 +0100)] 
gh-117151: optimize BufferedWriter(), do not buffer writes that are the buffer size (GH-118037)

BufferedWriter() was buffering calls that are the exact same size as the buffer. it's a very common case to read/write in blocks of the exact buffer size.

it's pointless to copy a full buffer, it's costing extra memory copy and the full buffer will have to be written in the next call anyway.

Co-authored-by: rmorotti <romain.morotti@man.com>
18 months agogh-117953: Small Cleanup of Extensions-Related Machinery Code (gh-118167)
Eric Snow [Tue, 23 Apr 2024 14:25:50 +0000 (08:25 -0600)] 
gh-117953: Small Cleanup of Extensions-Related Machinery Code (gh-118167)

This is a collection of very basic cleanups I've pulled out of gh-118116.  It is mostly renaming variables and moving a couple bits of code in functionally equivalent ways.

18 months agogh-118168: Fix Unpack interaction with builtin aliases (#118169)
Jelle Zijlstra [Tue, 23 Apr 2024 13:40:26 +0000 (06:40 -0700)] 
gh-118168: Fix Unpack interaction with builtin aliases (#118169)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
18 months agogh-118140: Make the``test_concurrent_futures.test_init`` quiet. (GH-118141)
Kirill Podoprigora [Tue, 23 Apr 2024 12:36:06 +0000 (15:36 +0300)] 
gh-118140: Make the``test_concurrent_futures.test_init`` quiet. (GH-118141)

Add stream argument to unittest.TextTestRunner call

18 months agogh-118082: Improve `import` without names syntax error message (#118083)
Nikita Sobolev [Tue, 23 Apr 2024 12:00:52 +0000 (15:00 +0300)] 
gh-118082: Improve `import` without names syntax error message (#118083)

18 months agogh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)
Joe Jevnik [Tue, 23 Apr 2024 11:15:15 +0000 (07:15 -0400)] 
gh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)

Co-authored-by: Joe Jevnik <joe@quantopian.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
18 months agogh-116984: Install mimalloc headers (#116985)
Yichen Yan [Tue, 23 Apr 2024 07:56:00 +0000 (15:56 +0800)] 
gh-116984: Install mimalloc headers (#116985)

- Install mimalloc header only when enabled
- Rename WITH_MIMALLOC to INSTALL_MIMALLOC

18 months agogh-118039: Fix config.cache key on WASI (#118137)
Nice Zombies [Tue, 23 Apr 2024 07:46:28 +0000 (09:46 +0200)] 
gh-118039: Fix config.cache key on WASI (#118137)

18 months agogh-95754: Better error when script shadows a standard library or third party module...
Shantanu [Tue, 23 Apr 2024 01:24:21 +0000 (18:24 -0700)] 
gh-95754: Better error when script shadows a standard library or third party module (#113769)

18 months agogh-116741: Upgrade libexpat to 2.6.2 (#117296)
Seth Michael Larson [Tue, 23 Apr 2024 01:15:08 +0000 (18:15 -0700)] 
gh-116741: Upgrade libexpat to 2.6.2 (#117296)

Upgrade libexpat to 2.6.2

18 months agoGH-118074: Executors in the COLD_EXITS array are not GC'able (#118117)
Guido van Rossum [Mon, 22 Apr 2024 23:20:39 +0000 (16:20 -0700)] 
GH-118074: Executors in the COLD_EXITS array are not GC'able (#118117)

18 months agoSet proper permissions for `jit.yml` workflow (#118084)
Nikita Sobolev [Mon, 22 Apr 2024 21:31:01 +0000 (00:31 +0300)] 
Set proper permissions for `jit.yml` workflow (#118084)

18 months agogh-109118: Allow lambdas in annotation scopes in classes (#118019)
Jelle Zijlstra [Mon, 22 Apr 2024 19:50:26 +0000 (12:50 -0700)] 
gh-109118: Allow lambdas in annotation scopes in classes (#118019)

18 months agoRemove more remnants of deepfreeze (#118159)
Guido van Rossum [Mon, 22 Apr 2024 19:17:57 +0000 (12:17 -0700)] 
Remove more remnants of deepfreeze (#118159)

18 months agobpo-18108: Adding dir_fd and follow_symlinks keyword args to shutil.chown (GH-15811)
tahia [Mon, 22 Apr 2024 18:23:36 +0000 (14:23 -0400)] 
bpo-18108: Adding dir_fd and follow_symlinks keyword args to shutil.chown (GH-15811)

* Adding dir_fd and follow_symlinks keyword args to shutil.chown
* Extending test_shutil.TestShutil.test_chown to include new kwargs
* Updating shutil.chown documentation

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
18 months agogh-118030: Group definitions for `ParamSpecArgs` and `ParamSpecKwargs` in `typing...
Nice Zombies [Mon, 22 Apr 2024 14:57:46 +0000 (16:57 +0200)] 
gh-118030: Group definitions for `ParamSpecArgs` and `ParamSpecKwargs` in `typing.rst` (#118154)

18 months agogh-118148: Improve tests for shutil.make_archive() (GH-118149)
Serhiy Storchaka [Mon, 22 Apr 2024 13:27:47 +0000 (16:27 +0300)] 
gh-118148: Improve tests for shutil.make_archive() (GH-118149)

18 months agoGH-115480: Reduce guard strength for binary ops when type of one operand is known...
Mark Shannon [Mon, 22 Apr 2024 12:34:06 +0000 (13:34 +0100)] 
GH-115480: Reduce guard strength for binary ops when type of one operand is known already (GH-118050)

18 months agogh-115986 Improve pprint documentation accuracy (#117403)
Kerim Kabirov [Mon, 22 Apr 2024 10:28:21 +0000 (12:28 +0200)] 
gh-115986 Improve pprint documentation accuracy (#117403)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
18 months agogh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)
Erlend E. Aasland [Mon, 22 Apr 2024 06:43:20 +0000 (08:43 +0200)] 
gh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)

Filter out '?NNN' placeholders when looking for named params.

Co-authored-by: AN Long <aisk@users.noreply.github.com>
18 months agogh-112075: Make instance attributes stored in inline "dict" thread safe (#114742)
Dino Viehland [Mon, 22 Apr 2024 05:57:05 +0000 (22:57 -0700)] 
gh-112075: Make instance attributes stored in inline "dict" thread safe (#114742)

Make instance attributes stored in inline "dict" thread safe on free-threaded builds

18 months agoDocs: replace Harry Potter reference with Monty Python (#118130)
Clément Robert [Sun, 21 Apr 2024 18:03:46 +0000 (20:03 +0200)] 
Docs: replace Harry Potter reference with Monty Python (#118130)

18 months agogh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)
Serhiy Storchaka [Sun, 21 Apr 2024 08:46:39 +0000 (11:46 +0300)] 
gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)

* Add name and mode attributes for compressed and archived file-like objects
  in modules bz2, lzma, tarfile and zipfile.
* Change the value of the mode attribute of GzipFile from integer (1 or 2)
  to string ('rb' or 'wb').
* Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.

18 months agogh-118121: Fix `test_doctest.test_look_in_unwrapped` (#118122)
Nikita Sobolev [Sun, 21 Apr 2024 07:08:32 +0000 (10:08 +0300)] 
gh-118121: Fix `test_doctest.test_look_in_unwrapped` (#118122)

18 months agogh-91629 Use conf.d configs and fish_add_path to set the PATH when installing for...
Andrew Cassidy [Sun, 21 Apr 2024 06:52:58 +0000 (23:52 -0700)] 
gh-91629 Use conf.d configs and fish_add_path to set the PATH when installing for the Fish shell. (GH-91630)

Co-authored-by: Erlend E. Aasland <erlend@python.org>