summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.12] Lint: Remove files that no longer fail to parse (GH-110356) (#110360)Hugo van Kemenade2023-10-041-2/+0
| | | Remove files that no longer fail to parse
* [3.12] gh-109151: Enable readline in the sqlite3 CLI (GH-109152) (#110352)Miss Islington (bot)2023-10-042-0/+5
| | | | | | gh-109151: Enable readline in the sqlite3 CLI (GH-109152) (cherry picked from commit 254e30c487908a52a7545cea205aeaef5fbfeea4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-85984: Document change in return type of tty functions (GH-110028) ↵Miss Islington (bot)2023-10-041-0/+6
| | | | | | | | (#110324) gh-85984: Document change in return type of tty functions (GH-110028) (cherry picked from commit f02f26e29366513b097578fbc6b25e02d0eba7c0) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Enhance TypedDict docs around required/optional keys (GH-109547) ↵Miss Islington (bot)2023-10-041-0/+15
| | | | | | | | | | | | (#109982) Enhance TypedDict docs around required/optional keys (GH-109547) As discussed in comments to GH-109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead. (cherry picked from commit f49958c886a2f2608f1008186d588efc2a98b445) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-109972: Enhance test_gdb (#110026) (#110351)Victor Stinner2023-10-049-218/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gh-109972: Enhance test_gdb (#110026) * Split test_pycfunction.py: add test_cfunction_full.py. Split the function into the following 6 functions. In verbose mode, these "pycfunction" tests now log each tested call. * test_pycfunction_noargs() * test_pycfunction_o() * test_pycfunction_varargs() * test_pycfunction_varargs_keywords() * test_pycfunction_fastcall() * test_pycfunction_fastcall_keywords() * Move get_gdb_repr() to PrettyPrintTests. * Replace DebuggerTests.get_sample_script() with SAMPLE_SCRIPT. * Rename checkout_hook_path to CHECKOUT_HOOK_PATH. * Rename gdb_version to GDB_VERSION_TEXT. * Replace (gdb_major_version, gdb_minor_version) with GDB_VERSION. * run_gdb() uses "backslashreplace" error handler instead of "replace". * Add check_gdb() function to util.py. * Enhance support.check_cflags_pgo(): check also for sysconfig PGO_PROF_USE_FLAG (if available) in compiler flags. * Move some SkipTest checks to test_gdb/__init__.py. * Elaborate why gdb cannot be tested on Windows: gdb doesn't support PDB debug symbol files. (cherry picked from commit 757cbd4f29c9e89b38b975e0463dc8ed331b2515) * gh-104736: Fix test_gdb tests on ppc64le with clang (#109360) Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora 38). Search patterns in gdb "bt" command output to detect when gdb fails to retrieve the traceback. For example, skip a test if "Backtrace stopped: frame did not save the PC" is found. (cherry picked from commit 44d9a71ea246e7c3fb478d9be62c16914be6c545) * gh-110166: Fix gdb CFunctionFullTests on ppc64le clang build (#110331) CFunctionFullTests now also runs "bt" command before "py-bt-full", similar to CFunctionTests which also runs "bt" command before "py-bt". So test_gdb can skip the test if patterns like "?? ()" are found in the gdb output. (cherry picked from commit 1de9406f9136e3952b849487f0151be3c669a3ea)
* [3.12] gh-109974: Fix threading lock_tests race conditions (#110057) (#110346)Victor Stinner2023-10-043-249/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gh-109974: Fix threading lock_tests race conditions (#110057) Fix race conditions in test_threading lock tests. Wait until a condition is met rather than using time.sleep() with a hardcoded number of seconds. * Replace sleeping loops with support.sleeping_retry() which raises an exception on timeout. * Add wait_threads_blocked(nthread) which computes a sleep depending on the number of threads. Remove _wait() function. * test_set_and_clear(): use a way longer Event.wait() timeout. * BarrierTests.test_repr(): wait until the 2 threads are waiting for the barrier. Use a way longer timeout for Barrier.wait() timeout. * test_thread_leak() no longer needs to count len(threading.enumerate()): Bunch uses threading_helper.wait_threads_exit() internally which does it in wait_for_finished(). * Add BaseLockTests.wait_phase() which implements a timeout. test_reacquire() and test_recursion_count() use wait_phase(). (cherry picked from commit 4e356ad183eeb567783f4a87fd092573da1e9252) * gh-109974: Fix more threading lock_tests race conditions (#110089) * Add context manager on Bunch class. * Bunch now catchs exceptions on executed functions and re-raise them at __exit__() as an ExceptionGroup. * Rewrite BarrierProxy.test_default_timeout(). Use a single thread. Only check that barrier.wait() blocks for at least default timeout seconds. * test_with(): inline _with() function. (cherry picked from commit 743e3572ee940a6cf88fd518e5f4a447905ba5eb)
* [3.12] gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` ↵Miss Islington (bot)2023-10-041-12/+1
| | | | | | | | (GH-110334) (#110349) gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (GH-110334) (cherry picked from commit e9f2352b7b7503519790ee6f51c2e298cf390e75) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-108987: Fix _thread.start_new_thread() race condition (#109135) ↵Victor Stinner2023-10-045-44/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#110342) * gh-108987: Fix _thread.start_new_thread() race condition (#109135) Fix _thread.start_new_thread() race condition. If a thread is created during Python finalization, the newly spawned thread now exits immediately instead of trying to access freed memory and lead to a crash. thread_run() calls PyEval_AcquireThread() which checks if the thread must exit. The problem was that tstate was dereferenced earlier in _PyThreadState_Bind() which leads to a crash most of the time. Move _PyThreadState_CheckConsistency() from thread_run() to _PyThreadState_Bind(). (cherry picked from commit 517cd82ea7d01b344804413ef05610934a43a241) * gh-109795: `_thread.start_new_thread`: allocate thread bootstate using raw memory allocator (#109808) (cherry picked from commit 1b8f2366b38c87b0450d9c15bdfdd4c4a2fc3a01) --------- Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
* [3.12] gh-110335: asyncio test_unix_events cleans multiprocessing ↵Miss Islington (bot)2023-10-041-0/+8
| | | | | | | | | | | (GH-110336) (#110338) gh-110335: asyncio test_unix_events cleans multiprocessing (GH-110336) test_unix_events tests using the multiprocessing module now call multiprocessing.util._cleanup_tests(). (cherry picked from commit 1337765225d7d593169205672e004f97e15237ec) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#110340)Victor Stinner2023-10-047-12/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gh-109615: Fix support test_copy_python_src_ignore() (#109958) Fix the test when run on an installed Python: use "abs_srcdir" of sysconfig, and skip the test if the Python source code cannot be found. * Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and Lib/test/libregrtest/utils.py now first try to get "abs_srcdir" from sysconfig, before getting "srcdir" from sysconfig. * test.pythoninfo logs sysconfig "abs_srcdir". (cherry picked from commit b89ed9df39851348fbb1552294644f99f6b17d2c) * gh-109615: Fix support test_copy_python_src_ignore() on WASM (#109970) Not only check if src_dir exists, but look also for Lib/os.py landmark. (cherry picked from commit cc54bcf17b5b5f7681f52baf3acef75b995fa1fd) * gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108) (cherry picked from commit 20bc5f7c28a6f8a2e156c4a748ffabb5efc7c761) * gh-109748: Fix again venv test_zippath_from_non_installed_posix() (#110149) Call also copy_python_src_ignore() on listdir() names. shutil.copytree(): replace set() with an empty tuple. An empty tuple becomes a constant in the compiler and checking if an item is in an empty tuple is cheap. (cherry picked from commit 0def8c712bb6f66f1081cab71deb3681566b846d) --------- Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-109972: Split test_gdb.py into test_gdb package (#109977) (#110339)Victor Stinner2023-10-0411-1067/+1124
| | | | | | | | | | | | | | | | | | gh-109972: Split test_gdb.py into test_gdb package (#109977) Split test_gdb.py file into a test_gdb package made of multiple tests, so tests can now be run in parallel. * Create Lib/test/test_gdb/ directory. * Split test_gdb.py into multiple files in Lib/test/test_gdb/ directory. * Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory. Update get_sample_script(): use __file__ to locate gdb_sample.py. * Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py. * Explicitly skip test_gdb on Windows. Previously, test_gdb was skipped even if gdb was available because of gdb_has_frame_select(). (cherry picked from commit 8f324b7ecd2df3036fab098c4c8ac185ac07b277)
* [3.12] gh-110267: Add tests for pickling and copying PyStructSequence ↵Miss Islington (bot)2023-10-042-2/+75
| | | | | | | objects (GH-110272) (GH-110285) (cherry picked from commit 2d4865d775123e8889c7a79fc49b4bf627176c4b) Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
* [3.12] gh-109917: Fix test instability in test_concurrent_futures ↵Miss Islington (bot)2023-10-031-1/+2
| | | | | | | | | | | | | | | | | (GH-110306) (#110315) gh-109917: Fix test instability in test_concurrent_futures (GH-110306) The test had an instability issue due to the ordering of the dummy queue operation and the real wakeup pipe operations. Both primitives are thread safe but not done atomically as a single update and may interleave arbitrarily. With the old order of operations this can lead to an incorrect state where the dummy queue is full but the wakeup pipe is empty. By swapping the order in clear() I think this can no longer happen in any possible operation interleaving (famous last words). (cherry picked from commit a376a72bd92cd7c9930467dd1aba40045fb75e3b) Co-authored-by: elfstrom <elfstrom@users.noreply.github.com>
* [3.12] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292) ↵Adam Turner2023-10-0318-203/+203
| | | | | | (#110302) [3.12] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292). (cherry picked from commit 77e9aae3837d9f0cf87461d023896f2c4aeb282f)
* [3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs ↵Miss Islington (bot)2023-10-031-2/+2
| | | | | | | | | (GH-109322) (#110294) (cherry picked from commit 4227bfa8b273207a2b882f7d69c8ac49c3d2b57d) Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] Enable ruff on `Lib/test/test_typing.py` (#110179) (#110288)Alex Waygood2023-10-033-54/+53
| | | Enable ruff on `Lib/test/test_typing.py` (#110179)
* [3.12] Bump various dependencies in `Doc/requirements-oldest-sphinx.txt` ↵Miss Islington (bot)2023-10-031-7/+7
| | | | | | | | | | (GH-110278) (#110280) Bump various dependencies in `Doc/requirements-oldest-sphinx.txt` (GH-110278) This resolves a Dependabot security alert on the repository for urllib3==2.0.4. (cherry picked from commit f1663a492e14c80c30cb9741fdc36fa221d5e30a) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Fix typo in py312 whatsnew: add missing closing paren (GH-110255) ↵Miss Islington (bot)2023-10-031-1/+1
| | | | | | | | (#110257) Fix typo in py312 whatsnew: add missing closing paren (GH-110255) (cherry picked from commit 8c071373f12f325c54591fe990ec026184e48f8f) Co-authored-by: Lele Gaifax <lele@metapensiero.it>
* [3.12] Remove unused Misc/requirements-test.txt (GH-110240) (#110253)Miss Islington (bot)2023-10-031-1/+0
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-109653: Reduce the import time of `random` by 60% (GH-110221) ↵Miss Islington (bot)2023-10-022-1/+3
| | | | | | | | (#110247) gh-109653: Fix regression in the import time of `random` in Python 3.12 (GH-110221) (cherry picked from commit 21a6263020db17020b2886f996bc23aa8cb7fbdf) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-110241: Add missing error check to `record_eval` in ↵Miss Islington (bot)2023-10-021-1/+5
| | | | | | | | `_testinternalcapi` (GH-110242) (#110244) gh-110241: Add missing error check to `record_eval` in `_testinternalcapi` (GH-110242) (cherry picked from commit 4596c76d1a7650fd4650c814dc1d40d664cd8fb4) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-108494: Document how to add a project in PCbuild/readme.txt ↵Miss Islington (bot)2023-10-021-0/+28
| | | | | | | | | (GH-110077) (#110230) gh-108494: Document how to add a project in PCbuild/readme.txt (GH-110077) (cherry picked from commit 6387b5313c60c1403785b2245db33372476ac304) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110098)Victor Stinner2023-10-027-54/+19
| | | | | | | | | | 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)
* [3.12] gh-110031: Skip test_threading fork tests if ASAN (#110100) (#110103)Victor Stinner2023-10-022-16/+27
| | | | | | | | 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)
* [3.12] gh-109782: Ensure `os.path.isdir` has the same signature on all ↵Alex Waygood2023-10-023-13/+15
| | | | | | | 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>
* [3.12] Sync factor() recipe with main branch (gh-110231)Raymond Hettinger2023-10-021-3/+1
|
* [3.12] Fix typos in docs and comments (#109619) (#109621)Alex Waygood2023-10-029-9/+9
| | | | | | Fix typos in docs and comments (#109619) Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
* [3.12] Code: Update Donghee Na's name (GH-109744) (#110225)Miss Islington (bot)2023-10-024-4/+4
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-110178: Use fewer weakrefs in test_typing.py (GH-110194) (#110224)Miss Islington (bot)2023-10-021-1/+1
| | | | | | | | 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] 3.12 What's New: Remove duplicate "up to" (GH-110219) (#110220)Miss Islington (bot)2023-10-021-1/+1
| | | | | | 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>
* [3.12] gh-108963: using random to generate unique string in sys.intern test ↵Victor Stinner2023-10-021-7/+2
| | | | | | | | | … (#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>
* [3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT ↵Miss Islington (bot)2023-10-024-12/+91
| | | | | | | | | | 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>
* [3.12] gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` ↵Miss Islington (bot)2023-10-021-3/+11
| | | | | | | | (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>
* [3.12] gh-109649: Enhance os.cpu_count() documentation (#110169)Victor Stinner2023-10-022-7/+10
| | | | | | | | | | | * 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
* [3.12] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110158)Miss Islington (bot)2023-10-021-3/+0
| | | | | | | | | 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>
* [3.12] Add example for linear_regression() with proportional=True. ↵Miss Islington (bot)2023-10-021-0/+19
| | | | | | | | (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>
* [3.12] gh-109047: concurrent.futures catches RuntimeError (#109810) (#110126)Victor Stinner2023-10-024-17/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* [3.12] gh-109592: test_eintr tolerates 20 ms when comparing timings ↵Miss Islington (bot)2023-10-021-7/+16
| | | | | | | | (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>
* [3.12] gh-110052: Fix faulthandler for freed tstate (#110069) (#110071)Victor Stinner2023-10-022-12/+38
| | | | | | | | 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)
* [3.12] gh-110036: multiprocessing Popen.terminate() catches PermissionError ↵Miss Islington (bot)2023-10-023-4/+17
| | | | | | | | | | | | | (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>
* [3.12] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110060)Miss Islington (bot)2023-10-021-11/+0
| | | | | | | | | | | | | | | 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>
* [3.12] gh-109889: fix compiler's redundant NOP detection to look past NOPs ↵Miss Islington (bot)2023-10-023-1/+18
| | | | | | | | 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>
* [3.12] gh-110038: KqueueSelector must count all read/write events ↵Davide Rizzo2023-10-023-1/+38
| | | | | | (GH-110039) (#110043) [3.12] gh-110038: KqueueSelector must count all read/write events (GH-110039). (cherry picked from commit b14f0ab51cb4851b25935279617e388456dcf716)
* [3.12] gh-110033: Fix signal test_interprocess_signal() (GH-110035) (#110040)Miss Islington (bot)2023-10-022-0/+13
| | | | | | | | | | | | 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>
* [3.12] gh-109594: Fix concurrent.futures test_timeout() (GH-110018) (#110021)Miss Islington (bot)2023-10-022-8/+13
| | | | | | | | | | | | | 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>
* [3.12] gh-109818: `reprlib.recursive_repr` copies `__type_params__` (… ↵Jelle Zijlstra2023-10-023-0/+14
| | | | | | | | (#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>
* [3.12] gh-109955 : Update state transition comments for asyncio.Task ↵Miss Islington (bot)2023-10-021-7/+17
| | | | | | | | | (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>
* [3.12] gh-109565: Fix concurrent.futures test_future_times_out() (GH-109949) ↵Miss Islington (bot)2023-10-021-2/+5
| | | | | | | | | | | (#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>
* [3.12] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109950)Victor Stinner2023-10-025-50/+60
| | | | | | | | | | | | | 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)
* [3.12] Remove loop from docstring for asyncio.streams.open_connection ↵Miss Islington (bot)2023-10-021-3/+2
| | | | | | | | (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>