Commit graph

117385 commits

Author SHA1 Message Date
Miss Islington (bot)
da672b2d24
[3.12] Document PYTHONSAFEPATH along side -P (GH-106122) (#106352)
Document PYTHONSAFEPATH along side -P (GH-106122)
(cherry picked from commit 0355625d94)

Co-authored-by: Jeremy Paige <ucodery@gmail.com>
2023-07-05 13:21:38 +02:00
Miss Islington (bot)
b314194c3c
[3.12] gh-105063: Disable test_peg_generator.TestCParser bco. ref leaks (GH-106024) (#106450)
Since gh-104798 (Use setuptools in peg-generator and reenable
tests), the TestCParser test case has been producing ref leaks.
(cherry picked from commit 41ad4dfc04)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-05 13:05:50 +02:00
Miss Islington (bot)
53605f285a
[3.12] GH-104554: Add RTSPS support to urllib/parse.py (GH-104605) (#105759)
RTSPS is the permanent scheme defined in
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
alongside RTSP and RTSPU schemes.

(cherry picked from commit f3266c05b6)

Co-authored-by: zentarim <33746047+zentarim@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-07-05 13:02:22 +02:00
Miss Islington (bot)
fc2393e417
[3.12] Display the sanitizer config in the regrtest header. (GH-105301) (#105342)
Display the sanitizer config in the regrtest header. (GH-105301)

Display the sanitizers present in libregrtest.

Having this in the CI output for tests with the relevant environment
variable displayed will help make it easier to do what we need to
create an equivalent local test run.
(cherry picked from commit 852348ab65)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-05 12:54:26 +02:00
Miss Islington (bot)
334b95b243
[3.12] gh-89392: Make test_decimal discoverable (GH-106209) (#106230)
gh-89392: Make test_decimal discoverable (GH-106209)
(cherry picked from commit 0e24499129)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-05 12:52:16 +02:00
Jeffery To
2edec6ad9f
[3.12] gh-104692: Include commoninstall as a prerequisite for bininstall (GH-104693) (#105428)
This ensures that `commoninstall` is completed before `bininstall` is
started when parallel builds are used (`make -j install`), and so the
`python3` symlink is only installed after all standard library modules
are installed.

(cherry picked from commit 990cb3676c)
2023-07-05 12:51:16 +02:00
Miss Islington (bot)
637102980d
[3.12] gh-100238: Use setuptools in peg-generator and reenable tests (GH-104798) (#105135)
(cherry picked from commit afa759fb80)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-07-05 11:42:47 +02:00
Miss Islington (bot)
00c522a81c
[3.12] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) (#106444)
gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443)
(cherry picked from commit a941bd6c53)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-05 08:57:59 +00:00
Miss Islington (bot)
5784acd08c
[3.12] tp_flags docs: fix indentation (GH-106420) (#106442)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-07-04 23:12:47 -07:00
Miss Islington (bot)
6f684044a9
[3.12] gh-106368: Add tests for formatting helpers in Argument Clinic (GH-106415) (#106438)
gh-106368: Add tests for formatting helpers in Argument Clinic (GH-106415)
(cherry picked from commit 2fb9480c83)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-04 23:00:32 +00:00
Barney Gale
d5ed72b696
[3.12] GH-106330: Fix matching of empty path in pathlib.PurePath.match() (GH-106331) (GH-106372)
We match paths using the `_lines` attribute, which is derived from the
path's string representation. The bug arises because an empty path's string
representation is `'.'` (not `''`), which is matched by the `'*'` wildcard.
(cherry picked from commit b4efdf8cda)
2023-07-04 21:51:36 +01:00
Miss Islington (bot)
930df7b07e
[3.12] gh-106396: Special-case empty format spec to gen empty JoinedStr node (GH-106401) (#106416)
(cherry picked from commit dfe4de2038)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-07-04 13:00:47 +00:00
Miss Islington (bot)
fda297031b
[3.12] gh-106368: Add tests for permutation helpers in Argument Clinic (GH-106407) (#106409)
Added new test class PermutationTests()
(cherry picked from commit 8f6df5e9cb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-04 14:17:05 +02:00
Miss Islington (bot)
b84365fe3e
[3.12] gh-106368: Increase Argument Clinic test coverage (GH-106389) (#106390)
Add:

- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
(cherry picked from commit 3406f8cce5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-04 00:26:44 +00:00
Miss Islington (bot)
6720003dae
[3.12] gh-106368: Harden Argument Clinic parser tests (GH-106384) (#106387)
(cherry picked from commit 648688c137)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-03 23:37:47 +00:00
Erlend E. Aasland
38fe0e7c2d
[3.12] gh-106368: Clean up Argument Clinic tests (#106373) (#106379)
(cherry picked from commit 3ee8dac7a1)
2023-07-03 22:27:34 +00:00
Miss Islington (bot)
67127ca8e2
[3.12] Small speed-up for the convolve() recipe. (GH-106371) (GH-106375) 2023-07-03 15:49:09 -05:00
Miss Islington (bot)
ddff4737bd
[3.12] gh-106368: Increase Argument Clinic test coverage (GH-106369) (#106370)
Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c8121db)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-03 20:45:49 +00:00
Miss Islington (bot)
887a7e6036
[3.12] gh-91053: make func watcher tests resilient to other func watchers (GH-106286) (#106365)
gh-91053: make func watcher tests resilient to other func watchers (GH-106286)
(cherry picked from commit 58906213cc)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-07-03 09:13:21 -06:00
Miss Islington (bot)
5f20152f01
[3.12] gh-106359: Fix corner case bugs in Argument Clinic converter parser (GH-106361) (#106364)
gh-106359: Fix corner case bugs in Argument Clinic converter parser (GH-106361)

DSLParser.parse_converter() could return unusable kwdicts in some rare cases

(cherry picked from commit 0da4c883cf)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-03 13:42:20 +00:00
Miss Islington (bot)
5e856049b1
[3.12] Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119) (#106348)
Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119)
(cherry picked from commit 987b712b4a)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2023-07-03 03:23:27 +00:00
Miss Islington (bot)
730c873efd
[3.12] gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934) (#106322)
gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934)

If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None.
---------

(cherry picked from commit 0530f4f646)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-01 23:16:14 +00:00
Miss Islington (bot)
8738c5bcee
[3.12] gh-106232: Make timeit doc command lines compatible with Windows. (GH-106296) (#106298)
gh-106232: Make timeit doc command lines compatible with Windows. (GH-106296)

Command Prompt (CMD Shell) and older versions of PowerShell
require double quotes and single quotes inside the string.
This form also works on linux and macOS.
(cherry picked from commit 04dfc6fa90)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-06-30 22:40:43 -04:00
Miss Islington (bot)
c4298d5c64
[3.12] gh-105486: Change the repr of ParamSpec list of args in GenericAlias (GH-105488) (#106297)
gh-105486: Change the `repr` of `ParamSpec` list of args in `GenericAlias` (GH-105488)
(cherry picked from commit eb7d6e7ad8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-01 00:32:44 +00:00
Miss Islington (bot)
0616c83f57
[3.12] gh-106145: Make end_{lineno,col_offset} required on type_param nodes (GH-106224) (#106295)
gh-106145: Make `end_{lineno,col_offset}` required on `type_param` nodes (GH-106224)
(cherry picked from commit 46c1097868)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-01 00:15:18 +00:00
Miss Islington (bot)
d6a5a30669
[3.12] gh-101100: Docs: Fix references to several numeric dunders (GH-106278) (#106281)
gh-101100: Docs: Fix references to several numeric dunders (GH-106278)
(cherry picked from commit a8ae73965b)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-30 15:39:52 +01:00
Miss Islington (bot)
7a1b946a8d
[3.12] gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (GH-106272) (#106274)
gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (GH-106272)

Deprecate Py_HasFileSystemDefaultEncoding variable.
(cherry picked from commit f3cf2ddd8d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-30 10:21:36 +00:00
Miss Islington (bot)
04a165f4f9
[3.12] GH-106152: Add PY_THROW event to cProfile (GH-106256)
GH-106152: Add PY_THROW event to cProfile (GH-106161)
(cherry picked from commit cea9d4ea82)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-06-29 23:39:18 +00:00
Miss Islington (bot)
2405929c35
[3.12] Fix possible refleak in CodeType.replace() (GH-106243) (GH-106244)
Fix possible refleak in CodeType.replace() (GH-106243)

A reference to c_code was leaked if PySys_Audit() failed.
(cherry picked from commit 3c70d467c1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 21:41:01 +03:00
Miss Islington (bot)
c9b9555650
[3.12] gh-101006: Improve error handling when read marshal data (GH-101007) (GH-106226)
* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904b22)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 13:46:51 +03:00
Miss Islington (bot)
e0fa531d7a
[3.12] gh-106033: Get rid of PyDict_GetItem in _PyFunction_FromConstructor (GH-106044) (GH-106228)
gh-106033: Get rid of PyDict_GetItem in _PyFunction_FromConstructor (GH-106044)
(cherry picked from commit 08c08d21b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 13:45:39 +03:00
Miss Islington (bot)
e12045d648
[3.12] gh-106194: Rename duplicated tests in test_curses (GH-106196) (#106216)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-28 21:12:12 +00:00
Miss Islington (bot)
ed2114f1cf
[3.12] gh-106197: Deduplicate tests in test_buffer (GH-106198) (#106206)
gh-106197: Deduplicate tests in `test_buffer` (GH-106198)
(cherry picked from commit c283a0cff5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-28 15:13:57 +00:00
Miss Islington (bot)
0cd07b3272
[3.12] gh-101100: Fix reference to parse_args in optparse.rst (GH-105265) (#106204)
Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
2023-06-28 15:44:23 +03:00
Miss Islington (bot)
78cedf2607
[3.12] gh-106118: Add O_CLOEXEC preprocessor guard (GH-106120) (#106199)
(cherry picked from commit 6c60684bf5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-06-28 11:54:53 +00:00
Miss Islington (bot)
7bdf2c16e6
[3.12] gh-105993: Add possible None return type to asyncio.EventLoop.start_tls docs (GH-105995) (#106188)
gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (GH-105995)
(cherry picked from commit 6b52a581c1)

Co-authored-by: Sam Bull <git@sambull.org>
2023-06-28 16:36:49 +05:30
Miss Islington (bot)
27bd2d1a9b
[3.12] gh-101100: Fix reference to asynchronous methods (GH-106172) (#106191)
gh-101100: Fix reference to asynchronous methods (GH-106172)
(cherry picked from commit bbf722dcd3)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
2023-06-28 16:36:02 +05:30
Miss Islington (bot)
442f5ec042
[3.12] GH-106160: Fix test_gzip failing under WASI, which does not have zlib. (GH-106167) (#106170)
GH-106160: Fix test_gzip failing under WASI, which does not have zlib. (GH-106167)

Fix test_gzip's failure under WASI, which does not have zlib, by using
test.support.import_helper.import_module to import zlib. (gzip
unconditionally imports zlib, so this does not cause any new skips.)
(cherry picked from commit 161012fc25)

Co-authored-by: T. Wouters <thomas@python.org>
2023-06-28 16:16:16 +05:30
Miss Islington (bot)
56e39192c8
[3.12] Refer to TimeoutError instead of asyncio.TimeoutError in asyncio-task.rst (GH-106136) (#106179)
Co-authored-by: lightdrk <108566237+lightdrk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-27 23:38:01 -06:00
Miss Islington (bot)
0373c2ccd5
[3.12] Fix c-analyzer for GCC: ignore LANG env var (GH-106173) (#106178)
Fix c-analyzer for GCC: ignore LANG env var (GH-106173)

The c-analyzer doesn't support GCC localized messages, so just unset
the LANG environment variable.
(cherry picked from commit 1f74b9e933)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-28 03:41:36 +00:00
Miss Islington (bot)
c1c6738526
[3.12] gh-101634: regrtest reports decoding error as failed test (GH-106169) (#106174)
gh-101634: regrtest reports decoding error as failed test (GH-106169)

When running the Python test suite with -jN option, if a worker stdout
cannot be decoded from the locale encoding report a failed testn so the
exitcode is non-zero.
(cherry picked from commit 2ac3eec103)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-28 02:55:27 +00:00
Pablo Galindo Salgado
20315d141a
[3.12] gh-106140: Reorder some more fields to facilitate out-of-process inspection (GH-106148) (#106155)
(cherry picked from commit 9126a6a9ce)
2023-06-27 18:33:01 +00:00
Miss Islington (bot)
ac80beb1ec
[3.12] gh-106140: Reorder some fields to facilitate out-of-process inspection (GH-106143) (#106147)
gh-106140: Reorder some fields to facilitate out-of-process inspection (GH-106143)
(cherry picked from commit 2d5a1c2811)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-06-27 17:44:37 +00:00
Miss Islington (bot)
264b54bf51
[3.12] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106154)
IDLE: Condense run.main threading.Thread start. (GH-106125)

Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
(cherry picked from commit eaa1eae55e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-06-27 17:35:48 +00:00
Miss Islington (bot)
0555722a8a
[3.12] gh-92788: Add docs for ast.Module, ast.Expression, and others (GH-101055) (#106139)
gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (GH-101055)
(cherry picked from commit 33608fd67d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-27 13:44:44 +00:00
Miss Islington (bot)
0efbe4d189
[3.12] gh-106123: Modules/_sha3 appears to no longer be necessary (GH-106124) (#106127)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2023-06-26 22:49:32 -07:00
Miss Islington (bot)
c2e8e347b3
[3.12] GH-105774: Clarify operation of normalize() (GH-106093) (GH-106128) 2023-06-26 23:32:16 -05:00
Miss Islington (bot)
1bb2bf7cd6
[3.12] gh-106030: Miscellaneous fixes in Python/suggestions.c (GH-106031) (#106036)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-26 20:43:20 -07:00
Miss Islington (bot)
364cb6683b
[3.12] gh-84976: Add back UTC to datetime.__all__ (GH-104920) (#106019)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-06-26 20:41:52 -07:00
Miss Islington (bot)
1acfecbc00
[3.12] Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (GH-96146)" (GH-105948) (#106117)
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (GH-96146)" (GH-105948)

This reverts commit 1f0eafa844.
(cherry picked from commit d3af83b934)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-06-26 21:11:49 +02:00