Petr Viktorin
4ebbfcf30e
gh-87135: Raise PythonFinalizationError when joining a blocked daemon thread (gh-130402)
...
If `Py_IsFinalizing()` is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them (without timeout)
would block forever.
Raise PythonFinalizationError instead of hanging.
Raise even when a timeout is given, for consistency with trying to join your own thread.
See gh-123940 for a use case: calling `join()` from `__del__`. This is
ill-advised, but an exception should at least make it easier to diagnose.
2025-04-28 15:48:48 +02:00
Sergey B Kirpichev
6157135a8d
gh-130317: Fix PyFloat_Pack/Unpack[24] for NaN's with payload ( #130452 )
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-28 15:23:26 +02:00
Jelle Zijlstra
922049b613
gh-130907: Treat all module-level annotations as conditional ( #131550 )
2025-04-28 06:10:28 -07:00
Sergey B Kirpichev
5bf0f3666e
gh-53032: support IEEE 754 contexts in the decimal module ( #122003 )
...
This was in C version from beginning, but available only
on conditional compilation (EXTRA_FUNCTIONALITY). Current
patch adds function to create IEEE contexts to the
pure-python module as well.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-28 15:05:56 +02:00
Chris Eibl
11f457cf41
GH-114911: use time.perf_counter in Stopwatch (GH-131469)
...
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-28 13:55:08 +02:00
Serhiy Storchaka
ed8e886f4f
gh-132742: Improve tests for fcntl.ioctl() (GH-132791)
...
* Use better tests for integer argument.
* Add also parallel tests for tcflush() and tcflow().
2025-04-28 10:42:40 +03:00
Bénédikt Tran
3695ba93d5
gh-132993: expose HASHLIB_GIL_MINSIZE to private extension modules ( #132999 )
2025-04-27 22:20:15 +00:00
Emma Smith
20be6ba61a
gh-132983: Introduce compression package and move _compression module (GH-133018)
...
* Introduces `compression` package for https://peps.python.org/pep-0784/
This commit introduces the `compression` package, specified in PEP 784
to re-export the `lzma`, `bz2`, `gzip`, and `zlib` modules. Introduction
of `compression.zstd` will be completed in a future commit once the
`_zstd` module is merged.
This commit also moves the `_compression` private module to
`compression._common._streams`.
* Re-exports existing module docstrings.
2025-04-27 14:41:30 -07:00
Mariusz Felisiak
28a2fd031e
gh-115032: Deprecate support for custom logging handlers with 'strm' argument. (GH-115314)
2025-04-27 22:18:14 +01:00
Gregory P. Smith
355ee1a429
[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.
2025-04-27 13:28:23 -07:00
Sergey B Kirpichev
276252565c
gh-127495: Append to history file after every statement in PyREPL (GH-132294)
2025-04-27 15:32:37 +02:00
Wulian233
8b4fd24ca5
gh-128438: Use EnvironmentVarGuard in test_zoneinfo.py ( #131870 )
2025-04-27 13:29:37 +02:00
Bénédikt Tran
cc05e4b867
gh-91069: do not disable sha3 in test_hashlib under UBSan ( #133001 )
2025-04-27 11:51:00 +02:00
Tian Gao
4f18916c5c
gh-124703: Set return code to 1 when aborting process from pdb ( #133013 )
2025-04-26 18:43:23 -04:00
Stan Ulbrych
ee033d4555
gh-63882: Implement some test_minidom tests ( #132879 )
...
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 23:03:48 +03:00
John
8d6d7386a3
gh-133016: Fix a reference to removed asyncio.futures.TimeoutError ( #133019 )
...
Just use the builtin `TimeoutError`, and remove the import of `futures`.
2025-04-26 18:57:08 +00:00
Tomas R.
5e96e4fca8
gh-131798: JIT: Propagate the result in _BINARY_OP_SUBSCR_TUPLE_INT (GH-133003)
2025-04-27 02:47:55 +08:00
Stan Ulbrych
56c88e4e8d
gh-63882: Use self.assert* methods in test_minidom ( #133000 )
2025-04-26 18:24:54 +00:00
Tian Gao
0eb0e70ca0
gh-133006: Add subprocess check for remote pdb test ( #133014 )
2025-04-26 19:09:09 +01:00
Serhiy Storchaka
632524a5cb
gh-132987: Support __index__() for "k" and "K" formats in PyArg_Parse (GH-132988)
2025-04-26 17:14:18 +03:00
Bénédikt Tran
e714ead7a2
gh-132388: remove outdated TODO comment in test_hmac.py ( #133008 )
2025-04-26 13:17:03 +00:00
Bénédikt Tran
7f02ded29f
gh-91221: fix test_curses.test_use_default_colors for xterm-256color ( #132990 )
...
Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color.
2025-04-26 10:38:27 +00:00
Eric Snow
cd9536a087
gh-132781: Cleanup Code Related to NotShareableError (gh-132782)
...
The following are added to the internal C-API:
* _PyErr_FormatV()
* _PyErr_SetModuleNotFoundError()
* _PyXIData_GetNotShareableErrorType()
* _PyXIData_FormatNotShareableError()
We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext().
2025-04-25 14:43:38 -06:00
Diego Russo
4c20f46fa0
gh-131798: JIT: Narrow the return type of _CALL_LEN to int ( #132940 )
...
Reduce unnecessary guards whenever `len()` is called and used
after.
Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
2025-04-26 02:57:42 +08:00
Victor Stinner
f0485de43a
gh-132950: Log is_remote_debug_enabled() in pythoninfo ( #132965 )
...
Log also the Py_REMOTE_DEBUG macro.
2025-04-25 18:13:47 +00:00
Tian Gao
a1f4a6b246
gh-132912: Use readline to synchronize between procs in remote pdb test ( #132949 )
2025-04-25 18:40:18 +01:00
Victor Stinner
947c4f19d9
gh-132950: Skip test_remote_pdb if remote exec is disabled ( #132951 )
2025-04-25 17:28:25 +00:00
Victor Stinner
070d866567
gh-107954: Allow setting cpu_count in PyConfig_Set() ( #132954 )
...
* gh-107954: Allow setting cpu_count in PyConfig_Set()
* Update the doc
2025-04-25 18:29:55 +02:00
Victor Stinner
670b6cc096
gh-132912: Use SHORT_TIMEOUT in test_remote_pdb ( #132939 )
...
Replace hardcoded timeout of 5 seconds with SHORT_TIMEOUT.
2025-04-25 14:00:26 +00:00
Pablo Galindo Salgado
6cbeb6ab91
gh-132912: Account for race in test_keyboard_interrupt in test_remote_pdb ( #132929 )
2025-04-25 14:46:44 +01:00
Pablo Galindo Salgado
e8cf3a1a64
gh-91048: Refactor _testexternalinspection and add Windows support ( #132852 )
2025-04-25 14:12:16 +01:00
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి)
8783cec9b6
gh-129027: Raise DeprecationWarning for sys._clear_type_cache ( #129043 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-25 15:01:48 +03:00
Victor Stinner
b402a4889b
gh-132912: Skip flaky test in test_remote_pdb ( #132924 )
2025-04-25 11:46:43 +00:00
Victor Stinner
79ba56433e
gh-132912: Kill the process on error in test_remote_pdb ( #132920 )
...
If a test fails (such as an assertion error), kill the child process.
2025-04-25 13:14:59 +02:00
Victor Stinner
de6482eda3
gh-132415: Use shutil.which() in missing_compiler_executable() ( #132906 )
...
Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
2025-04-25 11:50:55 +02:00
Victor Stinner
9cba14881b
gh-127906: Add missing sys import to test_cppext ( #132902 )
2025-04-25 10:19:26 +02:00
Bénédikt Tran
9888f175de
gh-131652: remove duplicated bits in Lib/test/clinic.test.c ( #131653 )
2025-04-25 10:19:12 +02:00
Ethan Furman
22bc953aa9
gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790)
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-24 23:13:54 -07:00
Steele Farnsworth
99b71efe8e
gh-129858: Special syntax error for elif block after else ( #129902 )
2025-04-25 01:25:48 +00:00
Tomas R.
c3a7118065
gh-69605: Add module autocomplete to PyREPL ( #129329 )
2025-04-25 02:24:26 +01:00
Matt Wozniski
797b29b1b5
gh-131591: Allow pdb to attach to a running process ( #132451 )
...
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2025-04-25 01:43:23 +01:00
Adam Turner
c9f3f5b4ed
gh-132415: Update vendored setuptools in `Lib/test/wheeldata` ( #132887 )
2025-04-25 00:46:20 +01:00
Tomas R.
08e3389e8c
GH-131798: Split up and optimize CALL_TUPLE_1 in the JIT (GH-132851)
2025-04-24 15:55:03 -07:00
Tian Gao
eef49c3595
gh-93696: Fixed the breakpoint display error for frozen modules ( #132862 )
2025-04-24 16:07:27 -04:00
Tomas R.
0a387b311e
GH-131798: Split up and optimize CALL_STR_1 in the JIT (GH-132849)
2025-04-24 12:54:46 -07:00
Aneesh Durg
c7a7aa9a57
gh-132737: Support profiling modules that require __main___ ( #132738 )
2025-04-24 14:41:01 -04:00
Jelle Zijlstra
e1c09fff05
gh-132882: Fix copying of unions with members that do not support __or__ ( #132883 )
2025-04-24 16:49:09 +00:00
Serhiy Storchaka
8c975b0fdd
Use os.openpty() instead of pty.openpty() in test_ioctl (GH-132880)
...
pty.openpty() does not work on Android, and it is easier to check
availability of os.openpty.
2025-04-24 16:07:00 +00:00
alexey semenyuk
d7365e6050
gh-132162: Add tests for Py_UniversalNewlineFgets() ( #132164 )
2025-04-24 17:43:48 +02:00
Adam Turner
06a26fda60
gh-118761: Optimise import time for `shlex` ( #132036 )
2025-04-24 16:10:46 +01:00