Commit graph

118809 commits

Author SHA1 Message Date
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
Miss Islington (bot)
2ab41c8fbc
[3.12] gh-110167: Fix test_socket deadlock in doCleanups() (GH-110416) (#110423)
gh-110167: Fix test_socket deadlock in doCleanups() (GH-110416)

Fix a deadlock in test_socket when server fails with a timeout but
the client is still running in its thread. Don't hold a lock to call
cleanup functions in doCleanups(). One of the cleanup function waits
until the client completes, whereas the client could deadlock if it
called addCleanup() in such situation.

doCleanups() is called when the server completed, but the client can
still be running in its thread especially if the server failed with a
timeout. Don't put a lock on doCleanups() to prevent deadlock between
addCleanup() called in the client and doCleanups() waiting for
self.done.wait of ThreadableTest._setUp().
(cherry picked from commit 318f5df271)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-05 19:24:26 +00:00
Miss Islington (bot)
5b66fe8304
[3.12] gh-110383 TimeIt Docs Spelling Fix (GH-110407) (#110409)
gh-110383 TimeIt Docs Spelling Fix (GH-110407)

Make 0.2 second plural
(cherry picked from commit a973bf0f97)

Co-authored-by: Towster15 <105541074+Towster15@users.noreply.github.com>
2023-10-05 17:42:52 +00:00
Miss Islington (bot)
5635913125
[3.12] Fix env var typo in perf profiling docs (GH-110404) (#110414)
Fix env var typo in perf profiling docs (GH-110404)

Fix typo in docs
(cherry picked from commit a13620685f)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-10-05 20:40:19 +03:00
Miss Islington (bot)
4a87f92724
[3.12] gh-110391: socket NetworkConnectionAttributesTest always declare cli (GH-110401) (#110405)
gh-110391: socket NetworkConnectionAttributesTest always declare cli (GH-110401)

NetworkConnectionAttributesTest of test_socket now always declare the
'cli' attribute, so clientTearDown() cannot fail with AttributeError.
(cherry picked from commit e37d4557c3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-05 17:01:59 +00:00
Miss Islington (bot)
09ec8153c6
[3.12] gh-110259: Fix f-strings with multiline expressions and format specs (GH-110271) (#110396)
gh-110259: Fix f-strings with multiline expressions and format specs (GH-110271)
(cherry picked from commit cc389ef627)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-10-05 14:07:25 +00:00
Miss Islington (bot)
7bfcfcf656
[3.12] gh-110365: Fix error overwrite in termios.tcsetattr (GH-110366) (#110389)
(cherry picked from commit 2bbbab212f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-10-05 14:21:03 +02:00
Miss Islington (bot)
4da8c1b61e
[3.12] Remove duplicate word. (GH-110376) (GH-110377)
Remove duplicate word. (GH-110376)
(cherry picked from commit 313aa861ce)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2023-10-05 04:26:44 +00:00
Miss Islington (bot)
36a7d6becd
[3.12] Add back bltin-boolean-values ref tag (GH-110371) (#110372)
Add back bltin-boolean-values ref tag (GH-110371)

To avoid breaking downstream intersphinx via numpydoc
(cherry picked from commit f7860295b1)

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
2023-10-04 20:05:21 +00:00
Hugo van Kemenade
e658413e55
[3.12] Lint: Remove files that no longer fail to parse (GH-110356) (#110360)
Remove files that no longer fail to parse
2023-10-04 15:31:03 +01:00