Commit graph

118809 commits

Author SHA1 Message Date
Miss Islington (bot)
bc1fe3549b
[3.12] gh-109151: Enable readline in the sqlite3 CLI (GH-109152) (#110352)
gh-109151: Enable readline in the sqlite3 CLI (GH-109152)
(cherry picked from commit 254e30c487)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-04 15:48:31 +02:00
Miss Islington (bot)
7ec34874e3
[3.12] gh-85984: Document change in return type of tty functions (GH-110028) (#110324)
gh-85984: Document change in return type of tty functions (GH-110028)
(cherry picked from commit f02f26e293)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-04 13:57:14 +02:00
Miss Islington (bot)
ee2f2bdb30
[3.12] Enhance TypedDict docs around required/optional keys (GH-109547) (#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 f49958c886)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-04 13:56:58 +02:00
Victor Stinner
bbce8bd05d
[3.12] gh-109972: Enhance test_gdb (#110026) (#110351)
* 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 757cbd4f29)

* 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 44d9a71ea2)

* 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 1de9406f91)
2023-10-04 11:34:28 +00:00
Victor Stinner
1d032ea3d6
[3.12] gh-109974: Fix threading lock_tests race conditions (#110057) (#110346)
* 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 4e356ad183)

* 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 743e3572ee)
2023-10-04 11:26:45 +00:00
Miss Islington (bot)
f53871e1e8
[3.12] gh-110332: Remove mentions of random.WichmannHill from test_zlib (GH-110334) (#110349)
gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (GH-110334)
(cherry picked from commit e9f2352b7b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-04 11:25:13 +00:00
Victor Stinner
4936fa9541
[3.12] gh-108987: Fix _thread.start_new_thread() race condition (#109135) (#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 517cd82ea7)

* gh-109795: `_thread.start_new_thread`: allocate thread bootstate using raw memory allocator (#109808)

(cherry picked from commit 1b8f2366b3)

---------

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2023-10-04 11:20:31 +00:00
Miss Islington (bot)
1d87465005
[3.12] gh-110335: asyncio test_unix_events cleans multiprocessing (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 1337765225)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-04 12:33:14 +02:00
Victor Stinner
8939221e91
[3.12] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#110340)
* 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 b89ed9df39)

* 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 cc54bcf17b)

* gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108)

(cherry picked from commit 20bc5f7c28)

* 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 0def8c712b)

---------

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-10-04 10:27:12 +00:00
Victor Stinner
e7a61d34b7
[3.12] gh-109972: Split test_gdb.py into test_gdb package (#109977) (#110339)
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 8f324b7ecd)
2023-10-04 10:26:24 +00:00
Miss Islington (bot)
35feda5bc9
[3.12] gh-110267: Add tests for pickling and copying PyStructSequence objects (GH-110272) (GH-110285)
(cherry picked from commit 2d4865d775)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
2023-10-04 12:01:03 +03:00
Miss Islington (bot)
414f562081
[3.12] gh-109917: Fix test instability in test_concurrent_futures (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 a376a72bd9)

