]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 weeks agogh-98894: Check readelf failures in test_dtrace (#152345)
stratakis [Thu, 2 Jul 2026 13:33:47 +0000 (15:33 +0200)] 
gh-98894: Check readelf failures in test_dtrace (#152345)

Report readelf command failures directly instead of later failing with
missing-probe assertions.

3 weeks agogh-152680: Detect virtualization on Windows in pythoninfo (#152824)
Victor Stinner [Thu, 2 Jul 2026 13:00:51 +0000 (15:00 +0200)] 
gh-152680: Detect virtualization on Windows in pythoninfo (#152824)

Use WMI to detect virtualization on Windows.

Replace wmic command with _wmi module to get the operating system caption and
version.

The wmic tool is deprecated since January 2024:
https://techcommunity.microsoft.com/blog/windows-itpro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/4039242

For example, it's no longer installed in Windows images on GitHub
Action.

Fix also run_command(): no longer try to spawn a subprocess if the
platform doesn't support subprocess. It avoids logging run_command()
errors.

3 weeks agogh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751)
Serhiy Storchaka [Thu, 2 Jul 2026 12:55:58 +0000 (15:55 +0300)] 
gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751)

Some IMAP servers send an extra blank line after the data of a literal.
imaplib mistook it for the response trailer and failed on the next
command.  Such a blank line is now skipped.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks agogh-150069: Test frozen dataclass and properties interaction (#150070)
sobolevn [Thu, 2 Jul 2026 12:48:47 +0000 (15:48 +0300)] 
gh-150069: Test frozen dataclass and properties interaction (#150070)

3 weeks agogh-49680: Add translate_line_endings parameter to imaplib.IMAP4.append (GH-152775)
Serhiy Storchaka [Thu, 2 Jul 2026 11:17:37 +0000 (14:17 +0300)] 
gh-49680: Add translate_line_endings parameter to imaplib.IMAP4.append (GH-152775)

Pass False to send the message as an exact sequence of octets, without
rewriting bare CR or LF to CRLF.

Also add tests for the APPEND command, including an email message
round-trip.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: harjoth <harjoth.khara@gmail.com>
3 weeks agogh-66335: Add tests for imaplib command methods (GH-152872)
Serhiy Storchaka [Thu, 2 Jul 2026 10:14:44 +0000 (13:14 +0300)] 
gh-66335: Add tests for imaplib command methods (GH-152872)

Add coverage tests for the IMAP4 command methods and their UID variants
(SELECT, CREATE, COPY, STORE, FETCH, SEARCH, SORT, THREAD, DELETE,
RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, STATUS, the ACL and quota
commands, ANNOTATION, PROXYAUTH and ENABLE), plus test helpers
(splitargs, parse_sequence_set, make_simple_handler) and per-command
argument capture in the test server.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks agogh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures ...
Simon Knott [Thu, 2 Jul 2026 07:50:12 +0000 (09:50 +0200)] 
gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (#152585)

3 weeks agogh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778)
Serhiy Storchaka [Thu, 2 Jul 2026 07:19:11 +0000 (10:19 +0300)] 
gh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778)

IMAP4_SSL() and IMAP4.starttls() do not verify the server certificate or
hostname unless a suitable ssl_context is passed.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks agogh-79964: Clarify the imaplib fetch example in the docs (GH-152780)
Serhiy Storchaka [Thu, 2 Jul 2026 07:18:51 +0000 (10:18 +0300)] 
gh-79964: Clarify the imaplib fetch example in the docs (GH-152780)

A FETCH response may contain additional or unsolicited data, so the
message is not always data[0][1].

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks agogh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768)
Serhiy Storchaka [Thu, 2 Jul 2026 07:15:13 +0000 (10:15 +0300)] 
gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768)

Connecting to a server that does not send a valid IMAP4 greeting, such as
a POP3 server answering on the IMAP port, failed with the unhelpful
"imaplib.IMAP4.error: None".  A meaningful message is now raised instead.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks agogh-63121: Refresh imaplib capabilities on state changes (GH-152752)
Serhiy Storchaka [Thu, 2 Jul 2026 07:10:27 +0000 (10:10 +0300)] 
gh-63121: Refresh imaplib capabilities on state changes (GH-152752)

imaplib fetched the server capabilities only once, at connection time.
They are now also refreshed after a successful LOGIN or AUTHENTICATE,
from the CAPABILITY response the server sent or, if it sent none, by
querying it.  This lets methods such as enable() see capabilities added
after login, for example ENABLE on Gmail (gh-103451).

Capabilities advertised in the server greeting are now used too, saving
a redundant CAPABILITY command.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks agogh-135142: update idlelib News3.txt for 9 issues (#152839)
Terry Jan Reedy [Thu, 2 Jul 2026 02:54:30 +0000 (22:54 -0400)] 
gh-135142: update idlelib News3.txt for 9 issues (#152839)

13 posted 2026 June 30 for various issues.
Edited one other by me.

3 weeks agogh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (#151968)
tonghuaroot (童话) [Thu, 2 Jul 2026 00:34:16 +0000 (08:34 +0800)] 
gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (#151968)

3 weeks agogh-82183: Do not restart the busy IDLE shell when running without restart (#152745)
Serhiy Storchaka [Wed, 1 Jul 2026 23:00:18 +0000 (02:00 +0300)] 
gh-82183: Do not restart the busy IDLE shell when running without restart (#152745)

"Run... Customized" with "Restart shell" unchecked restarted the shell
anyway when it was busy executing code, killing any pending input.  It now
reports that the shell is executing just once, not twice, and does not run.

3 weeks agogh-75595: Do not save a blank int entry in IDLE Settings (#152743)
Serhiy Storchaka [Wed, 1 Jul 2026 21:57:47 +0000 (00:57 +0300)] 
gh-75595: Do not save a blank int entry in IDLE Settings (#152743)

gh-83653: Do not save a blank int entry in IDLE Settings

Blanking an integer entry wrote an empty string to the config file, which
caused an "invalid int value" warning when it was read back.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
3 weeks agogh-65339: Save IDLE Shell and Output windows as text by default (#152742)
Serhiy Storchaka [Wed, 1 Jul 2026 20:36:34 +0000 (23:36 +0300)] 
gh-65339: Save IDLE Shell and Output windows as text by default (#152742)

Their content is not Python source, so the Save As dialog now lists text
files first and defaults to a ".txt" extension.

3 weeks agogh-152433 Allow faulthandler.c to build for Windows UWP (GH-152688)
thexai [Wed, 1 Jul 2026 18:50:07 +0000 (20:50 +0200)] 
gh-152433 Allow faulthandler.c to build for Windows UWP (GH-152688)

3 weeks agogh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom...
Petr Vaganov [Wed, 1 Jul 2026 17:38:09 +0000 (22:38 +0500)] 
gh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom` (#152770)

3 weeks agogh-80504: Always show the full search path in IDLE Find in Files (#152740)
Serhiy Storchaka [Wed, 1 Jul 2026 17:05:56 +0000 (20:05 +0300)] 
gh-80504: Always show the full search path in IDLE Find in Files (#152740)

The "In files:" field of the Find in Files dialog now always contains a
full directory path, so the grep output shows which directory was searched.

3 weeks agogh-134300: Remove idlelib from the path of the IDLE user process (#152739)
Serhiy Storchaka [Wed, 1 Jul 2026 16:35:57 +0000 (19:35 +0300)] 
gh-134300: Remove idlelib from the path of the IDLE user process (#152739)

The idlelib directory ends up on sys.path when idle.py is run as a script,
and it was passed to the user process, where it let user code import
idlelib submodules as top-level modules, such as "import help".

3 weeks agogh-89360: Fix ValueError in IDLE MultiCall event_delete (#152738)
Serhiy Storchaka [Wed, 1 Jul 2026 16:22:03 +0000 (19:22 +0300)] 
gh-89360: Fix ValueError in IDLE MultiCall event_delete (#152738)

Deleting a key binding for a sequence not bound to the virtual event no
longer raises a ValueError; the discrepancy is now ignored.

3 weeks agogh-71956: Fix IDLE Replace All searching up without wrap around (#152737)
Serhiy Storchaka [Wed, 1 Jul 2026 15:55:43 +0000 (18:55 +0300)] 
gh-71956: Fix IDLE Replace All searching up without wrap around (#152737)

When the search direction is "Up" and "Wrap around" is off, Replace All
replaced only the first match above the current position (and all matches
below it).  It now replaces all matches from the start of the text down to
the current position, consistently with the "Up" direction.

3 weeks agogh-66331: Set correct WM_CLASS on X11 for IDLE windows (#152733)
Serhiy Storchaka [Wed, 1 Jul 2026 15:10:49 +0000 (18:10 +0300)] 
gh-66331: Set correct WM_CLASS on X11 for IDLE windows (#152733)

Set the WM_CLASS of IDLE's long-lived windows (window-list windows and
the stack viewers) to "Idle" instead of the default "Toplevel", so that
window managers group and label them correctly.

3 weeks agoUse tk_scaling() instead of a raw Tcl call in IDLE and tkinter tests (#152788)
Terry Jan Reedy [Wed, 1 Jul 2026 15:08:37 +0000 (11:08 -0400)] 
Use tk_scaling() instead of a raw Tcl call in IDLE and tkinter tests (#152788)

Replace `tk.call('tk', 'scaling')` with `tk_scaling()`, which
returns a float, in idlelib.util and test_tkinter.widget_tests.

Co-authored-by: serhiy-storchaka
3 weeks agoGH-148874: Make sure that mngr.__exit__() is always called in a with statement (GH...
Mark Shannon [Wed, 1 Jul 2026 14:15:33 +0000 (15:15 +0100)] 
GH-148874: Make sure that mngr.__exit__() is always called in a with statement (GH-150911)

* Even if there is an interrupt during the call to mngr.__enter__()

3 weeks agoFix copy paste error with Py_mod_state_traverse (GH-152776)
Petr Viktorin [Wed, 1 Jul 2026 12:22:34 +0000 (14:22 +0200)] 
Fix copy paste error with Py_mod_state_traverse (GH-152776)

Co-authored-by: hydrogen-mvm <hydrogen-mvm@users.noreply.github.com>
3 weeks agogh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502)
Petr Viktorin [Wed, 1 Jul 2026 11:47:00 +0000 (13:47 +0200)] 
gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502)

With one exception, all "stealing" functions also steal on error,
but it makes sense to note this in each case.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
3 weeks agoBump the `actions/{github-script,checkout}` and `j178/prek-action` actions (#152760)
dependabot[bot] [Wed, 1 Jul 2026 11:36:43 +0000 (11:36 +0000)] 
Bump the `actions/{github-script,checkout}` and `j178/prek-action` actions (#152760)

Bumps the actions group with 3 updates: [actions/github-script](https://github.com/actions/github-script), [actions/checkout](https://github.com/actions/checkout) and [j178/prek-action](https://github.com/j178/prek-action).

Updates `actions/github-script` from 8.0.0 to 9.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3)

Updates `actions/checkout` from 6.0.2 to 7.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/de0fac2e4500dabe0009e67214ff5f5447ce83dd...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0)

Updates `j178/prek-action` from 1.1.1 to 2.0.4
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](https://github.com/j178/prek-action/compare/0bb87d7f00b0c99306c8bcb8b8beba1eb581c037...bdca6f102f98e2b4c7029491a53dfd366469e33d)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: j178/prek-action
  dependency-version: 2.0.4
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 weeks agoUse `@force_not_colorized` in `test_syntactical_future_repl` (#152749)
Shahar Naveh [Wed, 1 Jul 2026 11:20:38 +0000 (14:20 +0300)] 
Use `@force_not_colorized` in `test_syntactical_future_repl` (#152749)

3 weeks agoBump `hypothesis` from `6.151.9` to `6.155.3` in `Tools/requirements-hypothesis.txt...
dependabot[bot] [Wed, 1 Jul 2026 10:14:23 +0000 (12:14 +0200)] 
Bump `hypothesis` from `6.151.9` to `6.155.3` in `Tools/requirements-hypothesis.txt` (#152758)

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.151.9 to 6.155.3.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.151.9...v6.155.3)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-version: 6.155.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 weeks agogh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (#152161)
tonghuaroot (童话) [Wed, 1 Jul 2026 09:54:02 +0000 (17:54 +0800)] 
gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (#152161)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-133031: Fix test_textbox_unicode on a narrow build (GH-152750)
Serhiy Storchaka [Wed, 1 Jul 2026 08:43:19 +0000 (11:43 +0300)] 
gh-133031: Fix test_textbox_unicode on a narrow build (GH-152750)

A narrow build stores one byte per cell, so skip the multi-byte cases there,
as already done for test_textbox_edit_wide.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952)
Jiucheng(Oliver) [Wed, 1 Jul 2026 05:31:43 +0000 (01:31 -0400)] 
gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952)

Fix tests in test_compileall, test_import, test_importlib, test_py_compile, and test_inspect to neutralize PYTHONPYCACHEPREFIX

3 weeks agogh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (#152729)
Terry Jan Reedy [Wed, 1 Jul 2026 04:58:39 +0000 (00:58 -0400)] 
gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (#152729)

IDLE - move 3 toplevel fix_xyz functions to idlelb.util

Move idlelib functions run.fix_scaling, editor.fixwordbreaks
(as fix_word_breaks).  All are used in at least 3 modules.

3 weeks agogh-152711: Add pythoninfo-build command to Platforms/Android (#152713)
Victor Stinner [Wed, 1 Jul 2026 03:00:03 +0000 (05:00 +0200)] 
gh-152711: Add pythoninfo-build command to Platforms/Android (#152713)

Add a pythoninfo-build command to Platforms/Android to display build
info of the build Python. The command runs "make pythoninfo".

ci and build commands now also run pythoninfo-build

3 weeks agogh-152715: Add pythoninfo-build command to Platforms/Apple (#152716)
Victor Stinner [Wed, 1 Jul 2026 02:59:42 +0000 (04:59 +0200)] 
gh-152715: Add pythoninfo-build command to Platforms/Apple (#152716)

Add a pythoninfo-build command to Platforms/Apple to display build
info of the build Python. The command runs "make pythoninfo".

The "ci" and "build" commands now also run "pythoninfo-build".

3 weeks agogh-152433: Windows: enable mmapmodule for UWP (#152473)
thexai [Tue, 30 Jun 2026 20:49:01 +0000 (22:49 +0200)] 
gh-152433: Windows: enable mmapmodule for UWP (#152473)

3 weeks agogh-152433: Windows: use GetFileSizeEx instead of GetFileSize for memory mapped files...
thexai [Tue, 30 Jun 2026 20:35:44 +0000 (22:35 +0200)] 
gh-152433: Windows: use GetFileSizeEx instead of GetFileSize for memory mapped files (#152383)

3 weeks agoGH-81881: Raise `SpecialFileError` for sockets and devices in `shutil.copyfile` ...
Savannah Ostrowski [Tue, 30 Jun 2026 19:50:41 +0000 (12:50 -0700)] 
GH-81881: Raise `SpecialFileError` for sockets and devices in `shutil.copyfile` (#142693)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
3 weeks agogh-152502: Detect the curses mouse interface and is_* methods portably (GH-152705)
Serhiy Storchaka [Tue, 30 Jun 2026 19:24:07 +0000 (22:24 +0300)] 
gh-152502: Detect the curses mouse interface and is_* methods portably (GH-152705)

The mouse interface (getmouse(), has_mouse(), the BUTTON* constants,
window.mouse_trafo(), ...) and the window is_*() state-query methods were gated
on ncurses-specific macros, so they were dropped on other curses implementations
that provide them, such as NetBSD curses and PDCurses.

Gate them instead on configure capability probes (for functions NetBSD curses
provides, since it defines no identifying macro) or on NCURSES_EXT_FUNCS or the
PDCURSES macro (for functions only ncurses and PDCurses provide).  Probe for
getmouse() with its X/Open getmouse(MEVENT *) signature, since PDCurses declares
an incompatible getmouse(void) unless built for the ncurses mouse API, which
PDC_NCMOUSE now always selects.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-145857: Replace `DELETE_GLOBAL` with `PUSH_NULL; STORE_GLOBAL` (GH-146314)
Brij Kapadia [Tue, 30 Jun 2026 18:04:56 +0000 (14:04 -0400)] 
gh-145857: Replace `DELETE_GLOBAL` with `PUSH_NULL; STORE_GLOBAL` (GH-146314)

3 weeks agogh-145854: Replace `DELETE_NAME` with `PUSH_NULL; STORE_NAME` (GH-146006)
Brij Kapadia [Tue, 30 Jun 2026 16:21:31 +0000 (12:21 -0400)] 
gh-145854: Replace `DELETE_NAME` with `PUSH_NULL; STORE_NAME` (GH-146006)

3 weeks agogh-152680: Detect container/VM in test.pythoninfo (#152668)
Victor Stinner [Tue, 30 Jun 2026 15:11:57 +0000 (17:11 +0200)] 
gh-152680: Detect container/VM in test.pythoninfo (#152668)

On Apple, log the hardware model as "system.hardware".

* Log the "CI", "IMAGE_OS_VERSION" and "container"
  environment variables.
* Add run_command() and first_line() functions.

3 weeks agogh-152682: Fix NULL dereference on OOM in `symtable_visit_type_param_bound_or_default...
Petr Vaganov [Tue, 30 Jun 2026 14:45:25 +0000 (21:45 +0700)] 
gh-152682: Fix NULL dereference on OOM in `symtable_visit_type_param_bound_or_default` (#152684)

In `symtable_visit_type_param_bound_or_default()`, when a reserved name
(e.g. `__classdict__`) is used as a type parameter, `PyUnicode_FromFormat()`
is called to build the SyntaxError message. If the allocation fails and
returns NULL, the subsequent `PyErr_SetObject()` and `Py_DECREF()` calls
would dereference NULL, causing a segfault.

Fix by returning 0 immediately when `PyUnicode_FromFormat()` returns NULL.
This propagates the MemoryError set by `PyUnicode_FromFormat()`.

The bug was introduced in gh-128632 (commit 891c61c).

3 weeks agogh-151881: Skip tk_inactive negativity check on Windows (GH-152683)
Serhiy Storchaka [Tue, 30 Jun 2026 14:25:42 +0000 (17:25 +0300)] 
gh-151881: Skip tk_inactive negativity check on Windows (GH-152683)

On Windows the inactivity time can overflow to a negative value
(Tk ticket 3cb7c4ac72d4).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152546: Refactor `mappingproxy.__new__` to use `PyDictProxy_New` (#152547)
sobolevn [Tue, 30 Jun 2026 13:58:31 +0000 (16:58 +0300)] 
gh-152546: Refactor `mappingproxy.__new__` to use `PyDictProxy_New` (#152547)

3 weeks agogh-151126: Fix a possible crash during the startup with no memory under `Py_STACKREF_...
sobolevn [Tue, 30 Jun 2026 11:28:17 +0000 (14:28 +0300)] 
gh-151126: Fix a possible crash during the startup with no memory under `Py_STACKREF_DEBUG` (#152478)

3 weeks agogh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.creat...
Steve Stagg [Tue, 30 Jun 2026 10:57:28 +0000 (11:57 +0100)] 
gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.create()` (#152642)

Previously, an allocation failure when creating
the lock for a channel in `_interpchannels` would trigger an assert.
Caused by `handle_channel_error` being passed an error code of -1
which is only allowed if an exception has been set.
(in this case, no exception was set)

`channelsmod_create` now forwards the error code from `channel_create`
which `handle_channel_error` already handled.

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks agogh-151029: Fix `test_remote_exec_deleted_static_executable` on static installed build...
Stan Ulbrych [Tue, 30 Jun 2026 10:40:16 +0000 (12:40 +0200)] 
gh-151029: Fix `test_remote_exec_deleted_static_executable` on static installed builds (GH-152653)

3 weeks agogh-121249: Deprecate using F/D type codes in the struct module (#152309)
Sergey B Kirpichev [Tue, 30 Jun 2026 09:57:22 +0000 (12:57 +0300)] 
gh-121249: Deprecate using F/D type codes in the struct module (#152309)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks agogh-152192: Fix JUMP_BACKWARD passing a truncated oparg to the jit tracer (GH-152382)
Timofei [Tue, 30 Jun 2026 09:46:59 +0000 (12:46 +0300)] 
gh-152192: Fix JUMP_BACKWARD passing a truncated oparg to the jit tracer (GH-152382)

3 weeks agoDon't require the `_test{internal}capi` modules in `test_monitoring.py` (#152311)
Shahar Naveh [Tue, 30 Jun 2026 09:27:51 +0000 (12:27 +0300)] 
Don't require the `_test{internal}capi` modules in `test_monitoring.py` (#152311)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-50966: Fix unbounded recursion in turtle drag handlers (GH-152626)
Serhiy Storchaka [Tue, 30 Jun 2026 09:19:43 +0000 (12:19 +0300)] 
gh-50966: Fix unbounded recursion in turtle drag handlers (GH-152626)

TurtleScreenBase._update() redraws with cv.update(), which also reprocesses
input events, so a handler that moves the turtle (such as
screen.ondrag(turtle.goto)) reenters _update() for every queued event until
the interpreter crashes.  A reentrant _update() now only flushes drawing with
update_idletasks().

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152325: Gate curses.has_mouse() on the ncurses patch level (GH-152652)
Serhiy Storchaka [Tue, 30 Jun 2026 09:09:09 +0000 (12:09 +0300)] 
gh-152325: Gate curses.has_mouse() on the ncurses patch level (GH-152652)

has_mouse() was added to ncurses after the 5.7 release, but the binding
guarded it only with NCURSES_MOUSE_VERSION, which 5.7 already defines, so
the module failed to compile against ncurses 5.7 (such as the system
curses on macOS).  Gate it additionally on NCURSES_EXT_FUNCS, which holds
the library's patch date.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-133510: Add links to more info for the match statement in FAQ anwser (#133511)
xzkdeng [Tue, 30 Jun 2026 09:08:39 +0000 (17:08 +0800)] 
gh-133510: Add links to more info for the match statement in FAQ anwser (#133511)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-152248: Reject a POSIX TZ abbreviation with non-ASCII-letters in pure-Python ...
tonghuaroot (童话) [Tue, 30 Jun 2026 08:27:30 +0000 (16:27 +0800)] 
gh-152248: Reject a POSIX TZ abbreviation with non-ASCII-letters in pure-Python `zoneinfo` (#152249)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agoUse tkinter wrapper methods instead of raw Tcl calls in turtle and IDLE (GH-152414)
Serhiy Storchaka [Tue, 30 Jun 2026 05:41:40 +0000 (08:41 +0300)] 
Use tkinter wrapper methods instead of raw Tcl calls in turtle and IDLE (GH-152414)

* turtle: wm_attributes(topmost=...);
* idlelib.macosx: winfo_server();
* idlelib tests: after_info().

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-146219: Document reusing a thread state across repeated foreign-thread calls ...
Gregory P. Smith [Tue, 30 Jun 2026 00:05:02 +0000 (17:05 -0700)] 
gh-146219: Document reusing a thread state across repeated foreign-thread calls (GH-146221)

* Document reusing a thread state across repeated foreign-thread calls

Add a subsection under "Non-Python created threads" explaining the
performance cost of creating/destroying a PyThreadState on every
Ensure/Release cycle and showing how to keep one alive for the
thread's lifetime instead.

* add a comma

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
---------

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
3 weeks agogh-149689: add missing error checks in Parser/action_helpers.c (#149710)
Thomas Kowalski [Mon, 29 Jun 2026 23:18:19 +0000 (01:18 +0200)] 
gh-149689: add missing error checks in Parser/action_helpers.c (#149710)

3 weeks agogh-82312: Further improvement of error messages for generating AST nodes (GH-150912)
Serhiy Storchaka [Mon, 29 Jun 2026 22:03:33 +0000 (01:03 +0300)] 
gh-82312: Further improvement of error messages for generating AST nodes (GH-150912)

This is a follow up of GH-17715.

* Use %T instead of _PyType_Name().
* Add the wrong type name we got for identifier and string.

3 weeks agogh-103878: Return a consistent empty value from cancelled file dialogs (GH-152435)
Serhiy Storchaka [Mon, 29 Jun 2026 20:49:19 +0000 (23:49 +0300)] 
gh-103878: Return a consistent empty value from cancelled file dialogs (GH-152435)

On cancellation Tcl may report the empty result as '', () or b'' depending
on the platform and Tk version. Normalize it so that askopenfilename(),
asksaveasfilename() and askdirectory() always return '' and
askopenfilenames() always returns ().

Open._fixresult() now distinguishes single from multiple results by the
'multiple' option rather than the result type.

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152492 Allow `OrderedDict.update` to work with `frozendict` (#152494)
da-woods [Mon, 29 Jun 2026 19:54:22 +0000 (20:54 +0100)] 
gh-152492 Allow `OrderedDict.update` to work with `frozendict` (#152494)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks agogh-103878: Document that the cancelled file dialog value is only falsy (GH-152429)
Serhiy Storchaka [Mon, 29 Jun 2026 19:52:23 +0000 (22:52 +0300)] 
gh-103878: Document that the cancelled file dialog value is only falsy (GH-152429)

Its exact type (empty string, tuple, list or None) varies between
platforms and Tk versions, so advise testing the result for truth.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agoMicro-optimizations for the statistics module (#152618)
Raymond Hettinger [Mon, 29 Jun 2026 19:12:09 +0000 (14:12 -0500)] 
Micro-optimizations for the statistics module (#152618)

3 weeks agogh-152263: Add curses soft-label-key functions (GH-152264)
Serhiy Storchaka [Mon, 29 Jun 2026 17:57:56 +0000 (20:57 +0300)] 
gh-152263: Add curses soft-label-key functions (GH-152264)

Wrap the X/Open Curses soft-label-key functions: slk_init, slk_set,
slk_label, slk_refresh, slk_noutrefresh, slk_clear, slk_restore,
slk_touch, the chtype attribute functions slk_attron, slk_attroff,
slk_attrset and slk_attr, and the attr_t functions slk_attr_on,
slk_attr_off, slk_attr_set and slk_color.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152228: Fix an assertion failure in `str.replace` under a limited memory case...
sobolevn [Mon, 29 Jun 2026 16:22:22 +0000 (19:22 +0300)] 
gh-152228: Fix an assertion failure in `str.replace` under a limited memory case (#152229)

3 weeks agogh-151987: Pass filter_function to TarFile._extract_one() during .extract() (GH-151988)
Petr Viktorin [Mon, 29 Jun 2026 15:41:26 +0000 (17:41 +0200)] 
gh-151987: Pass filter_function to TarFile._extract_one() during .extract() (GH-151988)

Co-authored-by: Seth Michael Larson <seth@python.org>
3 weeks agogh-69134: Wait until mapped in keyboard virtual-event tests (GH-152599)
Serhiy Storchaka [Mon, 29 Jun 2026 15:30:23 +0000 (18:30 +0300)] 
gh-69134: Wait until mapped in keyboard virtual-event tests (GH-152599)

test_virtual_events and test_selection_event generate key events after
focus_force().  On Windows these are only delivered once the toplevel is
mapped, so they could be dropped and the test fail.  Wait until the
widget is mapped, as the other GUI tests already do.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-151040: Fix `test_c_stack_unwind` on RISC-V (#152370)
Ivy Xu [Mon, 29 Jun 2026 14:47:21 +0000 (22:47 +0800)] 
gh-151040: Fix `test_c_stack_unwind` on RISC-V (#152370)

3 weeks agogh-152587: Make name and value required in tkinter variable methods (GH-152595)
Serhiy Storchaka [Mon, 29 Jun 2026 14:11:03 +0000 (17:11 +0300)] 
gh-152587: Make name and value required in tkinter variable methods (GH-152595)

The name parameter of Misc.wait_variable(), setvar() and getvar() and the
value parameter of setvar() no longer have default values, which were not
meaningful ('PY_VAR' and '1').

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-133031: Fix test_textbox_edit_wide on a narrow build (GH-152592)
Serhiy Storchaka [Mon, 29 Jun 2026 14:00:21 +0000 (17:00 +0300)] 
gh-133031: Fix test_textbox_edit_wide on a narrow build (GH-152592)

unget_wch() can push only a single-byte character on a narrow build,
so skip the multi-byte cases there.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152587: Stop documenting bogus default values in tkinter variable methods (GH...
Serhiy Storchaka [Mon, 29 Jun 2026 13:48:10 +0000 (16:48 +0300)] 
gh-152587: Stop documenting bogus default values in tkinter variable methods (GH-152594)

The name parameter of Misc.wait_variable(), setvar() and getvar() and the
value parameter of setvar() should not be optional.  Their default values
('PY_VAR' and '1') are not meaningful and should not be advertised.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-151096: Fix test_embed with split exec prefix (#151288)
Harjoth Khara [Mon, 29 Jun 2026 13:28:18 +0000 (06:28 -0700)] 
gh-151096: Fix test_embed with split exec prefix (#151288)

3 weeks agogh-152584: Reorganize the curses documentation into topic subsections (GH-152583)
Serhiy Storchaka [Mon, 29 Jun 2026 13:15:02 +0000 (16:15 +0300)] 
gh-152584: Reorganize the curses documentation into topic subsections (GH-152583)

Reorganize the curses documentation into topic subsections

Group the module-level functions, window methods and constants by topic
instead of presenting them as flat alphabetical lists, following the
categories used by the ncurses manual pages.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-151483: Only declare `PyCodeObject._co_unique_id` on Free Threading (#151484)
Xiaowei Lu [Mon, 29 Jun 2026 13:04:28 +0000 (21:04 +0800)] 
gh-151483: Only declare `PyCodeObject._co_unique_id` on Free Threading (#151484)

3 weeks agogh-152503: Fix garbage text from curses wide-character cell reads (GH-152505)
Serhiy Storchaka [Mon, 29 Jun 2026 12:06:47 +0000 (15:06 +0300)] 
gh-152503: Fix garbage text from curses wide-character cell reads (GH-152505)

window.in_wch(), window.in_wchstr() and window.getbkgrnd() read a cell
into an uninitialized cchar_t, relying on the curses library to leave the
text NUL-terminated -- which ncurses does but X/Open does not require, so
some libraries (such as NetBSD curses) returned uninitialized bytes as
wide characters.  Zero-initialize the cell buffers before the read and
default the getcchar() output to an empty string.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152502: Detect optional curses functions with configure probes (GH-152504)
Serhiy Storchaka [Mon, 29 Jun 2026 12:02:12 +0000 (15:02 +0300)] 
gh-152502: Detect optional curses functions with configure probes (GH-152504)

Some curses functions were called unconditionally or gated only by the
ncurses-specific NCURSES_EXT_FUNCS macro, which broke building the module
against other curses implementations (narrow ncurses, NetBSD curses) even
when they provided the function.  Detect each with a configure capability
probe and gate on HAVE_CURSES_*.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152359: Update numbers.rst to reference numeric-hash docs (#152549)
Paper Moon [Mon, 29 Jun 2026 09:56:41 +0000 (17:56 +0800)] 
gh-152359: Update numbers.rst to reference numeric-hash docs (#152549)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks agogh-152240: Fix test_c_stack_unwind on Linux LoongArch builds (#152241)
yzewei [Mon, 29 Jun 2026 09:48:05 +0000 (17:48 +0800)] 
gh-152240: Fix test_c_stack_unwind on Linux LoongArch builds (#152241)

3 weeks agogh-71450: Document that Tcl sets the HOME variable on Windows (GH-152568)
Serhiy Storchaka [Mon, 29 Jun 2026 09:35:24 +0000 (12:35 +0300)] 
gh-71450: Document that Tcl sets the HOME variable on Windows (GH-152568)

Also fix the ntpath.expanduser() docstring, which no longer uses $HOME.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-148909: Fix broken author attribution URL in 'The Python 2.3 Method Resolution...
Ivy Xu [Mon, 29 Jun 2026 09:27:41 +0000 (17:27 +0800)] 
gh-148909: Fix broken author attribution URL in 'The Python 2.3 Method Resolution Order' doc (#149092)

3 weeks agogh-152375: Fix undefined behaviour in the `INSTRUMENTED_JUMP` macro (#152376)
Stan Ulbrych [Mon, 29 Jun 2026 09:06:04 +0000 (11:06 +0200)] 
gh-152375: Fix undefined behaviour in the `INSTRUMENTED_JUMP` macro (#152376)

3 weeks agogh-140146: Fix for stdin redirection to a pipe with interactive tkinter on Windows...
mdehoon [Mon, 29 Jun 2026 08:42:56 +0000 (17:42 +0900)] 
gh-140146: Fix for stdin redirection to a pipe with interactive tkinter on Windows (GH-148819)

3 weeks agogh-85320: Use UTF-8 for IDLE configuration and breakpoint files (GH-152475)
Serhiy Storchaka [Mon, 29 Jun 2026 08:14:23 +0000 (11:14 +0300)] 
gh-85320: Use UTF-8 for IDLE configuration and breakpoint files (GH-152475)

They were read and written using the locale encoding, which could corrupt
non-ASCII paths and made them non-portable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-110357: hashlib no longer logs at import when a guaranteed hash is unavailable...
Gregory P. Smith [Mon, 29 Jun 2026 08:11:14 +0000 (01:11 -0700)] 
gh-110357: hashlib no longer logs at import when a guaranteed hash is unavailable (GH-152538)

When a normally-guaranteed hash algorithm cannot be constructed at import time
(e.g. an OpenSSL FIPS configuration excludes it from the default provider, or
the build used --without-builtin-hashlib-hashes), importing hashlib emitted an
"ERROR:root:hash algorithm ... will not be supported at runtime" message to
stderr.  For the many programs that never use the missing algorithm this is
pure noise.  Worse, logging.error() lazily calls logging.basicConfig(), which
mutates the root logger's handlers -- a global side effect that the test suite
flags as an altered execution environment.

Stop logging in that path.  Code that actually uses a missing algorithm still
gets a clear ValueError from the stub constructor installed in its place.

The stray output has shown up incidentally in FIPS / "No Builtin Hashes"
buildbot reports for years (e.g. gh-110357, gh-76902) without being the
reported subject.

3 weeks agogh-87577: Document that wm_manage does not accept ttk widgets (GH-152532)
Serhiy Storchaka [Mon, 29 Jun 2026 06:02:42 +0000 (09:02 +0300)] 
gh-87577: Document that wm_manage does not accept ttk widgets (GH-152532)

wm_manage() works only with the classic tkinter Frame, LabelFrame and
Toplevel widgets, not their tkinter.ttk counterparts.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation (GH-151573)
Gregory P. Smith [Mon, 29 Jun 2026 02:04:10 +0000 (19:04 -0700)] 
gh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation (GH-151573)

* gh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation

OrderedDict.copy() walks the internal linked list while building the new
dict. The loop body can run arbitrary Python (a key's __eq__/__hash__, or
a subclass __getitem__/__setitem__) which can clear the source dict and
free the nodes being iterated.

Detect this the same way OrderedDict.__eq__ already does (gh-119004):
snapshot od_state before the loop, hold a strong reference to the key and
read the hash before any reentrant call, and raise RuntimeError if the
state changed before advancing to the next node.

* gh-148660: fix NEWS nit, suppress undocumented OrderedDict.copy xref

3 weeks agogh-151416: fix a borrowed ref potential use after free via fspath in os.spawnv/spawnv...
Gregory P. Smith [Mon, 29 Jun 2026 00:27:15 +0000 (17:27 -0700)] 
gh-151416: fix a borrowed ref potential use after free via fspath in os.spawnv/spawnve (GH-151417)

* gh-151416: Fix use-after-free in os.spawnv/spawnve when __fspath__ mutates argv

The argv conversion loops passed references borrowed from the argv list
into fsconvert_strdup().  An item's __fspath__() can mutate the list and
release its reference to the item, leaving the converter operating on a
freed object.  A shrunk list could also make PyList_GetItem() return
NULL, which PyUnicode_FS{Converter,Decoder}() treat as a request to
release an uninitialized output variable.

Hold a strong reference to each item across the conversion, matching
parse_arglist() and parse_envlist().

* gh-151416: Don't mask non-TypeError argv conversion errors in os.spawnv

os.spawnv() replaced any error raised during argv item conversion,
such as MemoryError, codec errors, or the embedded-null ValueError,
with a generic TypeError.  Only add the contextual message when the
conversion actually raised TypeError, matching how os.spawnve() and
the exec functions propagate these errors.

The test is gated to the native C spawnv: the Python fallback used
elsewhere reports conversion failures from the forked child as exit
status 127 instead of raising.

3 weeks agoGH-151672: `__lazy_import__` always resolves to the module being imported (#151827)
Brandt Bucher [Sun, 28 Jun 2026 23:13:12 +0000 (16:13 -0700)] 
GH-151672: `__lazy_import__` always resolves to the module being imported (#151827)

3 weeks agoGH-151619: Ensure non-module global/builtin namespaces are watched for lazy imports...
Brandt Bucher [Sun, 28 Jun 2026 22:24:32 +0000 (15:24 -0700)] 
GH-151619: Ensure non-module global/builtin namespaces are watched for lazy imports (#151762)

3 weeks agogh-150743: Limit trailer lines and interim responses read by http.client (GH-150741)
Gregory P. Smith [Sun, 28 Jun 2026 19:06:41 +0000 (12:06 -0700)] 
gh-150743: Limit trailer lines and interim responses read by http.client (GH-150741)

http.client read chunked-response trailer lines and skipped interim (1xx)
responses in unbounded loops, so a server streaming either forever would
hang the client even with a socket timeout set (data keeps arriving, so
the timeout never fires).

Trailer lines are now limited to max_response_headers (100 by default)
and interim responses to 100; HTTPException is raised past either limit.

Follow-up to gh-88188 for CVE-2021-3737, which bounded header lines
within an interim response but not these two sibling loops.

---

This issue was reported to us via [GHSA-w4q2-g22w-6fr4](https://github.com/python/cpython/security/advisories/GHSA-w4q2-g22w-6fr4) and was determined not to be high enough severity to handle privately.

3 weeks agoDocs: link to language reference instead of PEP (#152462)
Ned Batchelder [Sun, 28 Jun 2026 19:01:36 +0000 (15:01 -0400)] 
Docs: link to language reference instead of PEP (#152462)

3 weeks agogh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499)
Serhiy Storchaka [Sun, 28 Jun 2026 17:11:47 +0000 (20:11 +0300)] 
gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499)

Add wait_until_mapped() and AbstractTkTest.require_mapped() to
test_tkinter.support and use them to guard the assertions that need a
widget to be actually mapped (winfo_width(), identify(), coords(), ...).
This avoids intermittent failures under window managers that do not map
the widget promptly, without skipping the unrelated checks.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152356: Fix Windows blocking sampling after target process exit (#152471)
Zain Nadeem [Sun, 28 Jun 2026 16:58:56 +0000 (21:58 +0500)] 
gh-152356: Fix Windows blocking sampling after target process exit (#152471)

3 weeks agogh-110904: Recommend windows-curses in the curses HOWTO (GH-152491)
Serhiy Storchaka [Sun, 28 Jun 2026 16:30:04 +0000 (19:30 +0300)] 
gh-110904: Recommend windows-curses in the curses HOWTO (GH-152491)

The HOWTO pointed at UniCurses, which is unmaintained and exposes its own
API.  windows-curses provides the standard curses interface on Windows, so
existing code runs unchanged.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-78335: Complete the widget option lists in tkinter docstrings (GH-152485)
Serhiy Storchaka [Sun, 28 Jun 2026 16:14:27 +0000 (19:14 +0300)] 
gh-78335: Complete the widget option lists in tkinter docstrings (GH-152485)

Several widget __init__ docstrings omitted valid options, and Menubutton and
Message had no option list at all.  List every option supported by the widget,
tagging those added in Tk 9.0 and 9.1.

Add test_options_in_docstring, asserting that every option in OPTIONS is named
in the widget's __init__ docstring.  Options reported by keys() but not in the
docstring are only printed in verbose mode, as some depend on the Tk version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152434: Avoid Gecko export in async-aware test (#152496)
Pablo Galindo Salgado [Sun, 28 Jun 2026 15:24:05 +0000 (17:24 +0200)] 
gh-152434: Avoid Gecko export in async-aware test (#152496)

3 weeks agogh-152325: Add curses.has_mouse() and curses.window.mouse_trafo() (GH-152484)
Serhiy Storchaka [Sun, 28 Jun 2026 14:09:03 +0000 (17:09 +0300)] 
gh-152325: Add curses.has_mouse() and curses.window.mouse_trafo() (GH-152484)

has_mouse() reports whether the mouse driver was successfully initialized.

window.mouse_trafo(y, x, to_screen) converts a coordinate pair between
window-relative and screen-relative coordinates, returning the (y, x) pair or
None if it lies outside the window.  Together these complete the curses mouse
interface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-87881: Document the result of curses inch() and getbkgd() (GH-152488)
Serhiy Storchaka [Sun, 28 Jun 2026 14:03:22 +0000 (17:03 +0300)] 
gh-87881: Document the result of curses inch() and getbkgd() (GH-152488)

Explain the character/attribute bit layout and how to extract the parts
(A_CHARTEXT and A_ATTRIBUTES bit-masks, pair_number() for the color pair),
or use in_wch() to get a complexchar.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-133031: Support the full Unicode range in curses.textpad.Textbox (GH-152482)
Serhiy Storchaka [Sun, 28 Jun 2026 12:49:28 +0000 (15:49 +0300)] 
gh-133031: Support the full Unicode range in curses.textpad.Textbox (GH-152482)

Read input with get_wch() and the window back with in_wch(), so combining
characters and characters outside the locale encoding now work where curses has
wide-character support.

edit() passes non-ASCII characters to validate() as strings, keeping ASCII and
key codes as integers so existing validators keep working.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>