Commit graph

115926 commits

Author SHA1 Message Date
Miss Islington (bot)
ae495de4e6
[3.11] gh-110695: test_asyncio uses 50 ms for clock resolution (GH-110952) (#110971)
gh-110695: test_asyncio uses 50 ms for clock resolution (GH-110952)

Before utils.CLOCK_RES constant was added (20 ms), test_asyncio
already used 50 ms.
(cherry picked from commit 9a9fba825f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-17 09:59:10 +00:00
Miss Islington (bot)
57ae64f766
[3.11] Bump sphinx-lint to v0.8.1 (GH-110933) (#110958)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-16 23:29:46 -06:00
Alex Waygood
5f7aba938c
[3.11] Enable ruff on several more files in Lib/test (#110929) (#110935)
(cherry-picked from commit 02d26c4bef)
2023-10-16 23:17:59 +03:00
Miss Islington (bot)
e8eb2bf788
[3.11] C-API docs: Clarify the size of arenas (GH-110895) (#110947)
C-API docs: Clarify the size of arenas (GH-110895)

Clarify the size of arenas

From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1
MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms.
(cherry picked from commit f07ca27709)

Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
2023-10-16 19:06:34 +00:00
Miss Islington (bot)
6502a130e4
[3.11] regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363) (#110924)
regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363)

This allows individual resources to be disabled without having to explicitly re-enable all others.
(cherry picked from commit b75186f69e)

Co-authored-by: Zachary Ware <zach@python.org>
2023-10-16 14:55:52 +00:00
Miss Islington (bot)
616862d58e
[3.11] gh-110527: Improve PySet_Clear docs (GH-110528) (#110927)
gh-110527: Improve `PySet_Clear` docs (GH-110528)
(cherry picked from commit bfc1cd8145)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-16 13:15:07 +00:00
Miss Islington (bot)
e60abeea30
[3.11] gh-110886 Doc: add a link to BNF Wikipedia article (GH-110887) (#110901)
Co-authored-by: partev <petrosyan@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-15 17:00:57 +00:00
Thomas Grainger
fd1b314cd3
[3.11] remove redundant call to attach_loop in watcher (GH-110847) (#110870)
(cherry picked from commit 596589104f)
2023-10-15 14:51:13 +00:00
Serhiy Storchaka
5c55f50a71
[3.11] [3.12] bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825) (GH-110882) (GH-110889)
zipinfo now supports the full range of values in the TZ string
determined by RFC 8536 and detects all invalid formats.
Both Python and C implementations now raise exceptions of the same
type on invalid data.
(cherry picked from commit ab08ff7882)
(cherry picked from commit 72b0f0eaf5)
2023-10-15 08:32:26 +00:00
Miss Islington (bot)
44558a9ba8
[3.11] gh-101100: Fix sphinx warnings in library/time.rst (GH-110862) (#110878)
gh-101100: Fix sphinx warnings in `library/time.rst` (GH-110862)
(cherry picked from commit 12deda7633)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-14 14:28:23 +00:00
Miss Islington (bot)
1c26f1ce6c
[3.11] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859) (GH-110860)
Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.

The limit is increased to 2**32-1 (was 2**31-1).
(cherry picked from commit e2b3d831fd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-14 06:51:24 +00:00
Miss Islington (bot)
035f9e0cc5
[3.11] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) (GH-110858)
(cherry picked from commit ca0f3d858d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-14 06:40:18 +00:00
Miss Islington (bot)
2d615e1c26
[3.11] gh-101100: Fix sphinx warnings in usage/cmdline.rst (GH-110841) (#110856)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-14 00:28:52 -06:00
Miss Islington (bot)
d0ef4f83e8
[3.11] Bump sphinx-lint to 0.7.0 (GH-110830) (#110834)
Bump sphinx-lint to 0.7.0 (GH-110830)
(cherry picked from commit 0ed2329a16)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-13 13:59:25 +00:00
Miss Islington (bot)
c0a77eb442
[3.11] gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818) (#110827)
gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)

* Remove redundant versionchanged

* Add missing versionchanged

* Update Doc/library/asyncio-task.rst



---------

(cherry picked from commit f81e36f700)

Co-authored-by: paskozdilar <53006174+paskozdilar@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-10-13 13:24:29 +00:00
Miss Islington (bot)
b2a95f694a
[3.11] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) (#110809)
(cherry picked from commit 05439d3087)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-13 10:32:42 +02:00
Victor Stinner
26748ed4f6
gh-110756: Sync regrtest with main branch (#110758) (#110781)
Copy files from main to this branch:

* Lib/test/libregrtest/*.py
* Lib/test/__init__.py
* Lib/test/__main__.py
* Lib/test/autotest.py
* Lib/test/pythoninfo.py
* Lib/test/regrtest.py
* Lib/test/test_regrtest.py

Copy also changes from:

* Lib/test/support/__init__.py
* Lib/test/support/os_helper.py
* Lib/test/support/testresult.py
* Lib/test/support/threading_helper.py
* Lib/test/test_support.py

Do not modify scripts running tests such as Makefile.pre.in,
.github/workflows/build.yml or Tools/scripts/run_tests.py: do not use
--fast-ci and --slow-ci in this change.

Changes:

* SPLITTESTDIRS: don't include test_inspect.
* Add utils.process_cpu_count() using len(os.sched_getaffinity(0)).
* test_regrtest doesn't use @support.without_optimizer which doesn't
  exist in Python 3.11.
* Add support.set_sanitizer_env_var().
* Update test_faulthandler to use support.set_sanitizer_env_var().
* @support.without_optimizer doesn't exist in 3.11.
* Add support.Py_DEBUG.
* regrtest.refleak: 3.11 doesn't have sys.getunicodeinternedsize.
2023-10-12 21:45:36 +00:00
Nikita Sobolev
e16922f070
[3.11] gh-109216: Fix possible memory leak in BUILD_MAP (#109323)
* [3.11] gh-109216: Fix possible memory leak in `BUILD_MAP`

* Add NEWS

* Update Python/ceval.c

Co-authored-by: Kumar Aditya <kumaraditya@python.org>

---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-10-12 12:52:03 +00:00
Miss Islington (bot)
c9214b90f4
[3.11] gh-107450: Raise OverflowError when parser column offset overflows (GH-110754) (#110763)
(cherry picked from commit fb7843ee89)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-10-12 09:57:36 +00:00
Erlend E. Aasland
5178fb0b89
[3.11] GH-107518: Remove the Argument Clinic How-To (#109900) (#110761)
(cherry picked from commit d1f7fae424)

* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-12 09:52:59 +00:00
Miss Islington (bot)
f98903542c
[3.11] gh-110673: test_pty raises on short write (GH-110677) (#110743)
gh-110673: test_pty raises on short write (GH-110677)

Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
(cherry picked from commit b4e8049766)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-12 10:09:49 +02:00
Ezio Melotti
eb492d32b6
[3.11] gh-110631: Fix reST indentation in Doc/reference (GH-110708) (#110741)
Fix wrong indentation in the Doc/reference dir..
(cherry picked from commit 41d8ec5a1b)
2023-10-12 02:01:48 +02:00
Ezio Melotti
90b2620b6e
[3.11] gh-110631: Fix reST indentation (GH-110724) (#110739)
* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475)
2023-10-11 23:12:53 +02:00
Ezio Melotti
07471cda29
[3.11] gh-110631: Fix reST indentation in Doc/library (GH-110685) (#110737)
* [3.11] gh-110631: Fix reST indentation in `Doc/library` (GH-110685)

Fix wrong indentation in the Doc/library dir..
(cherry picked from commit bb7923f556)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

* Fix merge glitch.
2023-10-11 23:11:41 +02:00
Hugo van Kemenade
fd061a9bbe
[3.11] gh-108826: Document dis module CLI and rename _test function to main (#108827) (#110689)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2023-10-11 14:48:03 -06:00
Miss Islington (bot)
ad50415637
[3.11] gh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-110710)
(cherry picked from commit 13e460086b)

Co-authored-by: Ned Deily <nad@python.org>
2023-10-11 21:42:24 +02:00
Miss Islington (bot)
79b81d1825
[3.11] gh-76106: Remove the cleanup lock in test_socket (GH-110539) (GH-110700)
It does not already work (because it locks only addCleanup(), not doCleanups()),
and it is no longer needed since the clean up procedure waits for all test threads to join.
(cherry picked from commit f27b830907)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-11 11:13:06 +00:00
Ezio Melotti
a8b2d12a25
[3.11] gh-110631: fix wrong indentation in the Doc/whatsnew dir (GH-110632) (#110691)
fix wrong indentation in the `Doc/whatsnew` dir (#110632)
2023-10-11 03:53:26 -06:00
Miss Islington (bot)
c6d5628be9
[3.11] gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663) (#110675)
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:07:03 +02:00
Miss Islington (bot)
8ca7a230e7
[3.11] gh-110666: Fix multiprocessing test_terminate() elapsed (GH-110667) (#110669)
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:09:53 +00:00
Miss Islington (bot)
7984dc28b3
[3.11] gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657) (#110665)
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:22:51 +00:00
Miss Islington (bot)
46347d3caf
[3.11] gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650) (#110659)
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:21:51 +00:00
Erlend E. Aasland
a009bb872c
[3.11] gh-109286: Update Windows installer to use SQLite 3.43.1 (#110403) (#110479) 2023-10-11 00:41:12 +02:00
Miss Islington (bot)
28c6cc1928
[3.11] [3.12] gh-108303: Move all certificates to Lib/test/certdata/ (GH-109489) (GH-109682) (#110646)
[3.12] gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489) (GH-109682)

* gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489)
(cherry picked from commit e57ecf6bbc)

Python 3.12 backport: update also `test_nntplib`.

(cherry picked from commit c2d542b42c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: T. Wouters <thomas@python.org>
2023-10-10 21:02:21 +00:00
Miss Islington (bot)
4b67878daa
[3.11] gh-110631: Set three-space indents for reST in EditorConfig (GH-110635) (#110638)
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:03:11 +00:00
Serhiy Storchaka
3788c48d12
[3.11] gh-110388: Add tests for tty (GH-110394) (GH-110634)
(cherry picked from commit 7f702b2)
2023-10-10 16:27:22 +02:00
Miss Islington (bot)
f72b18d146
[3.11] Don't doubly-parallelise sphinx-lint (GH-110617) (#110627)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-10 07:00:24 -06:00
Miss Islington (bot)
e511f544ea
[3.11] gh-81002: Add tests for termios (GH-110386) (GH-110620)
(cherry picked from commit 92a9e98024)

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

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-10 14:10:33 +02:00
Miss Islington (bot)
bf1753bb4c
[3.11] gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async (GH-110500) (#110611)
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:40 +02:00
Miss Islington (bot)
7fefed091a
[3.11] gh-110590: Fix a bug where _sre.compile would overwrite exceptions (GH-110591) (#110614)
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:48:07 +00:00
Miss Islington (bot)
194272179d
[3.11] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110581)
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 10:06:18 +00:00
Miss Islington (bot)
2b3a418279
[3.11] gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH-110499) (#110589)
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>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-10-10 11:12:52 +02:00
Miss Islington (bot)
d099defc63
[3.11] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) (#110595)
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:36:28 +00:00
Miss Islington (bot)
2943bae7f1
[3.11] Add some 'meta hooks' to our pre-commit config (GH-110587) (#110600)
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:17 +00:00
Miss Islington (bot)
5ada51cd51
[3.11] Remove unused SPHINXLINT var from Doc/Makefile. (GH-110570) (#110584)
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:13:34 +02:00
Bo Anderson
9e9df93ffc
[3.11] gh-109191: Fix build with newer editline (gh-110239) (#110575)
(cherry picked from commit f4cb0d27cc)
2023-10-09 19:42:25 +00:00
Miss Islington (bot)
e913c6f4d6
[3.11] gh-110519: Improve deprecation warning in the gettext module (GH-110520) (GH-110564)
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:10:34 +02:00
Miss Islington (bot)
26c3e700b1
[3.11] 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:57 +00:00
Miss Islington (bot)
b473d48505
[3.11] gh-109286: Update macOS installer to use SQLite 3.43.1 (GH-110482) (#110551)
(cherry picked from commit 48419a50b4)

Co-authored-by: jtranquilli <76231120+jtranquilli@users.noreply.github.com>
2023-10-09 12:31:27 +02:00