Commit graph

32559 commits

Author SHA1 Message Date
Miss Islington (bot)
fabe89b078
[3.13] gh-133454: Mark tests with many threads that use much memory as bigmem (GH-133456) (GH-133664)
(cherry picked from commit 26839eae20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-08 13:20:34 +00:00
TERESH1
a719e5fbb6
[3.13] gh-133516: Raise ValueError when constants True, False or None are used as an identifier after NFKC normalization (GH-133523) (#133615) 2025-05-08 12:18:26 +01:00
Miss Islington (bot)
a0dd4f0c56
[3.13] gh-133639: Fix test_auto_indent_default() doesn't run input_code (GH-133640) (#133647) 2025-05-08 08:47:38 +00:00
Łukasz Langa
891232f338
[3.13] gh-131878: Fix input of unicode characters with two or more code points in new pyrepl on Windows (gh-131901) (gh-133468)
(cherry picked from commit 0c5151bc81)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-05-05 23:08:09 +02:00
Łukasz Langa
76f52c434c
[3.13] gh-130804: Fix support of typing unicode chars in pyrepl (GH-130805) (GH-133462)
(cherry picked from commit 7c98b0674d)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
2025-05-05 21:39:21 +02:00
Łukasz Langa
e4d68488bc
[3.13] GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe (GH-132440) (GH-133460)
(cherry picked from commit 07f416a3f0)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-05 20:09:34 +02:00
Miss Islington (bot)
a2bf7a0a47
[3.13] gh-124096: Enable REPL virtual terminal support on Windows (GH-124119) (GH-133457)
To support virtual terminal mode in Windows PYREPL, we need a scanner
to read over the supported escaped VT sequences.

Windows REPL input was using virtual key mode, which does not support
terminal escape sequences. This patch calls `SetConsoleMode` properly
when initializing and send sequences to enable bracketed-paste modes
to support verbatim copy-and-paste.
(cherry picked from commit a65366ed87)

Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: wheeheee <104880306+wheeheee@users.noreply.github.com>
2025-05-05 19:39:06 +02:00
Miss Islington (bot)
d84a762a64
[3.13] gh-63882: Break down and tests in test_minidom (GH-133026) (#133451)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-05 19:31:53 +03:00
Miss Islington (bot)
df1669ed20
[3.13] Bump mypy to 1.15 (GH-133405) (#133429)
Bump mypy to 1.15 (GH-133405)
(cherry picked from commit 8467026ed6)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-05 10:54:56 +00:00
Miss Islington (bot)
e89ca3991c
[3.13] [tests] test_subprocess maybe avoid a timeout race condition? (GH-133420) (#133421)
[tests] test_subprocess maybe avoid a timeout race condition? (GH-133420)

The few buildbot failures on https://github.com/python/cpython/pull/133103
are possibly just due to racing a child process launch and exit?
(cherry picked from commit b64aa302d7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-05-05 04:25:41 +00:00
Miss Islington (bot)
3d1b8e2a96
[3.13] gh-133089: Use original timeout value for TimeoutExpired when the func subprocess.run is called with a timeout (GH-133103) (#133418)
gh-133089: Use original timeout value for `TimeoutExpired` when the func `subprocess.run` is called with a timeout (GH-133103)
(cherry picked from commit 2bbcaedb75)

Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-05-05 01:38:30 +00:00
Miss Islington (bot)
5daeebbbf2
[3.13] gh-109700: Improve stress tests for interpreter creation (GH-109946) (GH-133391)
* Ensure that destructors are called in the test that created interpreters, not after finishing it.
* Try to create/run interpreters in threads simultaneously.
* Mark tests that requires over 6GB of memory with bigmemtest.
(cherry picked from commit 61b50a98b4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-04 19:18:49 +00:00
Serhiy Storchaka
973e2d3e29
[3.13] gh-122559: Synchronize C and Python implementation of the io module about pickling (GH-122628) (GH-133381)
In the C implementation, remove __reduce__ and __reduce_ex__ methods
that always raise TypeError and restore __getstate__ methods that always
raise TypeErrori.

This restores fine details of the pre-3.12 behavior and unifies
both implementations.
(cherry picked from commit e9253ebf74)
2025-05-04 16:04:09 +00:00
Serhiy Storchaka
3c9d1778ef
[3.13] bpo-44172: Keep reference to original window in curses subwindow objects (GH-26226) (GH-133370)
The X/Open curses specification[0] and ncurses documentation[1]
both state that subwindows must be deleted before the main window.

Deleting the windows in the wrong order causes a double-free with
NetBSD's curses implementation.

To fix this, keep track of the original window object in the subwindow
object, and keep a reference to the original for the lifetime of
the subwindow.

[0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/delwin.html
[1] https://invisible-island.net/ncurses/man/curs_window.3x.html
(cherry picked from commit 0af61fe2f4)

Co-authored-by: Michael Forney <mforney@mforney.org>
2025-05-04 11:15:43 +00:00
Miss Islington (bot)
e090f8e3f5
[3.13] gh-133210: Fix test_rlcompleter in --without-doc-strings mode (GH-133332) (#133348)
gh-133210: Fix `test_rlcompleter` in `--without-doc-strings` mode (GH-133332)
(cherry picked from commit 881144fa58)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-03 16:01:36 +00:00
Miss Islington (bot)
c9c0beb00d
[3.13] gh-114713: Revert gh-114731 (GH-133330) (#133331)
gh-114713: Revert gh-114731 (GH-133330)

Revert "gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (GH-114731)"

This reverts commit 884df116d7.
(cherry picked from commit fe44fc4f43)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-05-03 08:09:54 +00:00
Miss Islington (bot)
e75f528e78
[3.13] gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292) (GH-133295)
gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292)
(cherry picked from commit 2590774c9b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-02 18:10:32 +02:00
Miss Islington (bot)
16e9e74a8b
[3.13] gh-132385: Fix instance error suggestions trigger potential exceptions in traceback (GH-132387) (#133297)
gh-132385: Fix instance error suggestions trigger potential exceptions in `traceback` (GH-132387)
(cherry picked from commit 641253cfac)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-02 13:27:54 +00:00
Miss Islington (bot)
6a919d0488
[3.13] gh-133210: Fix test_descr in --without-doc-strings mode (GH-133294) (#133298)
gh-133210: Fix `test_descr` in `--without-doc-strings` mode (GH-133294)
(cherry picked from commit ba16ba3a18)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-02 13:27:30 +00:00
Miss Islington (bot)
b64cc74b14
[3.13] gh-133210: Fix test_pydoc in --without-doc-strings mode (GH-133271) (#133288)
gh-133210: Fix `test_pydoc` in `--without-doc-strings` mode (GH-133271)
(cherry picked from commit 4912b29166)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-02 10:36:35 +00:00
Tomas R.
ae775dcc24
[3.13] gh-130197: Improve test coverage of msgfmt.py (GH-133048) (GH-133255)
(cherry picked from commit c73d46076e)
2025-05-02 07:28:28 +00:00
Miss Islington (bot)
766c5f75b9
[3.13] gh-119605: Respect follow_wrapped for __init__ and __new__ when getting class signature with inspect.signature (GH-132055) (#133277)
gh-119605: Respect `follow_wrapped` for `__init__` and `__new__` when getting class signature with `inspect.signature` (GH-132055)
(cherry picked from commit b8633f9aca)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
2025-05-01 20:06:07 -07:00
Miss Islington (bot)
f7d1109a12
[3.13] gh-133210: Fix test_inspect in --without-doc-strings mode (GH-133250) (#133263)
gh-133210: Fix `test_inspect` in `--without-doc-strings` mode (GH-133250)
(cherry picked from commit 27e011455d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-01 16:36:12 +00:00
Miss Islington (bot)
90c786e377
[3.13] gh-130655: Add a test for big-endian MO files in gettext (GH-132469) (GH-133248)
(cherry picked from commit 474f296718)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-05-01 11:36:06 +00:00
Miss Islington (bot)
704a3f8c0a
[3.13] gh-133167: Fix compilation process with --enable-optimizations and --without-docstrings (GH-133187) (#133207)
gh-133167: Fix compilation process with `--enable-optimizations` and `--without-docstrings` (GH-133187)
(cherry picked from commit cc39b19f0f)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 14:06:31 +00:00
Miss Islington (bot)
dfaa384991
[3.13] gh-132308: prevent TracebackException swallowing attributes of a falsey Exception or ExceptionGroup (GH-132363) (#132725)
gh-132308: prevent `TracebackException` swallowing attributes of a falsey `Exception` or `ExceptionGroup` (GH-132363)
(cherry picked from commit 69cda31261)

Co-authored-by: Duprat <yduprat@gmail.com>
2025-04-30 09:19:53 +02:00
Mark Shannon
132bdf6990
[3.13] GH-127682: Backport GH-132351 (GH-132384)
Only call `__iter__` once in generator expressions
2025-04-29 09:35:29 +01:00
Neil Schemenauer
64dcbb0c31
[3.13] gh-133122: Fix for test_type_lookup_mro_reference. (gh-133127)
Change the unit test case to use `getattr()` so that we avoid the
bytecode specializer optimizing the access.  The specializer will call
the `__eq__` method before the unit test expects, causing it to fail.

In the 3.14 branch (gh-128164) the test is changed in a different way
to avoid the same issue.
2025-04-29 03:33:13 +00:00
Miss Islington (bot)
b71442f44f
[3.13] gh-132742: Fix newly added tcflush() tests on Android (GH-133070) (GH-133104)
(cherry picked from commit 25186c2472)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-28 19:10:42 +00:00
sobolevn
ab89f6ec84
[3.13] gh-133054: Skip test_pyrepl tests when cannot use pyrepl is reported (GH-133055) (#133095)
(cherry picked from commit b739ec5ab7)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2025-04-28 18:00:42 +00:00
Serhiy Storchaka
0d53872443
[3.13] gh-132742: Improve tests for fcntl.ioctl() (GH-132791) (GH-133066)
* Use better tests for integer argument.
* Add also parallel tests for tcflush() and tcflow().
(cherry picked from commit ed8e886f4f)
2025-04-28 08:23:43 +00:00
Miss Islington (bot)
8fdc10686b
[3.13] [tests] fix test_fcntl issue when run in a ChromeOS linux runtime (GH-133053) (GH-133056)
[tests] fix test_fcntl issue when run in a ChromeOS linux runtime (GH-133053)

* [tests] test_fcntl fails when run in a ChromeOS linux runtime container.

It doesn't appear to support F_NOTIFY? Detect the lack of that and skip the test.
(cherry picked from commit 355ee1a429)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-04-27 20:54:37 +00:00
Miss Islington (bot)
fdcaaad1cc
[3.13] gh-63882: Implement some test_minidom tests (GH-132879) (#133029)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Julian Gindi <julian@gindi.io>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-26 20:28:00 +00:00
Miss Islington (bot)
3a1a2a0b49
[3.13] gh-133016: Fix a reference to removed asyncio.futures.TimeoutError (GH-133019) (#133023)
gh-133016: Fix a reference to removed `asyncio.futures.TimeoutError` (GH-133019)

Just use the builtin `TimeoutError`, and remove the import of `futures`.
(cherry picked from commit 8d6d7386a3)

Co-authored-by: John <john-xyz@outlook.com>
2025-04-26 19:46:11 +00:00
Miss Islington (bot)
4031902949
[3.13] gh-63882: Use self.assert* methods in test_minidom (GH-133000) (#133024)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-26 19:21:22 +00:00
Miss Islington (bot)
41e19a78b2
[3.13] gh-91221: fix test_curses.test_use_default_colors for xterm-256color (GH-132990) (#132992)
gh-91221: fix `test_curses.test_use_default_colors` for xterm-256color (GH-132990)

Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color.
(cherry picked from commit 7f02ded29f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-26 11:02:17 +00:00
Miss Islington (bot)
08772229c7
[3.13] gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790) (GH-132896)
gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790)
(cherry picked from commit 22bc953aa9)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-25 13:30:33 -07:00
Miss Islington (bot)
b4a160ac59
[3.13] gh-132415: Use shutil.which() in missing_compiler_executable() (GH-132906) (#132916)
gh-132415: Use shutil.which() in missing_compiler_executable() (GH-132906)

Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
(cherry picked from commit de6482eda3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-25 10:41:40 +00:00
Miss Islington (bot)
8a759c235c
[3.13] gh-127906: Add missing sys import to test_cppext (GH-132902) (#132904)
gh-127906: Add missing sys import to test_cppext (GH-132902)
(cherry picked from commit 9cba14881b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-25 08:42:57 +00:00
Serhiy Storchaka
bf6c74dc7a
[3.13] Use os.openpty() instead of pty.openpty() in test_ioctl (GH-132878)
pty.openpty() does not work on Android, and it is easier to check
availability of os.openpty.
2025-04-24 18:47:01 +03:00
Miss Islington (bot)
b220c1c0a4
[3.13] gh-109981: Resolve situation on iOS regarding fd_count. (GH-132823) (#132824)
Modifies the test helper that counts the list of open file descriptors to use
the optimised ``/dev/fd`` approach on all Apple platforms, not just macOS. This
avoids crashes caused by guarded file descriptors.
(cherry picked from commit 862fd89036)

Co-authored-by: John <johnzhou721@gmail.com>
2025-04-23 21:40:25 +00:00
Serhiy Storchaka
f8d4ca42ae
[3.13] gh-83994, gh-132843: Fix and improve test_ioctl (GH-132848) (GH-132850)
* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.
(cherry picked from commit 4b4b9fbb06)
2025-04-23 19:17:51 +00:00
Victor Stinner
3de0f55f34
[3.13] gh-132713: Fix repr(list) race condition (#132801) (#132809)
Hold a strong reference to the item while calling repr(item).

(cherry picked from commit a4ea80d523)
2025-04-23 15:44:33 +02:00
Gregory P. Smith
cdabbc126f
[3.13] gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-132787)
gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-122183)

* Fix hashlib.file_digest and non-blocking I/O
* Add documentation around this behavior
* Add versionchanged

(cherry picked from commit 2b47f46d7d)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2025-04-21 21:55:57 +00:00
Peter Bierma
bb59fdec71
[3.13] gh-132747: Fix NULL dereference when calling a method's __get__ manually (GH-132772) (#132786)
(cherry picked from commit fa70bf8593)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-04-21 21:38:51 +00:00
Serhiy Storchaka
3c29fb2974
[3.13] gh-132753: Argument Clinic: Fix support of c_default for the bool converter (GH-132754) (GH-132766)
(cherry picked from commit 78cfee6f09)
2025-04-21 07:10:31 +00:00
Miss Islington (bot)
c709d3b503
[3.13] gh-132742: Add more tests for fcntl.ioctl() (GH-132756) (GH-132764)
Test with different types of argument: integer, mutable and immutable
buffers, immutable buffer with mutable_flag set to false.
(cherry picked from commit a04390b4da)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-21 06:49:45 +00:00
Miss Islington (bot)
62663bfed5
[3.13] gh-129098: avoid using content of _pyrepl/__main__.py when reporting tracebacks (GH-130721) (#132755)
gh-129098: avoid using content of `_pyrepl/__main__.py` when reporting tracebacks (GH-130721)
(cherry picked from commit 492e3e6976)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-20 17:48:16 +00:00
Peter Bierma
47c8df6172
[3.13] gh-132673: Fix a crash with zero-alignment in ctypes.Structure (#132695) 2025-04-19 14:29:05 +00:00
Miss Islington (bot)
10f37b36b4
[3.13] gh-132396: Resolve 'redefinition of unused name' errors in `Lib/test/` (GH-132397) (#132699)
gh-132396: Resolve 'redefinition of unused name' errors in ``Lib/test/`` (GH-132397)
(cherry picked from commit 1d5dc5f1c3)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-18 20:35:35 +01:00