129994 Commits

Author SHA1 Message Date
Jeong, YunWon
c447d1bc14
gh-143959: Make _datetime optional for test_sys (GH-144003) 2026-01-22 12:52:16 +02:00
Rafael Weingartner-Ortner
0b5f8359c5
gh-143993: Document ways to disable remote debugging support (#143994)
Although PEP 768 mentions how to disable the mechanism of
remote debugging, it is not documented in the Python docs.

This change adds a note on how to disable remote debugging support
in a Python interpreter to the remote debugging how-to.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-22 11:41:20 +01:00
Petr Viktorin
3e66171efa
gh-142913: Revert adding test_replaced_interpreter (GH-144110)
This partially reverts commit 4d5a676aa0811563ea78ae58ef89cdc0295bf7ed
(GH-142911)

The removed test fails when re-run in --huntrleaks mode.
2026-01-22 10:40:34 +01:00
reiden
0b08438ea6
gh-130415: Narrowing to constants in branches involving is comparisons with a constant (GH-143895) 2026-01-22 09:37:45 +00:00
Brett Cannon
6181b69970
GH-143941: Move WASI-related files to Platforms/WASI (GH-143942)
Along the way, leave a deprecated Tools/wasm/wasi/__main__.py behind for backwards-compatibility.

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2026-01-21 14:31:58 -08:00
Serhiy Storchaka
cf71e34940
gh-77188: Add pickle tests for objects with slots (GH-144116) 2026-01-21 19:21:02 +02:00
Mark Shannon
9eab67d507
GH-138245: Perform boolean guards by testing a single bit, rather than a full pointer comparison. (GH-143810) 2026-01-21 15:58:27 +00:00
Steve Dower
f52af86cba
Update install manager docs (python/pymanager#227) (GH-144079) 2026-01-21 15:33:05 +00:00
CF Bolz-Tereick
5db331a561
gh-144030: Add check that argument is callable to Python version of functools.lru_cache (#144031)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-01-21 15:19:19 +01:00
Sergey B Kirpichev
4c7ec78092
gh-143869: Add PEP 757 functions to the limited API (#143906)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-21 14:47:14 +01:00
Yongtao Huang
4ef30a5871
gh-144085: Add {gi,cr}_suspended to inspect comments and generator/coroutine tests (#144086) 2026-01-21 13:33:56 +03:00
Serhiy Storchaka
9060b4abbe
gh-125346: Deprecate accepting standard Base64 alphabet when alternative alphabet is used (GH-141128)
Emit a warning in base64.urlsafe_b64decode() and base64.b64decode() when
the "+" or "/" characters occur in the Base64 data with alternative
alphabet if they are not the part of the alternative alphabet.

It is a DeprecationWarning in the strict mode (will be error) and
a FutureWarning in non-strict mode (will be ignored).
2026-01-21 09:41:58 +02:00
Tim Peters
48795b6460
GH-143948: Explain graphlib's cycle-finding code (#143950)
Explain topsort's cycle-finding algorithm, and why it's written that way.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-01-20 19:28:48 -06:00
Seth Michael Larson
95746b3a13
gh-143919: Reject control characters in http cookies
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-20 21:23:42 +00:00
Seth Michael Larson
b234a2b675
gh-143923: Reject control characters in POP3 commands 2026-01-20 20:46:32 +00:00
Seth Michael Larson
f25509e78e
gh-143925: Reject control characters in data: URL mediatypes 2026-01-20 20:45:58 +00:00
Seth Michael Larson
6262704b13
gh-143921: Reject control characters in IMAP commands 2026-01-20 20:45:42 +00:00
Donghee Na
27a7160b8b
gh-141504: Move PYTHON_UOPS_OPTIMIZE to policy object (GH-144082) 2026-01-20 18:47:38 +00:00
Neil Schemenauer
48b6866047
gh-144054: no deferred refcount for untracked (gh-144081)
This reverts gh-144055 and fixes the bug in a different way.  Deferred
reference counting relies on the object being tracked by the GC,
otherwise the object will live until interpreter shutdown.  So, take
care that we do not enable deferred reference counting for objects that
are untracked.  Also, if a tuple has deferred reference counting
enabled, don't untrack it.
2026-01-20 10:01:09 -08:00
Sam Gross
43bb6300b3
gh-143939: Fix assignment to _PyThreadStateImpl.generator_return_kind (gh-143951)
The assignment to generator_return_kind has to be after any potentially
escaping calls to ensure that it's not overwritten.
2026-01-20 17:51:55 +00:00
Hugo van Kemenade
a126893fa8
gh-143960: Add support for OpenSSL 3.6, drop EOL 3.2 (#143961)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-01-20 17:25:31 +02:00
Neil Schemenauer
795d5c5b44
gh-144054: shutdown fix for deferred ref counting (GH-144055)
When shutting down, disable deferred refcounting for all GC objects. It
is important to do this also for untracked objects, which before this
change were getting missed.

Small code cleanup:
We can remove the shutdown case disable_deferred_refcounting() call
inside scan_heap_visitor() if we are careful about it.  The key is
that frame_disable_deferred_refcounting() might fail if the object
is untracked.
2026-01-20 14:45:12 +01:00
Sergey B Kirpichev
31c81ab0a2
Update struct.__doc__: _Bool available unconditionally (#143716)
This amends commit a9296e7f3be4d6c22271b25c86467ff867c63bbb.
2026-01-20 13:09:20 +01:00
VanshAgarwal24036
fe629262c0
gh-144050: Fix stat.filemode pure Python file type detection (GH-144059) 2026-01-20 14:05:42 +02:00
Yongtao Huang
76b484b9d1
gh-143999: Fix: handle suspended state on types.coroutine wrappers (GH-144000) 2026-01-20 10:20:06 +00:00
AZero13
fa44efa0ef
gh-144023: Prevent follow_symlinks from being allowed with an fd of 0 (GH-144022)
The check was (fd > 0), should be (fd >= 0).
2026-01-20 11:50:51 +02:00
Terry Jan Reedy
fa3abf5a51
gh-143774 - Improve IDLE Format Paragraph doc (#143775)
Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.

(Also fix a couple case errors in cross references.)
2026-01-20 04:07:29 -05:00
Serhiy Storchaka
71cbffde61
gh-143754: Add Tkinter methods pack_content(), place_content() and grid_content() (GH-143845)
They use Tk commands with new name like "pack content instead of old
"pack slaves".
2026-01-20 09:16:36 +02:00
Bodhi Silberling
05eab96435
Fix typo: 'exept' -> 'except' in Lib/dbm/dumb.py (GH-144060) 2026-01-20 08:50:34 +02:00
Yongtao Huang
e66597d6c8
gh-143874: Use self.message instead of raw print in _exec_in_closure() (#143875) 2026-01-19 16:11:07 -08:00
Bartosz Sławecki
f84ea11071
gh-102809: No longer mention Misc/gdbinit in the code (#143980)
Fix misleading comment on `PyObject_Dump`.
2026-01-19 18:36:55 +01:00
Adorilson Bezerra
3c9c3d33cb
gh-106318: Add examples for str.rpartition() method (#143891) 2026-01-19 15:15:55 +01:00
Yongtao Huang
375e372c66
gh-143689: Fix BufferedReader.read1 leaving object in reentrant state on error (#143690)
BufferedReader.read1() could leave the buffered object in a
reentrant (locked) state when an exception was raised while
allocating the output buffer.

This change ensures the internal buffered lock is always released
on error, keeping the object in a consistent state after failures.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-19 15:09:30 +01:00
Aniket
72bacb0cd0
gh-142461: Move misplaced NEWS entries to an appropriate section (GH-143392) 2026-01-19 14:59:26 +02:00
Seth Michael Larson
17d1490aa9
gh-143935: Email preserve parens when folding comments (#143936)
Fix a bug in the folding of comments when flattening an email message
using a modern email policy. Comments consisting of a very long sequence of
non-foldable characters could trigger a forced line wrap that omitted the
required leading space on the continuation line, causing the remainder of
the comment to be interpreted as a new header field. This enabled header
injection with carefully crafted inputs.

Co-authored-by: Denis Ledoux <dle@odoo.com>
2026-01-19 12:38:22 +00:00
Serhiy Storchaka
bb2b9ba49d
gh-143897: Remove the isxidstart() and isxidcontinue() methods of unicodedata.ucd_3_2_0 (GH-143898)
They are now only exposed as the unicodedata function.
2026-01-19 12:37:41 +00:00
AZero13
7dca4e3af1
gh-142440: Fix _decimal builds configured with EXTRA_FUNCTIONALITY (GH-142441)
There was a typo in _decimal.Context.apply().
2026-01-19 14:19:20 +02:00
Serhiy Storchaka
813fc7a291
gh-143754: Modernize Tkinter docs (GH-143841)
Use more relevant terminology instead of "master"/"slave" widgets where possible.
2026-01-19 14:01:29 +02:00
b9788213
cb6a662bb0
gh-143866: Verify return value of pathlib.write_{bytes,text} methods in tests (#143870)
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-19 14:24:20 +03:00
Sergey B Kirpichev
d8ab1c79b0
gh-75459: versionadded for PyObject_CallFinalizer*() API (GH-143982) 2026-01-19 11:22:16 +01:00
Bartosz Sławecki
59d3594ca1
gh-143831: Compare cells by identity in forward references (#143848) 2026-01-18 21:29:11 -08:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
78b1370de9
Notify Sviat of GHA changes through codeowners (#143945)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-19 00:28:38 +02:00
Gregory P. Smith
c879b2a7a5
gh-141860: Add on_error= keyword arg to multiprocessing.set_forkserver_preload (GH-141859)
Add a keyword-only `on_error` parameter to `multiprocessing.set_forkserver_preload()`. This allows the user to have exceptions during optional `forkserver` start method module preloading cause the forkserver subprocess to warn (generally to stderr) or exit with an error (preventing use of the forkserver) instead of being silently ignored.

This _also_ fixes an oversight, errors when preloading a `__main__` module are now treated the similarly. Those would always raise unlike other modules in preload, but that had gone unnoticed as up until bug fix PR GH-135295 in 3.14.1 and 3.13.8, the `__main__` module was never actually preloaded.

Based on original work by Nick Neumann @aggieNick02 in GH-99515.
2026-01-18 14:04:18 -08:00
AN Long
54bedcf714
gh-144012: Check null binary op extend (#144014) 2026-01-19 02:38:37 +08:00
Bartosz Sławecki
63cc1257db
gh-143952: Fix asyncio tools to work with the new remote debugging API (#143954) 2026-01-17 19:16:12 -05:00
Shamil
7ca9e7ad05
Fix UBSan error in _testcapi: correct create_attr_from_spec signature (#143097)
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-17 18:05:09 +00:00
Seth Michael Larson
f7fceed79c
gh-143916: Reject control characters in wsgiref.headers.Headers (GH-143917)
* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers
2026-01-17 09:46:21 -08:00
Hai Zhu
b4b73245d8
gh-143421: Use new buffer to save optimized uops (GH-143682) 2026-01-17 15:52:16 +00:00
Peter Bierma
d51c01a271
gh-141004: Document PyException_HEAD and PyDescr_COMMON (GH-143896) 2026-01-17 10:39:29 -05:00
Hai Zhu
61ec66acd5
gh-143946: Show JitOptSymbol on abstract stack when set PYTHON_OPT_DEBUG > 4 (GH-143957) 2026-01-17 15:20:35 +00:00