Commit Graph

121869 Commits

Author SHA1 Message Date
Serhiy Storchaka 17a8af9508
gh-118402: Fix inspect.signature() for functools.cmp_to_key() result (GH-118427) 2024-04-30 17:49:28 +03:00
Serhiy Storchaka 02887c6428
gh-102402: Make test_relativeCreated_has_higher_precision less implementation dependent (GH-118062) 2024-04-30 17:35:19 +03:00
Serhiy Storchaka c0eaa232f6
gh-117860: Add tests for resolving names when import rebind names (GH-118176)
Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
2024-04-30 17:23:44 +03:00
Malcolm Smith 3b268f4edc
gh-116622: Redirect stdout and stderr to system log when embedded in an Android app (#118063) 2024-04-30 16:00:31 +02:00
Serhiy Storchaka 11f8348d78
gh-118404: Fix inspect.signature() for non-comparable callables (GH-118405) 2024-04-30 15:04:16 +03:00
Mark Shannon 5b05d452cd
GH-118095: Add tier 2 support for YIELD_VALUE (GH-118380) 2024-04-30 11:33:13 +01:00
edson duarte 0f797402bc
gh-85453: Consistent backquotes on None occurences across datetime.rst (#118282) 2024-04-30 10:34:15 +02:00
Donghee Na 11cbf77f97
gh-118392: Add note about random.random for multi thread app (gh-118396) 2024-04-30 13:42:13 +09:00
Savannah Ostrowski 8b56d82c59
GH-118306: Update JIT to use LLVM 18 (GH-118307) 2024-04-29 21:09:16 +00:00
Tian Gao 8e4fb5d260
gh-118359: Improve docs for Bdb.user_call (#118368)
The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None.
2024-04-29 21:57:49 +01:00
Steve Dower 96d8ca7ad6
gh-118347: Fix Windows installer not updating launcher (GH-118386) 2024-04-29 21:46:25 +01:00
Alex Turner 2ba1aed596
gh-117657: TSAN fix race on `gstate->young.count` (#118313) 2024-04-29 20:26:26 +00:00
Sam Gross 79688b5b0e
gh-118331: Handle errors in _PyObject_SetManagedDict (#118334)
When detaching a dict, the `copy_values` call may fail due to
out-of-memory errors. This can be triggered by test_no_memory in
test_repl.
2024-04-29 15:49:01 -04:00
Hugo van Kemenade ee3413c1c7
gh-118401: Docs: Use Sphinx short options (#118403) 2024-04-29 19:41:59 +00:00
Eric Snow 529a160be6
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.
2024-04-29 12:53:04 -06:00
Sam Gross 7ccacb220d
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.
2024-04-29 14:36:02 -04:00
Hugo van Kemenade 8d4b756fd3
Docs: Upgrade to Sphinx 7.3 (#118397) 2024-04-29 11:40:50 -06:00
mpage 43fa76638f
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.
2024-04-29 16:56:51 +00:00
Serhiy Storchaka 444ac0b7a6
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.
2024-04-29 19:30:48 +03:00
Kirill Podoprigora 51c70de998
gh-118351: Adapt support.TEST_MODULES_ENABLED for builds without the config variable (GH-118354) 2024-04-29 16:50:11 +01:00
Eric Snow 44f57a952e
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.
2024-04-29 09:29:07 -06:00
Nikita Sobolev 23d0371bb9
Uncomment one grammar test (#118361) 2024-04-29 14:16:51 +03:00
Xie Yanbo 3c39f335cb
gh-114099: Fix typos in iOS/README.rst (GH-118378) 2024-04-29 14:15:15 +03:00
Xie Yanbo 98739c9078
Fix typo in Doc/c-api/exceptions.rst (GH-118371) 2024-04-29 14:02:54 +03:00
Xie Yanbo 0315521c52
Fix typo in Doc/howto/timerfd.rst (GH-118376) 2024-04-29 14:01:03 +03:00
Xie Yanbo 030fcc47fb
Fix typo in Doc/c-api/typeobj.rst (GH-118377) 2024-04-29 10:59:38 +00:00
Tian Gao 375c94c75d
gh-107674: Lazy load line number to improve performance of tracing (GH-118127) 2024-04-29 09:54:52 +01:00
Erlend E. Aasland c7e7bfc4ca
gh-115119: Detect _decimal dependencies using pkg-config (#115406)
pkg-config is supported for libmpdec 4.0.0 and newer.
2024-04-29 08:58:57 +02:00
Mark Shannon ab6eda0ee5
GH-118095: Allow a variant of RESUME_CHECK in tier 2 (GH-118286) 2024-04-29 07:54:05 +01:00
Kirill Podoprigora aa8f6d2708
gh-118374: test_ast: Add ``ctx`` argument to ``ast.Name`` calls (#118375) 2024-04-29 05:38:46 +00:00
Henrik Tunedal 133c1a7cdb
gh-118293: Suppress mouse cursor feedback when launching Windows processes with multiprocessing (GH-118315) 2024-04-28 21:10:44 +00:00
Hugo van Kemenade f5b7e397c0
gh-101100: Fix Sphinx warnings in `whatsnew/3.10.rst` (#118356) 2024-04-28 18:12:25 +00:00
Hugo van Kemenade 33c6cf3148
gh-101100: Fix Sphinx warnings in `library/faulthandler.rst` (#118353) 2024-04-28 12:06:45 -06:00
Hugo van Kemenade e0ab642436
gh-101100: Fix Sphinx warnings in `whatsnew/3.9.rst` (#118364) 2024-04-28 20:31:22 +03:00
Xie Yanbo c618d53a3a
Fix typo in Tools/wasm/README.md(#118358) 2024-04-28 18:00:48 +01:00
Jelle Zijlstra 2326d6c868
gh-109118: Make comprehensions work within annotation scopes, but without inlining (#118160)
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-04-28 06:21:28 -07:00
Nikita Sobolev 51aefc5bf9
gh-118323: Document `&&` grammar syntax (#118324) 2024-04-27 11:36:06 +01:00
Wulian233 c57326f487
Correct typo in iOS README (#118341) 2024-04-27 10:25:32 +01:00
Xie Yanbo 8397d8d300
Correct spelling error in recent NEWS entry (#118308) 2024-04-26 19:06:08 -07:00
Eric Snow 1d33925176
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.
2024-04-26 19:13:44 -06:00
Cheryl Sabella 194fd17bc6
bpo-32839: Add the after_info() method for Tkinter widgets (GH-5664) 2024-04-27 00:27:58 +03:00
Pablo Galindo Salgado b43c7e1070
gh-112730: Respect tests that require environment variables with no-colorize fixes (#118288) 2024-04-26 21:23:30 +01:00
Sam Gross 5a90de0d4c
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.
2024-04-26 14:22:29 -04:00
Mark Shannon 3e06c7f719
GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 (GH-118279) 2024-04-26 18:08:50 +01:00
neonene 63add11704
gh-117680: Fix msvc warning in instruction_sequence.c (#118326) 2024-04-26 17:20:30 +01:00
Tian Gao 0f99861332
gh-117385: Remove unhooked events on sys.settrace (GH-117386) 2024-04-26 17:01:44 +01:00
mpage a5eeb832c2
gh-117657: Fix race data race in `_Py_IsOwnedByCurrentThread()` (#118258) 2024-04-26 10:39:08 -04:00
Philipp A 5a4d3df2fa
Fix note in Enum.__new__ docs (#118284) 2024-04-26 07:06:53 -07:00
Kirill Podoprigora 463c20dae9
gh-117928: Bump the minimum Sphinx version to 6.2.1 (#117853)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-26 13:10:16 +03:00
Petr Viktorin ef940dec40
gh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237) 2024-04-26 11:01:30 +02:00