Commit graph

118809 commits

Author SHA1 Message Date
Miss Islington (bot)
99b7e1c1d7
[3.12] Bump sphinx-lint to v0.8.1 (GH-110933) (#110957)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-16 23:29:43 -06:00
Miss Islington (bot)
94525a7a4d
[3.12] C-API docs: Clarify the size of arenas (GH-110895) (#110946)
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:03:18 +00:00
Lysandros Nikolaou
3b87e520fc
[3.12] gh-107450: Check for overflow in the tokenizer and fix overflow test (GH-110832) (#110931)
(cherry picked from commit a1ac5590e0)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-16 18:59:18 +02:00
Alex Waygood
b8e5b1b28a
[3.12] Enable ruff on several more files in Lib/test (#110929) (#110934)
(cherry-picked from commit 02d26c4bef)
2023-10-16 15:48:02 +00:00
Miss Islington (bot)
89f9c226a1
[3.12] regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363) (#110925)
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 13:35:01 +00:00
Miss Islington (bot)
b4ed73042e
[3.12] gh-110527: Improve PySet_Clear docs (GH-110528) (#110928)
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:14:52 +00:00
Miss Islington (bot)
7de3c8b7b6
[3.12] Lint: Include test_monitoring.py for Ruff (GH-110898) (#110899)
Lint: Include test_monitoring.py for Ruff (GH-110898)
(cherry picked from commit 9608704cde)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-15 18:34:37 +01:00
Hugo van Kemenade
9c39149b4b
[3.12] gh-106193: Rename and fix duplicated tests in test_monitoring (GH-109139) (#110897) 2023-10-15 17:32:08 +00:00
Miss Islington (bot)
97f4b667e7
[3.12] gh-110886 Doc: add a link to BNF Wikipedia article (GH-110887) (#110900)
Co-authored-by: partev <petrosyan@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-15 17:00:44 +00:00
Serhiy Storchaka
72b0f0eaf5
[3.12] bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825) (GH-110882)
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)
2023-10-15 10:59:19 +03:00
Nikita Sobolev
b6755d81d4
[3.12] gh-109216: Fix possible memory leak in BUILD_MAP (#109324) 2023-10-15 07:08:40 +05:30
Miss Islington (bot)
744f752f04
[3.12] gh-101100: Fix sphinx warnings in library/time.rst (GH-110862) (#110877)
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:58 +00:00
Miss Islington (bot)
0c56c05022
[3.12] remove redundant call to attach_loop in watcher (GH-110847) (#110867)
(cherry picked from commit 596589104f)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2023-10-14 12:27:08 +02:00
Miss Islington (bot)
9786959a11
[3.12] gh-110715: Add missing import in zipfile (gh-110822) (gh-110861)
gh-110715: Add missing import in zipfile (gh-110822)
(cherry picked from commit 4110cfec12)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2023-10-14 07:58:31 +00:00
Serhiy Storchaka
7c3e8e5af0
[3.12] gh-110628: Add tests for PyLong C API (GH-110629) (GH-110854)
(cherry picked from commit 9d40ebf190)
2023-10-14 10:20:24 +03:00
Miss Islington (bot)
9a62322174
[3.12] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) (GH-110857)
(cherry picked from commit ca0f3d858d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-14 06:43:59 +00:00
Miss Islington (bot)
a2cc9a4c3a
[3.12] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859) (GH-110859)
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:42:19 +00:00
Miss Islington (bot)
12b9cb80be
[3.12] gh-101100: Fix sphinx warnings in usage/cmdline.rst (GH-110841) (#110855)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-14 00:28:34 -06:00
Miss Islington (bot)
0164832db5
[3.12] gh-110392: Fix tty functions (GH-110642) (GH-110853)
* tty.setraw() and tty.setcbreak() previously returned partially modified
  list of the original tty attributes. Now they return the correct list of
  the original tty attributes

* tty.cfmakeraw() and tty.cfmakecbreak() now make a copy of the list of
  special characters before modifying it.

(cherry picked from commit 84e2096fbd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-14 06:18:14 +00:00
Nikita Sobolev
0102faf0ca
[3.12] gh-108303: Move all inspect test files to test_inspect/ (GH-109607) (#110732)
(cherry picked from commit 732532b0af)
2023-10-13 19:05:03 +02:00
Miss Islington (bot)
49da117665
[3.12] Bump sphinx-lint to 0.7.0 (GH-110830) (#110833)
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:12 +00:00
Miss Islington (bot)
1c44f881c7
[3.12] gh-110815: Improve tests for PyArg_ParseTupleAndKeywords() (GH-110817) (GH-110825)
(cherry picked from commit 548ce0923b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-13 13:41:43 +00:00
Miss Islington (bot)
1a7afa7ef4
[3.12] gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818) (#110826)
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:28 +00:00
Miss Islington (bot)
f2e353b9d8
[3.12] gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813) (#110823)
gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813)

* gh-110803: Reorganize docs for what PyType_Slot doesn't cover

- Cover the offset fields first
- Mention the old alternative for MANAGED flags, which is needed
  to support older Pythons
- De-emphasize the internal flags: use an inline list.
- Add a note to PyMemberDef saying what to do with it

* Remove an older draft...
(cherry picked from commit 2ab34f0e42)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-10-13 12:59:55 +00:00
Miss Islington (bot)
08242cdd7b
[3.12] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) (#110808)
(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:31:39 +02:00
Miss Islington (bot)
27d5ea291c
[3.12] gh-110782: Fix crash when TypeVar is constructed with keyword args (GH-110784) (#110787)
gh-110782: Fix crash when TypeVar is constructed with keyword args (GH-110784)
(cherry picked from commit d2a536b170)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-12 23:24:37 +00:00
Victor Stinner
80f958529b
[3.12] gh-110756: Sync regrtest with main branch (#110779)
gh-110756: Sync regrtest with main branch

* Remove runtest.py and runtest_mp.py of Lib/test/libregrtest/.
* Backport support._parse_memlimit().
2023-10-12 21:24:12 +00:00
Victor Stinner
4b7a12db54
[3.12] gh-110756: Sync regrtest with main branch (#110758)
gh-110756: Sync regrtest with main branch

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

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.12.
* Add support.set_sanitizer_env_var().
* Update test_faulthandler to use support.set_sanitizer_env_var().
2023-10-12 22:03:07 +02:00
Pablo Galindo Salgado
4d0e6c895e
[3.12] gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (GH-110706) (#110765)
(cherry picked from commit 3d180347ae)
2023-10-12 10:51:56 +00:00
Miss Islington (bot)
ea3ac56a05
[3.12] gh-107450: Raise OverflowError when parser column offset overflows (GH-110754) (#110762)
(cherry picked from commit fb7843ee89)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-10-12 10:03:09 +00:00
Erlend E. Aasland
e8d04190c6
[3.12] GH-107518: Remove the Argument Clinic How-To (#109900) (#110760)
(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:37:37 +00:00
Miss Islington (bot)
ea344e7a05
[3.12] gh-110673: test_pty raises on short write (GH-110677) (#110742)
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:10:00 +02:00
Miss Islington (bot)
dbbe0eebf0
[3.12] gh-110631: Fix reST indentation in Doc/reference (GH-110708) (#110740)
gh-110631: Fix reST indentation in `Doc/reference` (GH-110708)

Fix wrong indentation in the Doc/reference dir.
(cherry picked from commit 41d8ec5a1b)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-10-11 23:13:21 +02:00
Ezio Melotti
7d5a982609
[3.12] gh-110631: Fix reST indentation (GH-110724) (#110738)
* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475)
2023-10-11 23:12:36 +02:00
Miss Islington (bot)
cae968ba17
[3.12] gh-110631: Fix reST indentation in Doc/library (GH-110685) (#110736)
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>
2023-10-11 23:11:28 +02:00
Hugo van Kemenade
e6c53dd085
[3.12] gh-108826: Document dis module CLI and rename _test function to main (#108827) (#110681)
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:47:38 -06:00
Miss Islington (bot)
989aa447d7
[3.12] gh-65052: Prevent pdb from crashing when trying to display objects (GH-110578) (#110734)
gh-65052: Prevent pdb from crashing when trying to display objects (GH-110578)
(cherry picked from commit c523ce0f43)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-10-11 18:59:11 +00:00
Miss Islington (bot)
c06ac1b4cc
[3.12] gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726) (#110730)
gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726)
(cherry picked from commit de956b263b)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-11 16:37:41 +00:00
Miss Islington (bot)
bfb1f00926
[3.12] gh-76106: Remove the cleanup lock in test_socket (GH-110539) (GH-110699)
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:15:44 +00:00
Ezio Melotti
1ea4cb1a66
[3.12] gh-110631: fix wrong indentation in the Doc/whatsnew dir (GH-110632) (#110690)
fix wrong indentation in the `Doc/whatsnew` dir (#110632)
2023-10-11 03:53:17 -06:00
Miss Islington (bot)
ca971d12ed
[3.12] gh-84489: C API: Add tests for Py_BuildValue() (GH-110596) (GH-110680)
(cherry picked from commit 5c6e85480a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-11 11:12:39 +03:00
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