Commit graph

115824 commits

Author SHA1 Message Date
Miss Islington (bot)
4b97c724e0
[3.11] gh-109955 : Update state transition comments for asyncio.Task (GH-109910) (#109993)
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-09-29 15:25:34 +02:00
Victor Stinner
8ac6890d5e
[3.11] gh-110031: Skip test_threading fork tests if ASAN (#110100) (#110104)
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-09-29 15:19:37 +02:00
Victor Stinner
184ce1414b
[3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099)
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-09-29 14:16:15 +02:00
Adam Turner
d81bcc2327
[3.11] gh-102304: Add links to the Stable ABI and Limited C API docs (#105345) (#105371) (#109901)
* Add "limited-c-api" and "stable-api" targets
* Rename the "stable-abi-list" target to "limited-api-list"
2023-09-29 11:17:44 +02:00
Miss Islington (bot)
6024a75b10
[3.11] gh-101100: Fix references to `URLError and HTTPError in howto/urllib2.rst` (GH-107966) (#110087)
Co-authored-by: Yuki K <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-29 08:44:28 +00:00
Miss Islington (bot)
58ac0ed093
[3.11] gh-101100: Fix Sphinx warnings in tutorial/controlflow.rst (GH-109424) (#110085)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-29 08:36:24 +00:00
Hugo van Kemenade
6bc722df2e
[3.11] gh-101100: Fix sphinx warnings in library/difflib.rst (GH-110074) (#110082)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-29 11:19:34 +03:00
Serhiy Storchaka
c534637106
[3.11] gh-109634: Use :samp: role (GH-109635) (GH-109778)
(cherry picked from commit 92af0cc580)

Co-authored-by: Jacob Coffee <jacob@z7x.org>
2023-09-29 09:39:31 +03:00
Victor Stinner
615d7fc34a
[3.11] gh-110052: Fix faulthandler for freed tstate (#110069) (#110072)
gh-110052: Fix faulthandler for freed tstate (#110069)

faulthandler now detected freed interp and freed tstate, and no
longer dereference them.

Backport to 3.11: add pycore_pymem.h include to traceback.c.

(cherry picked from commit 2e37a38bcb)
2023-09-29 02:43:28 +00:00
Miss Islington (bot)
efe83ad276
[3.11] gh-110036: multiprocessing Popen.terminate() catches PermissionError (GH-110037) (#110065)
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-09-29 01:04:58 +00:00
Miss Islington (bot)
a99729599a
[3.11] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110061)
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-09-29 00:30:38 +00:00
Davide Rizzo
d6e8001467
[3.11] gh-110038: KqueueSelector must count all read/write events (GH-110039) (#110044)
[3.11] gh-110038: KqueueSelector must count all read/write events (GH-110039).
(cherry picked from commit b14f0ab51c)
2023-09-28 20:58:24 +02:00
Miss Islington (bot)
973d549e72
[3.11] gh-110033: Fix signal test_interprocess_signal() (GH-110035) (#110041)
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-09-28 17:48:58 +00:00
Miss Islington (bot)
ff3cadd2a1
[3.11] gh-109594: Fix concurrent.futures test_timeout() (GH-110018) (#110022)
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-09-28 13:49:56 +00:00
Miss Islington (bot)
82dea84dc4
[3.11] gh-109991: Update macOS installer to use OpenSSL 3.0.10. (GH-110010)
(cherry picked from commit 98c0c1de18)

Co-authored-by: Ned Deily <nad@python.org>
2023-09-28 06:34:24 +00:00
Ned Deily
1fd6a73bd8
[3.11] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (#110006)
(cherry picked from commit c88037d137)
2023-09-28 01:31:17 -04:00
Miss Islington (bot)
38526a29ed
[3.11] Enhance TypedDict docs around required/optional keys (GH-109547) (#109983)
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-09-27 10:54:27 -07:00
Miss Islington (bot)
448a7071b1
[3.11] gh-109615: Fix support test_copy_python_src_ignore() on WASM (GH-109970) (#109976)
gh-109615: Fix support test_copy_python_src_ignore() on WASM (GH-109970)

Not only check if src_dir exists, but look also for Lib/os.py
landmark.
(cherry picked from commit cc54bcf17b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-27 15:58:20 +00:00
Miss Islington (bot)
cb0f41f232
[3.11] gh-101100: Fix sphinx warnings in library/devmode.rst (GH-109963) (#109967)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-27 17:16:01 +03:00
Victor Stinner
8ac20e5404
[3.11] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#109962)
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)
2023-09-27 11:00:22 +00:00
Victor Stinner
2423168604
[3.11] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109951)
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-09-27 08:59:02 +00:00
Victor Stinner
d951aaea97
[3.11] gh-107298: Document PyMODINIT_FUNC macro (#109236) (#109948)
gh-107298: Document PyMODINIT_FUNC macro (#109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.

(cherry picked from commit d7a27e527d)
2023-09-27 10:40:24 +02:00
Miss Islington (bot)
0a69de7687
[3.11] Remove loop from docstring for asyncio.streams.open_connection (GH-108528) (#109942)
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-09-27 09:18:25 +03:00
Miss Islington (bot)
8ed9bda519
[3.11] gh-109098: Fuzz re module instead of internal sre (GH-109911) (GH-109933)
* 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-09-27 09:15:40 +03:00
Miss Islington (bot)
c485715ba8
[3.11] gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931) (#109938)
gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931)
(cherry picked from commit 3538930d87)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-27 02:35:26 +02:00
Miss Islington (bot)
88917ddf44
[3.11] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (#109930)
gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928)
(cherry picked from commit 9dbfe2dc8e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-26 22:51:34 +00:00
Miss Islington (bot)
4e66eca489
[3.11] gh-109845: Make test_ftplib more stable under load (GH-109912) (GH-109920)
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 2ef2fffe3b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-26 20:23:20 +00:00
Miss Islington (bot)
f764abb375
[3.11] gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629) (#109897)
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)

---------

(cherry picked from commit 0eb98837b6)

Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-09-26 12:21:52 +00:00
Miss Islington (bot)
bda6949e86
[3.11] gh-109832: concurrent.futures test_deadlock restores sys.stderr (GH-109887) (#109893)
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 2897142d2e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-26 11:08:27 +00:00
Miss Islington (bot)
8fef834f05
[3.11] gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780) (GH-109882)
Follow-up of gh-107219.

* Only close the connection writer on Windows.
* Also use existing constant _winapi.ERROR_OPERATION_ABORTED instead of
  WSA_OPERATION_ABORTED.
(cherry picked from commit 0b4e090422)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-26 11:21:09 +03:00
Miss Islington (bot)
97f7e9d5d6
[3.11] gh-109631: Allow interruption of short repeated regex matches (GH-109867) (GH-109885)
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 8ac2085b80)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-26 08:19:29 +00:00
Miss Islington (bot)
3ab0621db7
[3.11] gh-101100: Fix Sphinx warnings in Doc/library/weakref.rst (GH-109881) (#109883)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-26 10:58:59 +03:00
Miss Islington (bot)
95e616aee0
[3.11] gh-109401: Fix threading barrier test_default_timeout() (GH-109875) (#109877)
gh-109401: Fix threading barrier test_default_timeout() (GH-109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
(cherry picked from commit e5186c3de4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-26 00:34:00 +00:00
Miss Islington (bot)
358282e965
[3.11] gh-109748: Fix venv test_zippath_from_non_installed_posix() (GH-109872) (#109874)
gh-109748: Fix venv test_zippath_from_non_installed_posix() (GH-109872)

Fix test_zippath_from_non_installed_posix() of test_venv: don't copy
__pycache__/ sub-directories, because they can be modified by other
Python tests running in parallel.
(cherry picked from commit 25bb266fc8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-26 01:41:32 +02:00
Miss Islington (bot)
22a8efa740
[3.11] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (#109856)
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 bc06743533)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-25 16:29:56 +00:00
Victor Stinner
0afae8928b
[3.11] gh-109795: _thread.start_new_thread: allocate thread bootstate usin… (#109852)
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-09-25 18:12:43 +02:00
Miss Islington (bot)
9238c6880e
[3.11] gh-109833: Fix asyncio test_wait_for() (GH-109834) (#109838)
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 f29bc9c9a0)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-25 16:22:41 +02:00
elfstrom
97ea90194c
[3.11] gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock (GH-108513) (#109783)
This fixes issue GH-105829, https://github.com/python/cpython/issues/105829

(cherry picked from commit 405b06375a)
2023-09-24 20:28:03 +01:00
Miss Islington (bot)
e6a9cbd114
[3.11] gh-101100: Fix sphinx warnings in Doc/library/xml.etree.elementtree.rst (GH-109799) (#109801)
gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (GH-109799)
(cherry picked from commit 649768fb67)


gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-24 10:02:07 +00:00
Miss Islington (bot)
4ec7c7e845
[3.11] GH-95913: Add the release date for Python 3.11 (GH-109750) (#109772)
GH-95913: Add the release date for Python 3.11 (GH-109750)
(cherry picked from commit b10de68c6c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-22 21:19:22 -07:00
Hugo van Kemenade
cbe153edd6
[3.11] Docs: Update Donghee Na's name (GH-109743) (#109759)
* Update Donghee Na's name in Docs/

* Update Donghee Na's name in Misc/ACKS

* Update Donghee Na's name in Misc/NEWS.d/
2023-09-23 06:53:47 +03:00
Miss Islington (bot)
3db2ec26bc
[3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) (#109763)
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 b03a791497)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-22 22:09:46 +00:00
Nikita Sobolev
6bb18bb0b4
[3.11] gh-108303: Fix and move badsyntax_pep3120.py (GH-109513) (#109724)
* [3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 4dd47c63a9)

Backport to 3.11: update also test_imp.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-22 17:50:32 +02:00
Miss Islington (bot)
567c3e846e
[3.11] ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner (GH-109737) (#109742)
ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner  (GH-109737)
(cherry picked from commit 3e8fcb7df7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-22 15:05:04 +00:00
Victor Stinner
1629b1d6f9
[3.11] gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) (#109735)
gh-109709: Fix asyncio test_stdin_broken_pipe() (#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 cbbdf2c144)
2023-09-22 14:34:53 +00:00
Nikita Sobolev
f45ef5edab
[3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626) (#109718)
[3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626).
(cherry picked from commit 115c49ad5a)
2023-09-22 12:34:46 +02:00
Miss Islington (bot)
74978ae6c6
[3.11] gh-109702: Increase concurrent_futures deadlock timeout (GH-109703) (#109708)
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 1eb1b45183)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-22 02:02:57 +00:00
Miss Islington (bot)
43ff8fcce2
[3.11] gh-109375: Fix bug where pdb registers an alias without an associated command (GH-109376) (#109430)
gh-109375: Fix bug where pdb registers an alias without an associated command (GH-109376)
(cherry picked from commit 68a6f21f47)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
2023-09-22 03:45:11 +02:00
Victor Stinner
66a973a09e
[3.11] gh-108388: Convert test_concurrent_futures to package (#108401) (#109704)
* gh-108388: Convert test_concurrent_futures to package (#108401)

Convert test_concurrent_futures to a package of sub-tests.

(cherry picked from commit aa6f787faa)

Notes on backport to 3.11:

* AsCompletedTests: Revert test_future_times_out() => test_zero_timeout()
* Restore TODO comment
* ThreadPoolExecutorTest.test_hang_global_shutdown_lock():
  add @support.requires_resource('cpu').
2023-09-22 01:37:25 +00:00
Victor Stinner
3a6d8e615f
[3.11] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) (#109699)
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 26e06ad617)
2023-09-21 23:29:49 +00:00