| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
gh-110088, gh-109878: Fix test_asyncio timeouts (#110092)
Fix test_asyncio timeouts: don't measure the maximum duration, a test
should not measure a CI performance. Only measure the minimum
duration when a task has a timeout or delay. Add CLOCK_RES to
test_asyncio.utils.
(cherry picked from commit db0a258e796703e12befea9d6dec04e349ca2f5b)
|
|
|
|
|
|
|
|
| |
gh-110031: Skip test_threading fork tests if ASAN (#110100)
Skip test_threading tests using thread+fork if Python is built with
Address Sanitizer (ASAN).
(cherry picked from commit 86e76ab8af9a5018acbcdcbb6285678175b1bd8a)
|
|
|
|
|
|
|
| |
platforms (GH-109790) (#110233)
gh-109782: Ensure `os.path.isdir` has the same signature on all platforms (GH-109790)
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
|
| |
|
|
|
|
|
|
| |
Fix typos in docs and comments (#109619)
Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
gh-110178: Use fewer weakrefs in test_typing.py (GH-110194)
Confirmed that without the C changes from GH-108517, this test still segfaults with only 10 weakrefs.
(cherry picked from commit 732ad44cec971be5255b1accbac6555d3615c2bf)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
| |
3.12 What's New: Remove duplicate "up to" (GH-110219)
(cherry picked from commit 8d92b6eff3bac45e7d4871c46c4511218b9b685a)
Co-authored-by: numbermaniac <5206120+numbermaniac@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
… (#110216)
gh-108963: using random to generate unique string in sys.intern test (#109491)
(cherry picked from commit 44b1e4ea4842c6cdc1bedba7aaeb93f236b3ec08)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
extension on executable files (GH-109995) (#110202)
gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995)
The default arguments for shutil.which() request an executable file, but extensionless files are not executable on Windows and should be ignored.
(cherry picked from commit 29b875bb93099171aeb7a60cd18d4e1f4ea3c1db)
Co-authored-by: Charles Machalow <csm10495@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-110170) (#110182)
gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (GH-110170)
(cherry picked from commit 06faa9a39bd93c5e7999d52b52043ecdd0774dac)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
| |
* gh-109649: Enhance os.cpu_count() documentation
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
thread.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
when the test completes!
* Restore removed text
|
|
|
|
|
|
|
|
|
| |
gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157)
Don't measure the CI performance: don't test the maximum elapsed
time. The check failed on a slow CI.
(cherry picked from commit c62b49ecc8da13fa9522865ef6fe0aec194fd0d8)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
(gh-110133) (#110134)
Add example for linear_regression() with proportional=True. (gh-110133)
(cherry picked from commit 613c0d4e866341e15a66704643a6392ce49058ba)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109047: concurrent.futures catches PythonFinalizationError (#109810)
concurrent.futures: The *executor manager thread* now catches
exceptions when adding an item to the *call queue*. During Python
finalization, creating a new thread can now raise RuntimeError. Catch
the exception and call terminate_broken() in this case.
Add test_python_finalization_error() to test_concurrent_futures.
concurrent.futures._ExecutorManagerThread changes:
* terminate_broken() no longer calls shutdown_workers() since the
call queue is no longer working anymore (read and write ends of
the queue pipe are closed).
* terminate_broken() now terminates child processes, not only
wait until they complete.
* _ExecutorManagerThread.terminate_broken() now holds shutdown_lock
to prevent race conditons with ProcessPoolExecutor.submit().
multiprocessing.Queue changes:
* Add _terminate_broken() method.
* _start_thread() sets _thread to None on exception to prevent
leaking "dangling threads" even if the thread was not started
yet.
(cherry picked from commit 635184212179b0511768ea1cd57256e134ba2d75)
|
|
|
|
|
|
|
|
| |
(GH-110102) (#110106)
gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102)
(cherry picked from commit 9c73a9acec095c05a178e7dff638f7d9769318f3)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
gh-110052: Fix faulthandler for freed tstate (#110069)
faulthandler now detected freed interp and freed tstate, and no
longer dereference them.
(cherry picked from commit 2e37a38bcbfbe1357436e030538290e7d00b668d)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-110037) (#110064)
gh-110036: multiprocessing Popen.terminate() catches PermissionError (GH-110037)
On Windows, multiprocessing Popen.terminate() now catchs
PermissionError and get the process exit code. If the process is
still running, raise again the PermissionError. Otherwise, the
process terminated as expected: store its exit code.
(cherry picked from commit bd4518c60c9df356cf5e05b81305e3644ebb5e70)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109960: Remove test_pty timeout of 10 seconds (GH-110058)
In 2003, test_pty got a hardcoded timeout of 10 seconds to prevent
hanging on AIX & HPUX "if run after test_openpty":
commit 7d8145268ee282f14d6adce9305dc3c1c7ffec14. Since 2003, test_pty
was no longer reported to hang on AIX. But today, the test can fail
simply because a CI is busy running other tests in parallel.
The timeout of 10 seconds is no longer needed, just remove it.
Moreover, regrtest now has multiple built-in generic timeout
mecanisms.
(cherry picked from commit 5fdcea744024c8a19ddb57057bf5ec2889546c98)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
with no lineno when looking for the next instruction's lineno (GH-109987) (#110048)
gh-109889: fix compiler's redundant NOP detection to look past NOPs with no lineno when looking for the next instruction's lineno (GH-109987)
(cherry picked from commit f580edcc6a4c528020afe46c753db713474acad6)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
| |
(GH-110039) (#110043)
[3.12] gh-110038: KqueueSelector must count all read/write events (GH-110039).
(cherry picked from commit b14f0ab51cb4851b25935279617e388456dcf716)
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-110033: Fix signal test_interprocess_signal() (GH-110035)
Fix test_interprocess_signal() of test_signal. Make sure that the
subprocess.Popen object is deleted before the test raising an
exception in a signal handler. Otherwise, Popen.__del__() can get the
exception which is logged as "Exception ignored in: ...." and the
test fails.
(cherry picked from commit 7e0fbf5175fcf21dae390ba68b7f49706d62aa49)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109594: Fix concurrent.futures test_timeout() (GH-110018)
Fix test_timeout() of test_concurrent_futures.test_wait. Remove the
future which may or may not complete depending if it takes longer
than the timeout ot not. Keep the second future which does not
complete before wait(). Make also the test faster: 0.5 second instead
of 6 seconds, so remove @support.requires_resource('walltime')
decorator.
(cherry picked from commit 9be283e5e15d5d5685b78a38eb132501f7f3febb)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
(#109999)
[3.12] gh-109818: `reprlib.recursive_repr` copies `__type_params__` (GH-109819).
(cherry picked from commit f65f9e80fe741c894582a3e413d4e3318c1ed626)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
| |
(GH-109910) (#109992)
gh-109955 : Update state transition comments for asyncio.Task (GH-109910)
(cherry picked from commit 45cf5b0c69bb5c51f33fc681d90c45147e311ddf)
Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(#109952)
gh-109565: Fix concurrent.futures test_future_times_out() (GH-109949)
as_completed() uses a timeout of 100 ms instead of 10 ms. Windows
monotonic clock resolution is around 15.6 ms.
(cherry picked from commit b1aebf1e6576680d606068d17e2208259573e061)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)
Fix copy_source_tree() function of test_tools.test_freeze:
* Don't copy SRC_DIR/build/ anymore. This directory is modified by
other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.
(cherry picked from commit 1512d6c6ee2a770afb339bbb74c1b990116f7f89)
|
|
|
|
|
|
|
|
| |
(GH-108528) (#109941)
Remove loop from docstring for asyncio.streams.open_connection (GH-108528)
(cherry picked from commit e721f7a95186452339dc9e57630d639d549b2521)
Co-authored-by: Tom Gillespie <tgbugs@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
gh-109098: Fuzz re module instead of internal sre (GH-109911)
* gh-109098: Fuzz re module instead of internal sre
* Fix c-analyzer globals test failure
* Put globals exception in ignored.tsv
(cherry picked from commit a829356f86d597e4dfe92e236a6d711c8a464f16)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
|
|
|
|
|
|
|
|
| |
gh-109845: Make test_ftplib more stable under load (GH-109912)
recv() can return partial data cut in the middle of a multibyte
character. Test raw binary data instead of data incorrectly decoded by parts.
(cherry picked from commit 2ef2fffe3be953b91852585c75188d5475b09474)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
More informative docstrings in the random module (gh-109745)
(cherry picked from commit 19bf3986958fc8269a1eb6d741bb60c91d6b5e58)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109629) (#109898)
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)
---------
(cherry picked from commit 0eb98837b60bc58e57ad3e2b35c6b0e9ab634678)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109887) (#109892)
gh-109832: concurrent.futures test_deadlock restores sys.stderr (GH-109887)
test_error_at_task_unpickle() and
test_error_during_result_unpickle_in_result_handler() now restore
sys.stderr which is overriden by _raise_error_ignore_stderr().
(cherry picked from commit 2897142d2ec0930a8991af964c798b68fb6dcadd)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109867) (#109886)
gh-109631: Allow interruption of short repeated regex matches (GH-109867)
Counting for signal checking now continues in new match from the point where
it ended in the previous match instead of starting from 0.
(cherry picked from commit 8ac2085b80eca4d9b2a1093d0a7da020fd12e11a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109835) (#109855)
gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835)
Skip test_is_alive_after_fork() of test_threading if Python is built
with Address Sanitizer (ASAN).
(cherry picked from commit bc06743533b5fea2d5ecdad6dd3caa372c67439f)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
(#109705)
gh-109702: Increase concurrent_futures deadlock timeout (GH-109703)
Replace SHORT_TIMEOUT with LONG_TIMEOUT in test_deadlock of
test_concurrent_futures.
(cherry picked from commit 1eb1b45183c3b8aeefe3d5d27694155741e82bbc)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
support.import_helper (GH-109626) (#109640)
gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626)
(cherry picked from commit 115c49ad5a5ccfb628fef3ae06a566f7a0197f97)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
| |
gh-109833: Fix asyncio test_wait_for() (GH-109834)
Expect the test to be "short" but don't measure the exact performance
of the CI. SHORT_TIMEOUT is about 30 seconds whereas the cancelled
coroutine takes around 1 hour.
(cherry picked from commit f29bc9c9a0a6794c6b8a9e84a7ba9237b427a10a)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
| |
(GH-108513) (#109784)
This fixes issue GH-105829, https://github.com/python/cpython/issues/105829
(cherry picked from commit 405b06375a8a4cdb08ff53afade09a8b66ec23d5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109522) (#109777)
gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522)
PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks
or sys.path_importer_cache or they are not list and dict correspondingly.
Previously it could return NULL without setting error in obscure cases,
crash or raise SystemError if these attributes have wrong type.
(cherry picked from commit 62c7015e89cbdedb5218d4fedd45f971885f67a8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(#109762)
gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707)
Don't check order, queue items can be written in any order.
(cherry picked from commit b03a791497ff4b3c42805e06c73d08ac34087402)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
fix incorrect soft keywords (GH-109606). (#109752)
(cherry picked from commit b28ffaa193efc66f46ab90d383279174a11a11d7)
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109709: Fix asyncio test_stdin_broken_pipe() (GH-109710)
Replace harcoded sleep of 500 ms with synchronization using a pipe.
Fix also Process._feed_stdin(): catch also BrokenPipeError on
stdin.write(input), not only on stdin.drain().
(cherry picked from commit cbbdf2c1440c804adcfc32ea0470865b3b3b8eb2)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
(#109725)
gh-106584: Fix exit code for unittest in Python 3.12 (GH-106588)
(cherry picked from commit 8fc071345b50dd3de61ebeeaa287ccef21d061b2)
Co-authored-by: EliseevEgor <egor.eliseev@jetbrains.com>
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
| |
(#109698)
gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697)
On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.
(cherry picked from commit 26e06ad617bb416201c769fea91cd33d544c6a1c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109605) (#109695)
gh-109582: test_fork_signal_handling should wait for event (GH-109605)
Sometimes the child_handled event was missing because either
the child quits before it gets a chance to handle the signal,
or the parent asserts before the event notification is
delivered via IPC. Synchronize explicitly to avoid this.
(cherry picked from commit 608c1f3083ea1e06d383ef1a9878a9758903de4b)
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(#109368) (#109679)
gh-108303: Move `test_future` into its own test_future_stmt subdir (#109368)
(cherry picked from commit 82505dc351b2f7e37aa395218709b432d83292cd)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109265) (#109677)
* gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265)
(cherry picked from commit 1110c5bc828218086f6397ec05a9312fb73ea30a)
* gh-108303: Add `Lib/test/tokenizedata` to `TESTSUBDIRS` (#109314)
(cherry picked from commit 42ab2cbd7b5e76e919b70883ae683e789dbd913d)
---------
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#109674)
* gh-108303: Create Lib/test/test_dataclasses/ directory (GH-108978)
Move test_dataclasses.py and its "dataclass_*.py" modules into the
new Lib/test/test_dataclasses/ subdirectory.
(cherry picked from commit 14d6e197cc56e5256d501839a4e66e3864ab15f0)
Co-authored-by: Victor Stinner <vstinner@python.org>
* Fix Lint job: update Lib/test/.ruff.toml
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
(GH-108354) (#109672)
gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (GH-108354)
(cherry picked from commit 3f61cf646d0506baa0c0c2118f05110446519c62)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|