Commit graph

129289 commits

Author SHA1 Message Date
Peter Bierma
e1f1df4082
gh-141004: Document stack effect C APIs (GH-141843)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-24 12:18:50 -05:00
Peter Bierma
5f35702bb6
gh-141004: Document PyImport_Inittab (GH-141844)
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-24 16:38:18 +00:00
Sam Gross
71126ab19c
gh-129441: Fix some flakiness in test_instrumentation (gh-141881)
Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
2025-11-24 11:19:07 -05:00
Sam Gross
c490ffb7ac
gh-116749: Fix code comment for _PyConfig_GIL_DEFAULT (gh-141804) 2025-11-24 10:42:00 -05:00
Cody Maloney
b484c32d0a
gh-141863: use bytearray.take_bytes in asyncio streams for better performance (#141864) 2025-11-24 21:06:53 +05:30
Adorilson Bezerra
fb655527d8
gh-106318: Add examples for str.join() (#140315)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-24 16:53:25 +02:00
Adorilson Bezerra
0cde70bde0
gh-106318: Add example for str.format() (#137018) 2025-11-24 16:51:10 +02:00
Satyam Kumar Verman
9346e22dd0
gh-141831: Document behavior of functools.lru_cache with concurrent access (gh-141869) 2025-11-24 14:36:09 +00:00
Pablo Galindo Salgado
04e3670f6b
gh-138122: Fix permission error detection in tachyon's test (#141897) 2025-11-24 14:32:17 +00:00
Adorilson Bezerra
0387a8e0f7
gh-106318: Add example for str.isalpha() (#137557)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-24 14:10:35 +00:00
Alexander Nordin
a4f4225213
gh-138199: Address potential confusion regarding threading in the asyncio HOWTO (GH-138200) 2025-11-24 14:08:49 +00:00
Adorilson Bezerra
0afcb51d17
gh-106318: Add example for str.isascii() (#137558)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-24 16:02:18 +02:00
Yashraj
e0773eacb7
gh-141004: Document Py_ARRAY_LENGTH (GH-141601)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-24 13:34:37 +00:00
Petr Viktorin
bf66bce4ee
gh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed (GH-141785) 2025-11-24 13:26:35 +01:00
Adorilson Bezerra
6462322840
gh-106318: Add example for str.isdecimal() (#137559)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-24 11:47:54 +00:00
Pablo Galindo Salgado
3eec46d3c3
gh-138122: Refactor the CLI of profiling.sampling into subcommands (#141813) 2025-11-24 11:45:08 +00:00
Duane Griffin
425f24e4fa
gh-135335: Simplify preload regression test using __main__ (GH-138686)
Simplify preload regression test using `__main__`

With the fix for gh-126631 `__main__` modules can be preloaded and the regression
test for gh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that `__main__` is preloaded by default.
2025-11-23 15:37:15 -08:00
Mark Dufour
23b67aa037
math.dist documentation: add 'strict=True' to equivalent code (#141819) 2025-11-23 17:33:27 -06:00
Stan Ulbrych
4fe6e81d84
gh-141865: Fix translation of strings in changes.py extension (#141882) 2025-11-23 19:28:09 +02:00
yihong
ecb901dd87
Drop three unused imports (#141875) 2025-11-23 16:33:05 +00:00
Sam Gross
e457d60daa
gh-120158: Fix inconsistent monitoring state when setting events too frequently (gh-141845)
If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
2025-11-23 10:07:17 -05:00
Gregory P. Smith
614a28b3da
gh-98552: Revert (unneeded, already done elsewhere) "flush std streams in the multiprocessing forkserver before fork (#141849)" (#141871)
Revert (unneeded, already done elsewhere) "gh-98552: flush std streams in the multiprocessing forkserver before fork (#141849)"

This reverts commit 58badb1711.
2025-11-23 09:52:26 +00:00
Gregory P. Smith
2746c698e3
[security] Add a cooldown period to dependabot (GH-141866)
See https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns and the description in the comment.
2025-11-23 01:34:48 -08:00
Hugo van Kemenade
e73fbbacbb
gh-141679: Add colour to defaults in argparse help (#141680)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-11-23 00:26:50 +00:00
Brandt Bucher
227b9d326e
GH-140638: Add a GC "candidates" stat (GH-141814) 2025-11-22 21:59:14 +00:00
Serhiy Storchaka
425fd85ca3
gh-138525: Support single-dash long options and prefix_chars in BooleanOptionalAction (GH-138692)
-nofoo is generated for -foo.
++no-foo is generated for ++foo.
/nofoo is generated for /foo.
2025-11-22 20:54:02 +00:00
Adam Turner
cde19e565c
GH-101100: Resolve reference warnings in library/stdtypes.rst (#138420) 2025-11-22 19:23:29 +00:00
Weilin Du
d4e3829a74
gh-101100: Fix sphinx warnings in library/unittest.rst (#140109)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-22 21:16:09 +02:00
Gregory P. Smith
58badb1711
gh-98552: flush std streams in the multiprocessing forkserver before fork (#141849)
* flush std streams in the multiprocessing forkserver before fork

* NEWS
2025-11-22 18:29:51 +00:00
Andrew J. Hesford
08477dbf30
gh-141600: Fix musl version detection on Void Linux (GH-141602) 2025-11-22 12:17:40 -06:00
David Benjamin
c41fce08a5
gh-141801: Use accessors for ASN1_STRING fields in libssl (GH-141802)
* gh-141801: Use accessors for ASN1_STRING fields

While ASN1_STRING is currently exposed, it is better to use the
accessors. See https://github.com/openssl/openssl/issues/29117 where, if
the type were opaque, OpenSSL's X509 objects could be much more
memory-efficient.

* Update Modules/_ssl.c

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Update Modules/_ssl.c

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-22 09:17:45 -08:00
Semyon Moroz
5c25bc5763
gh-131178: Add tests for pickletools command-line interface (#131287) 2025-11-22 19:17:06 +02:00
Chris Angelico
f21ed37daf
gh-141817: Add IPV6_HDRINCL constant to the socket module (#141818)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-22 18:07:21 +01:00
Yongzi Li
dc9d2eea58
gh-141833: Remove the bad lines in test_attr_promotion_failure (GH-141841) 2025-11-23 00:27:05 +08:00
Pablo Galindo Salgado
92972aea0f
gh-140381: Make test_profiling tests deterministic to fix flakiness (#141731) 2025-11-21 21:36:30 +00:00
Sam Gross
2d50dd242e
gh-137422: Fix race condition in PyImport_AddModuleRef (gh-141822) 2025-11-21 13:30:33 -05:00
Cody Maloney
019c315a8e
gh-129559: add bytearray.resize thread safety test for free-threading (#141739) 2025-11-21 23:42:22 +05:30
Mikhail Efimov
a3b78a3ade
gh-141498: Change backoff counter to use prime numbers instead of powers of 2 (GH-141591) 2025-11-21 17:00:25 +00:00
Alper
fb26d9c2ef
gh-116738: Make csv module thread-safe (gh-141365)
Added a critical section to protect the states of `ReaderObj` and `WriterObj` in the free-threading build. Without the critical sections, both new free-threading tests were crashing.
2025-11-21 11:22:31 -05:00
Paresh Joshi
f15f6d0ba3
gh-141612: improve test_trampoline_works_with_forks coverage (#141613) 2025-11-21 16:01:26 +00:00
Kumar Aditya
49ff8b6cc0
gh-140795: fetch thread state once on fast path for critical sections (#141406) 2025-11-21 19:49:53 +05:30
Pablo Galindo Salgado
cb4c87df75
gh-141645: Add profiling/sampling/live_collector to the makefile and remove spurious file (#141820) 2025-11-21 13:34:04 +00:00
Sergey Miryanov
a8733cbc73
GH-139727: Add --enable-stackref-debug flag to build.bat to enable Py_STACKREF_DEBUG build on Windows (GH-139728) 2025-11-21 11:03:32 +00:00
Michael Kiper
20b69aac0d
gh-141729: Doc PyTypeObject.tp_vectorcall grammar fix (#141730)
[3.14] Doc PyTypeObject.tp_vectorcall grammar fix

Co-authored-by: makiper <michael.kiper@jpl.nasa.gov>
2025-11-21 07:24:10 +00:00
Pablo Galindo Salgado
07410da204
gh-141645: Refactor tachyon's live TUI tests to not use private fields (#141806) 2025-11-21 00:35:37 +00:00
Serhiy Storchaka
77cb39e0c7
gh-138697: Fix inferring dest from a single-dash long option in argparse (#138699)
* gh-138697: Fix inferring dest from a single-dash long option in argparse

If a short option and a single-dash long option are passed to add_argument(),
dest is now inferred from the single-dash long option.

* Make double-dash options taking priority over single-dash long options.

---------

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-11-20 18:41:58 +00:00
Pablo Galindo Salgado
b3383085f9
gh-141645: Add a TUI mode to the new tachyon profiler (#141646) 2025-11-20 18:27:17 +00:00
Cody Maloney
e90061f5f1
gh-60107: Remove a copy from RawIOBase.read (#141532)
If the underlying I/O class keeps a reference to the memory, raise BufferError.

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-20 17:37:04 +00:00
Victor Stinner
722f4bb8c9
gh-141784: Fix _remote_debugging_module.c compilation on 32-bit Linux (#141796)
Include Python.h before system headers to make sure that
_remote_debugging_module.c uses the same types (ABI) than Python.
2025-11-20 16:30:35 +00:00
Prithviraj Chaudhuri
b1558b6d3e
gh-140042: Removing unsafe call to sqlite3_shutdown (GH-141690) 2025-11-20 15:35:22 +01:00