Commit graph

118068 commits

Author SHA1 Message Date
Barney Gale
9ffef4d797
[3.12] GH-110488: Fix two small issues in pathlib.PurePath.with_name() (GH-110651) (#110678)
Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.

(cherry picked from commit b5f7777cb3)
2023-10-11 04:30:23 +00:00
Miss Islington (bot)
be381b5df5
[3.12] gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663) (#110674)
gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663)

Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
(cherry picked from commit 790ecf6302)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-11 05:06:58 +02:00
Miss Islington (bot)
18458a527f
[3.12] gh-110666: Fix multiprocessing test_terminate() elapsed (GH-110667) (#110668)
gh-110666: Fix multiprocessing test_terminate() elapsed (GH-110667)

multiprocessing test_terminate() and test_wait_socket_slow() no
longer test the CI performance: no longer check maximum elapsed time.

Add CLOCK_RES constant: tolerate a difference of 100 ms.
(cherry picked from commit 1556f426da)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-11 02:13:01 +00:00
Miss Islington (bot)
55448a5b14
[3.12] gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657) (#110664)
gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657)

Skip test_post_fork_child_no_deadlock() if Python is built with ASAN.

Add support.HAVE_ASAN_FORK_BUG.
(cherry picked from commit f901f56313)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-11 01:31:49 +00:00
Miss Islington (bot)
dcd47e506d
[3.12] gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650) (#110658)
gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650)