Co-authored-by: elfstrom <elfstrom@users.noreply.github.com>
2023-10-03 22:28:13 +00:00
Adam Turner
4c0f42bbc6
[3.12] Docs: Avoid the deprecated `.. cmdoption::` directive (GH-110292) (#110302)
[3.12] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292).
(cherry picked from commit 77e9aae383)
2023-10-03 20:55:29 +03:00
Miss Islington (bot)
90dea557bb
[3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH-109322) (#110294)
(cherry picked from commit 4227bfa8b2)

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>
2023-10-03 16:02:44 +00:00
Alex Waygood
4dac406f66
[3.12] Enable ruff on Lib/test/test_typing.py (#110179) (#110288)
Enable ruff on `Lib/test/test_typing.py` (#110179)
2023-10-03 15:13:22 +00:00
Miss Islington (bot)
bd56c51f1c
[3.12] Bump various dependencies in Doc/requirements-oldest-sphinx.txt (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 f1663a492e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-03 13:18:09 +00:00
Miss Islington (bot)
64afbf6f28
[3.12] Fix typo in py312 whatsnew: add missing closing paren (GH-110255) (#110257)
Fix typo in py312 whatsnew: add missing closing paren (GH-110255)
(cherry picked from commit 8c071373f1)

Co-authored-by: Lele Gaifax <lele@metapensiero.it>
2023-10-03 06:20:20 +00:00
Miss Islington (bot)
b0b9b91f78
[3.12] Remove unused Misc/requirements-test.txt (GH-110240) (#110253)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-02 23:36:30 -06:00
Miss Islington (bot)
41e8e1553f
[3.12] gh-109653: Reduce the import time of random by 60% (GH-110221) (#110247)
gh-109653: Fix regression in the import time of `random` in Python 3.12 (GH-110221)
(cherry picked from commit 21a6263020)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-02 23:31:55 +00:00
Miss Islington (bot)
892b1942a7
[3.12] gh-110241: Add missing error check to record_eval in _testinternalcapi (GH-110242) (#110244)
gh-110241: Add missing error check to `record_eval` in `_testinternalcapi` (GH-110242)
(cherry picked from commit 4596c76d1a)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-02 21:38:25 +00:00
Miss Islington (bot)
74d0b60811
[3.12] gh-108494: Document how to add a project in PCbuild/readme.txt (GH-110077) (#110230)
gh-108494: Document how to add a project in PCbuild/readme.txt (GH-110077)

(cherry picked from commit 6387b5313c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 19:48:31 +00:00
Victor Stinner
0745ab88e5
[3.12] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110098)
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 db0a258e79)
2023-10-02 19:35:29 +00:00
Victor Stinner
c188a13c8e
[3.12] gh-110031: Skip test_threading fork tests if ASAN (#110100) (#110103)
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 86e76ab8af)
2023-10-02 19:31:12 +00:00
Alex Waygood
da75bd6c31
[3.12] gh-109782: Ensure os.path.isdir has the same signature on all 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>
2023-10-02 19:25:06 +00:00
Raymond Hettinger
221c8d64e6
[3.12] Sync factor() recipe with main branch (gh-110231) 2023-10-02 14:19:46 -05:00
Alex Waygood
25bf0564c4
[3.12] Fix typos in docs and comments (#109619) (#109621)
Fix typos in docs and comments (#109619)

Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
2023-10-02 17:34:49 +00:00
Miss Islington (bot)
196738fc86
[3.12] Code: Update Donghee Na's name (GH-109744) (#110225)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-02 17:31:34 +00:00
Miss Islington (bot)
46e69576a9
[3.12] gh-110178: Use fewer weakrefs in test_typing.py (GH-110194) (#110224)
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 732ad44cec)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-02 18:15:30 +01:00
Miss Islington (bot)
8296b53027
[3.12] 3.12 What's New: Remove duplicate "up to" (GH-110219) (#110220)
3.12 What's New: Remove duplicate "up to" (GH-110219)
(cherry picked from commit 8d92b6eff3)

Co-authored-by: numbermaniac <5206120+numbermaniac@users.noreply.github.com>
2023-10-02 17:48:57 +02:00
Victor Stinner
f911d7ecd9
[3.12] gh-108963: using random to generate unique string in sys.intern test … (#110216)
gh-108963: using random to generate unique string in sys.intern test (#109491)

(cherry picked from commit 44b1e4ea48)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2023-10-02 17:48:42 +02:00
Miss Islington (bot)
b61a4da459
[3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT 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 29b875bb93)

Co-authored-by: Charles Machalow <csm10495@gmail.com>
2023-10-02 17:48:30 +02:00
Miss Islington (bot)
10af2242f4
[3.12] gh-110160: Fix flaky test_find_periodic_pattern in string_tests (GH-110170) (#110182)
gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (GH-110170)
(cherry picked from commit 06faa9a39b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-02 17:48:17 +02:00
Victor Stinner
5245b97e13
[3.12] gh-109649: Enhance os.cpu_count() documentation (#110169)
* 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
2023-10-02 17:47:57 +02:00
Miss Islington (bot)
ce332aa8c5
[3.12] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110158)
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 c62b49ecc8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:47:41 +02:00
Miss Islington (bot)
b8a30a4365
[3.12] Add example for linear_regression() with proportional=True. (gh-110133) (#110134)
Add example for linear_regression() with proportional=True. (gh-110133)
(cherry picked from commit 613c0d4e86)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-10-02 17:47:28 +02:00
Victor Stinner
356de021d7
[3.12] gh-109047: concurrent.futures catches RuntimeError (#109810) (#110126)
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 6351842121)
2023-10-02 17:47:10 +02:00
Miss Islington (bot)
41eb0c7286
[3.12] gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102) (#110106)
gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102)
(cherry picked from commit 9c73a9acec)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:46:45 +02:00
Victor Stinner
d0641ab676
[3.12] gh-110052: Fix faulthandler for freed tstate (#110069) (#110071)
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 2e37a38bcb)
2023-10-02 17:44:51 +02:00
Miss Islington (bot)
a2074911ba
[3.12] gh-110036: multiprocessing Popen.terminate() catches PermissionError (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 bd4518c60c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:44:26 +02:00
Miss Islington (bot)
aaa8bf18c6
[3.12] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110060)
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 7d8145268e. 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 5fdcea7440)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:43:38 +02:00
Miss Islington (bot)
2b96102f29
[3.12] 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) (#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 f580edcc6a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-10-02 17:43:16 +02:00
Davide Rizzo
c794103417
[3.12] gh-110038: KqueueSelector must count all read/write events (GH-110039) (#110043)
[3.12] gh-110038: KqueueSelector must count all read/write events (GH-110039).
(cherry picked from commit b14f0ab51c)
2023-10-02 17:42:55 +02:00
Miss Islington (bot)
4bdcb99469
[3.12] gh-110033: Fix signal test_interprocess_signal() (GH-110035) (#110040)
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 7e0fbf5175)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:42:40 +02:00
Miss Islington (bot)
9cf6d89165
[3.12] gh-109594: Fix concurrent.futures test_timeout() (GH-110018) (#110021)
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 9be283e5e1)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:42:03 +02:00
Jelle Zijlstra
9be6a11199
[3.12] gh-109818: reprlib.recursive_repr copies __type_params__ (… (#109999)
[3.12] gh-109818: `reprlib.recursive_repr` copies `__type_params__` (GH-109819).
(cherry picked from commit f65f9e80fe)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-02 17:41:26 +02:00
Miss Islington (bot)
dd67e59bb1
[3.12] gh-109955 : Update state transition comments for asyncio.Task (GH-109910) (#109992)
gh-109955 : Update state transition comments for asyncio.Task (GH-109910)
(cherry picked from commit 45cf5b0c69)

Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 17:41:12 +02:00
Miss Islington (bot)
73ec1e7c21
[3.12] gh-109565: Fix concurrent.futures test_future_times_out() (GH-109949) (#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 b1aebf1e65)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 17:40:16 +02:00
Victor Stinner
1fc25a389c
[3.12] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109950)
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 1512d6c6ee)
2023-10-02 17:40:02 +02:00
Miss Islington (bot)
3ab9fdaedb
[3.12] Remove loop from docstring for asyncio.streams.open_connection (GH-108528) (#109941)
Remove loop from docstring for asyncio.streams.open_connection (GH-108528)
(cherry picked from commit e721f7a951)

Co-authored-by: Tom Gillespie <tgbugs@gmail.com>
2023-10-02 17:39:34 +02:00
Miss Islington (bot)
95fd4edc63
[3.12] gh-109098: Fuzz re module instead of internal sre (GH-109911) (#109932)
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 a829356f86)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2023-10-02 17:39:07 +02:00