Commit Graph

115836 Commits

Author SHA1 Message Date
Victor Stinner 86084d001f
[3.11] gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (… (#110183)
gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (#110170)

(cherry picked from commit 06faa9a39b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-01 22:43:57 +02:00
Miss Islington (bot) 0914b13ba5
[3.11] gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142) (#110189)
gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142)
(cherry picked from commit adf0f15a06)

Co-authored-by: Quentin Agren <quentin.agren@gmail.com>
2023-10-01 20:32:44 +01:00
Miss Islington (bot) 00da3ccd0a
[3.11] gh-101100: Fix sphinx warnings in `library/site.rst` (GH-110144) (#110185)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-01 11:47:06 -06:00
Miss Islington (bot) 446c81c3c3
[3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159)
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-09-30 21:01:33 +00:00
Miss Islington (bot) 080f5b98d1
[3.11] gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-110149) (#110153)
gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-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: Victor Stinner <vstinner@python.org>
2023-09-30 18:46:37 +00:00
Miss Islington (bot) cb1f49991e
[3.11] GH-101100: Fix reference warnings for ``gettext`` (GH-110115) (#110141)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-30 11:21:27 +00:00
Miss Islington (bot) a673248d6c
[3.11] GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113) (#110136)
GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113)
(cherry picked from commit cbdacc738a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-30 06:42:37 +00:00
Miss Islington (bot) 42b6883d5f
[3.11] gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125) (#110130)
gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125)
(cherry picked from commit 14098b78f7)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-29 22:19:33 +00:00
Victor Stinner 190e8fbfb7
[3.11] gh-108851: Fix support.get_recursion_available() for USE_STACKCHECK (#110127)
Add _testcapi.USE_STACKCHECK.

USE_STACKCHECK on using on Windows 32-bit.
2023-09-29 23:54:46 +02:00
Miss Islington (bot) a95e8cf908
gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108)
(cherry picked from commit 20bc5f7c28)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-09-29 15:48:59 +00:00
Zachary Ware d87217ff44
[3.11] gh-109991: Update Windows build to use OpenSSL 3.0.11 (GH-110059)
(cherry picked from commit cf4c297256)
2023-09-29 10:03:48 -05:00
Miss Islington (bot) b07661d889
[3.11] gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102) (#110107)
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-09-29 13:47:24 +00:00
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