* cycle_handlers() now waits until at least one signal is received.
* num_received_signals can be equal to num_sent_signals.
(cherry picked from commit e07c37cd52)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-11 00:26:48 +00:00
Miss Islington (bot)
c2d542b42c
[3.12] gh-108303: Move all certificates to Lib/test/certdata/ (GH-109489) (#109682)
* gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489)
(cherry picked from commit e57ecf6bbc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Python 3.12 backport: update also `test_nntplib`.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: T. Wouters <thomas@python.org>
2023-10-10 22:38:18 +02:00
Miss Islington (bot)
5b168fdd6f
[3.12] gh-110631: Set three-space indents for reST in EditorConfig (GH-110635) (#110637)
gh-110631: Set three-space indents for reST in EditorConfig (GH-110635)

Set three-space indents in EditorConfig
(cherry picked from commit 66a9b10820)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-10 15:20:52 +00:00
Adam Turner
c9157feeec
[3.12] GH-109408: Move the C file whitespace check from patchcheck to pre-commit (GH-109890) (#110636)
(cherry picked from commit f5edb56328)
2023-10-10 15:00:00 +00:00
Miss Islington (bot)
948576574f
[3.12] GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891) (#110633)
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891)
(cherry picked from commit 08ec4a1dbf)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-10 14:06:35 +00:00
Miss Islington (bot)
33450a9628
[3.12] Don't doubly-parallelise sphinx-lint (GH-110617) (#110626)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-10 06:58:06 -06:00
Miss Islington (bot)
43641f5893
[3.12] gh-110388: Add tests for tty (GH-110394) (#110621)
cherry picked from commit 7f702b26db)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-10 14:55:23 +02:00
Miss Islington (bot)
555db6fd09
[3.12] gh-81002: Add tests for termios (GH-110386) (GH-110619)
(cherry picked from commit 92a9e98024)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-10 14:10:55 +02:00
Miss Islington (bot)
80e4abe0ce
[3.12] gh-101100: Fix sphinx warnings in library/socketserver.rst (GH-110207) (GH-110623)
(cherry picked from commit 756062b296)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-10 14:10:22 +02:00
Miss Islington (bot)
26a3563cae
[3.12] gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async (GH-110500) (#110610)
It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
(cherry picked from commit 5aa62a8de1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-10 13:12:30 +02:00
Miss Islington (bot)
c1e8e90915
[3.12] gh-110590: Fix a bug where _sre.compile would overwrite exceptions (GH-110591) (#110613)
TypeError would be overwritten by OverflowError
if 'code' param contained non-ints.
(cherry picked from commit 344d3a222a)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-10 10:55:21 +00:00
Miss Islington (bot)
55d607683f
[3.12] gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic (GH-110603) (#110609)
gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic (GH-110603)
(cherry picked from commit fc811c8d20)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-10 12:35:21 +02:00
Miss Islington (bot)
190660abe9
[3.12] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110580)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
(cherry picked from commit 3b1580af07)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2023-10-10 09:26:36 +00:00
Miss Islington (bot)
2fc80814bf
[3.12] gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH-110499) (#110588)
contextmanager and asynccontextmanager context managers now close an invalid
underlying generator object that yields more then one value.
(cherry picked from commit 96fed66a65)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-10 11:12:28 +02:00
Alex Waygood
36886726a2
[3.12] gh-110558: Run ruff on Argument Clinic in CI (#110559) (#110598) 2023-10-10 08:58:56 +00:00
Miss Islington (bot)
0ffbde4e05
[3.12] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) (#110594)
gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854)
(cherry picked from commit 7426ed0347)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-10 08:39:55 +00:00
Miss Islington (bot)
e73210c023
[3.12] Add some 'meta hooks' to our pre-commit config (GH-110587) (#110599)
Add some 'meta hooks' to our pre-commit config (GH-110587)
(cherry picked from commit d5ec77fafd)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-10 08:24:10 +00:00
Miss Islington (bot)
c8bffd1667
[3.12] Remove unused SPHINXLINT var from Doc/Makefile. (GH-110570) (#110585)
Remove unused `SPHINXLINT` var from `Doc/Makefile`. (GH-110570)

Remove unused `SPHINXLINT` var.
(cherry picked from commit bdbe43c7d0)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-10-10 03:14:00 +02:00
Miss Islington (bot)
1f43bc2f3b
[3.12] gh-110519: Improve deprecation warning in the gettext module (GH-110520) (GH-110563)
Deprecation warning about non-integer numbers in gettext now always refers
to the line in the user code where gettext function or method is used.
Previously, it could refer to a line in gettext code.

Also, increase test coverage for NullTranslations and domain-aware functions
like dngettext().
(cherry picked from commit 326c6c4e07)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-09 16:27:01 +02:00
Miss Islington (bot)
53122bcf82
[3.12] gh-109191: Fix build with newer editline (gh-110239) (gh-110562)
gh-109191: Fix build with newer editline (gh-110239)
(cherry picked from commit f4cb0d27cc)

Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-10-09 23:01:00 +09:00
Serhiy Storchaka
5afac0cf8d
[3.12] gh-110549: Remove unused includes of <stddef.h> in _testcapi (GH-110552) (GH-110553)
(cherry picked from commit 89df5b73d0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-09 11:43:35 +00:00
Miss Islington (bot)
13ad1219c9
[3.12] gh-110437: Allow overriding VCRuntimeDLL with a semicolon separated list of DLLs to bundle (GH-110470)
gh-110437: Allow overriding VCRuntimeDLL with a semicolon separated list of DLLs to bundle (GH-110470)
(cherry picked from commit 12cc6792d0)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-10-09 11:42:04 +00:00
Miss Islington (bot)
b2419eff95
[3.12] gh-110525: Cover PySet_Add corner case with frozenset objects (GH-110544) (GH-110554)
(cherry picked from commit ea39c877c0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-09 11:40:53 +00:00
Miss Islington (bot)
23624462cb
[3.12] gh-109286: Update macOS installer to use SQLite 3.43.1 (GH-110482) (#110550)
(cherry picked from commit 48419a50b4)

Co-authored-by: jtranquilli <76231120+jtranquilli@users.noreply.github.com>
2023-10-09 10:43:26 +00:00
Nikita Sobolev
3ed5cb0de3
[3.12] gh-110525: Add CAPI tests for set and frozenset objects (GH-110526). (GH-110547)
(cherry picked from commit c49edd7d9c)
2023-10-09 10:04:09 +00:00
Miss Islington (bot)
a7fe709fef
[3.12] gh-110497: Add note about OSError being an alias to IOError in docs (GH-110498) (#110546)
gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH-110498)
(cherry picked from commit 5e7edac771)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-09 11:42:17 +02:00
Serhiy Storchaka
22474a1d62
[3.12] gh-109151: Revert readline support in the sqlite3 CLI (#110542)
Revert "[3.12] gh-109151: Enable readline in the sqlite3 CLI (GH-109152) (#110352)"

This reverts commit bc1fe3549b.
2023-10-09 09:13:16 +00:00
Miss Islington (bot)
d1528233b8
[3.12] gh-109286: Update Windows installer to use SQLite 3.43.1 (GH-110403) (#110478)
gh-109286: Update Windows installer to use SQLite 3.43.1 (GH-110403)
(cherry picked from commit 201dc11aeb)

Co-authored-by: jtranquilli <76231120+jtranquilli@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-09 11:12:15 +02:00
Miss Islington (bot)
dae3db1883
[3.12] gh-110514: Add PY_THROW to sys.setprofile events (GH-110524) (#110541)
gh-110514: Add PY_THROW to `sys.setprofile` events (GH-110524)
(cherry picked from commit dd4bb0529e)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-10-09 09:11:51 +00:00
Miss Islington (bot)
fb8c0415a2
[3.12] gh-110534 fix a URL redirect to wikipedia article on Fibonacci numbers (GH-110535) (#110536)
gh-110534 fix a URL redirect to wikipedia article on Fibonacci numbers (GH-110535)
(cherry picked from commit 892ee72b36)

Co-authored-by: partev <petrosyan@gmail.com>
2023-10-09 04:52:36 +00:00
Miss Islington (bot)
ef4bd1b57f
[3.12] gh-110237: Check PyList_Append for errors in _PyEval_MatchClass (GH-110238) (#110511)
gh-110237: Check `PyList_Append` for errors in `_PyEval_MatchClass` (GH-110238)
(cherry picked from commit dd9d781da3)

Co-authored-by: denballakh <47365157+denballakh@users.noreply.github.com>
2023-10-08 00:40:38 +00:00
Miss Islington (bot)
96e42d2f8d
[3.12] Update floatingpoint.rst (GH-110509) (#110513)
Update floatingpoint.rst (GH-110509)

This commit removes a ':'. I believe the extra colon causes a display error.

What I believe to be an error:
Above this expression
`round(math.pi, ndigits=2) == round(22 / 7, ndigits=2)`
the page displays `.. doctest::`.

What I observed:
After I remove the extra colon, the page does not display `.. doctest::`
(cherry picked from commit 8e56d551ce)

Co-authored-by: zipperer <47086307+zipperer@users.noreply.github.com>
2023-10-08 00:18:39 +00:00
Miss Islington (bot)
481aa7a40f
[3.12] gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) (GH-110504)
(cherry picked from commit b987fdb19b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-07 13:39:19 +00:00
Miss Islington (bot)
6430ca53db
[3.12] gh-109864: Make test_gettext tests order independent (GH-109866) (GH-110502)
(cherry picked from commit 1aad4fc5db)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-07 13:28:59 +00:00
Miss Islington (bot)
2465fe0014
[3.12] GH-110455: Guard assert(tstate->thread_id > 0) with GH-ifndef HAVE_PTHREAD_STUBS (GH-110487) (GH-110491)
GH-110455: Guard `assert(tstate->thread_id > 0)` with `GH-ifndef HAVE_PTHREAD_STUBS` (GH-110487)
(cherry picked from commit 5fd8821cf8)

Co-authored-by: Brett Cannon <brett@python.org>
2023-10-06 23:48:48 +00:00
Miss Islington (bot)
b77f5eea70
[3.12] Fix typo in Doc/library/textwrap.rst (GH-110328) (#110473)
Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2023-10-06 14:33:16 +00:00
Miss Islington (bot)
7e07eca008
[3.12] gh-110184: Fix subprocess test_pipesize_default() (GH-110465) (#110471)
gh-110184: Fix subprocess test_pipesize_default() (GH-110465)

For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
(cherry picked from commit d023d4166b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-06 14:09:29 +00:00
Miss Islington (bot)
eed92e4f7e
[3.12] gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) (#110456)
gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451)

Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead
of "make clean" in the copied source directory to remove also the
"python" program.

Other test_freeze changes:

* Log executed commands and directories, and the current directory.
* No longer uses make -C option to change the directory, instead use
  subprocess cwd parameter.
(cherry picked from commit a4baa9e8ac)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-06 01:31:30 +00:00
Victor Stinner
e188534607
[3.12] Add support.MS_WINDOWS constant (#110446) (#110452)
Add support.MS_WINDOWS constant (#110446)

(cherry picked from commit e0c4437793)
2023-10-06 01:26:14 +00:00
Miss Islington (bot)
67028f0c15
[3.12] gh-103053: Fix make check-clean-src: check "python" program (GH-110449) (#110453)
gh-103053: Fix make check-clean-src: check "python" program (GH-110449)

"make check-clean-src" now also checks if the "python" program is
found in the source directory: fail with an error if it does exist.
(cherry picked from commit a155f9f342)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-06 01:23:15 +00:00
Miss Islington (bot)
6af359b088
[3.12] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421) (#110442)
gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c048)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-05 22:20:55 +00:00
Miss Islington (bot)
1b58985077
[3.12] gh-110393: Remove watchdog with hardcoded timeout (GH-110400) (#110445)
gh-110393: Remove watchdog with hardcoded timeout (GH-110400)

test_builtin and test_socketserver no longer use signal.alarm() to
implement a watchdog with a hardcoded timeout (2 and 60 seconds).
Python test runner regrtest has two watchdogs: faulthandler and
timeout on running worker processes. Tests using short hardcoded
timeout can fail on slowest buildbots just because the timeout is too
short.
(cherry picked from commit 1328fa31fe)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-05 22:17:20 +00:00
Miss Islington (bot)
5a4e821b43
[3.12] gh-110429: Fix race condition in "make regen-all" (GH-110433) (#110438)
gh-110429: Fix race condition in "make regen-all" (GH-110433)

"make regen-pegen" now creates a temporary file called "parser.c.new"
instead of "parser.new.c". Previously, if "make clinic" was run in
parallel with "make regen-all", clinic may try but fail to open
"parser.new.c" if the temporay file was removed in the meanwhile.
(cherry picked from commit fb6c4ed2bb)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-05 20:54:47 +00:00
Victor Stinner
350d89b795
[3.12] gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (#110413) (#110427)
gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (#110413)

Increase support.LOOPBACK_TIMEOUT from 5 to 10 seconds. Also increase
the timeout depending on the --timeout option. For example, for a
test timeout of 40 minutes (ARM Raspbian 3.x), use LOOPBACK_TIMEOUT
of 20 seconds instead of 5 seconds before.

(cherry picked from commit 0db2f1475e)
2023-10-05 20:37:20 +00:00
Miss Islington (bot)
93279cc8b8
[3.12] gh-110383: Swap 'the all' -> 'all the' in socket docs (GH-110434) (#110435)
Co-authored-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
2023-10-05 14:14:22 -06:00
Miss Islington (bot)
11137d3822
[3.12] gh-109840: Fix multiprocessing test_waitfor_timeout() (GH-110428) (#110430)
gh-109840: Fix multiprocessing test_waitfor_timeout() (GH-110428)

Don't measure the CI performance: don't fail if cond.wait_for() takes
longer than 1 second on a slow CI.
(cherry picked from commit 5eae8dc2cb)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-05 20:03:53 +00:00