Commit Graph

115422 Commits

Author SHA1 Message Date
Miss Islington (bot) ada22db147
[3.11] Clarify state of CancelledError in doc (GH-106453) (#106456)
Clarify state of CancelledError in doc (GH-106453)

This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
(cherry picked from commit 12a9813808)

Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
2023-07-05 11:16:56 -07:00
Miss Islington (bot) 3f244b2f6e
[3.11] gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542) (#105571)
When inverting a Flag member (or boundary STRICT), only consider other canonical flags; when inverting an IntFlag member (or boundary KEEP), also consider aliases.
(cherry picked from commit 59f009e589)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-07-05 13:59:18 +02:00
Miss Islington (bot) ddfe8eb45f
[3.11] Document PYTHONSAFEPATH along side -P (GH-106122) (#106353)
(cherry picked from commit 0355625d94)

Co-authored-by: Jeremy Paige <ucodery@gmail.com>
2023-07-05 13:21:45 +02:00
Miss Islington (bot) 23b731a10d
[3.11] GH-104554: Add RTSPS support to `urllib/parse.py` (GH-104605) (#105760)
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:36 +02:00
Miss Islington (bot) 33fb89552b
[3.11] gh-89392: Make test_decimal discoverable (GH-106209) (#106229)
(cherry picked from commit 0e24499129)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-05 13:00:56 +02:00
Jeffery To 6c6a2a9143
[3.11] gh-104692: Include commoninstall as a prerequisite for bininstall (GH-104693) (#105429)
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)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-05 12:51:26 +02:00
Miss Islington (bot) edb29f0fbe
[3.11] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) (#106445)
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 09:03:25 +00:00
Miss Islington (bot) 9f8aa7a6d7
[3.11] gh-106368: Add tests for permutation helpers in Argument Clinic (GH-106407) (#106410)
Added new test class PermutationTests()
(cherry picked from commit 8f6df5e9cb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-04 14:17:26 +02:00
Miss Islington (bot) 3cc5c4a073
[3.11] gh-106368: Increase Argument Clinic test coverage (GH-106389) (#106391)
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:22:32 +00:00
Miss Islington (bot) 76889641e6
[3.11] gh-106368: Harden Argument Clinic parser tests (GH-106384) (#106388)
(cherry picked from commit 648688c137)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-03 23:35:42 +00:00
Erlend E. Aasland 3fdda976db
[3.11] gh-106368: Clean up Argument Clinic tests (#106373) (#106381)
(cherry picked from commit 3ee8dac7a1)
2023-07-03 22:33:45 +00:00
Erlend E. Aasland 52d5049cfd
[3.11] gh-106368: Increase Argument Clinic test coverage (#106369) (#106374)
Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c8121db)
2023-07-03 22:07:05 +00:00
Miss Islington (bot) e0d951d68a
[3.11] Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119) (#106349)
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:25:12 +00:00
Miss Islington (bot) 9e33586018
[3.11] gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934) (#106323)
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:15:44 +00:00
Miss Islington (bot) f5e29f4245
[3.11] gh-101100: Docs: Fix references to several numeric dunders (GH-106278) (#106282)
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:40:13 +01:00
Miss Islington (bot) 8623812fdc
[3.11] Fix possible refleak in CodeType.replace() (GH-106243) (GH-106245)
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:18 +03:00
Miss Islington (bot) b952ebe4be
[3.11] gh-100408: Fix a traceback in multiprocessing example (GH-100409) (GH-106231)
(cherry picked from commit a28d4edb23)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 14:29:22 +03:00
Miss Islington (bot) b937ca0a5a
[3.11] gh-101006: Improve error handling when read marshal data (GH-101007) (GH-106227)
* 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:47:30 +03:00
Miss Islington (bot) ce091c96cf
[3.11] gh-101100: Fix reference to `parse_args` in `optparse.rst` (GH-105265) (#106205)
Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
2023-06-28 12:41:18 +00:00
Miss Islington (bot) 0523f6de1f
[3.11] gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (GH-105995) (#106189)
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:25 +05:30
Miss Islington (bot) 43c603a60f
[3.11] gh-101100: Fix reference to asynchronous methods (GH-106172) (#106192)
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:35:51 +05:30
Miss Islington (bot) 966e0f6494
[3.11] gh-100340: Allows -Wno-int-conversion for wasm (GH-100341) (#106066)
(cherry picked from commit 75c8133efe)

Co-authored-by: Kushal Das <mail@kushaldas.in>
2023-06-28 09:27:59 +02:00
Miss Islington (bot) 2cce465416
[3.11] Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (GH-106136) (#106180)
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:26 -06:00
Miss Islington (bot) 9cc0533459
[3.11] Fix c-analyzer for GCC: ignore LANG env var (GH-106173) (#106177)
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 05:17:31 +02:00
Victor Stinner d5418e97fc
[3.11] gh-101634: regrtest reports decoding error as failed test (#106169) (#106175)
gh-101634: regrtest reports decoding error as failed test (#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)
2023-06-28 02:58:34 +00:00
Miss Islington (bot) fbb0151e5e
[3.11] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106153)
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:37:20 +00:00
Miss Islington (bot) 86dbf1d112
[3.11] gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (GH-101055) (#106138)
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:32 +00:00
Miss Islington (bot) 956b66b61b
[3.11] GH-105774: Clarify operation of normalize() (GH-106093) (GH-106129) 2023-06-26 23:32:43 -05:00
Miss Islington (bot) 97cf0291f5
[3.11] gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109) (gh-106116)
gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109)
(cherry picked from commit 512f299e55)

Co-authored-by: Roderich Schupp <roderich.schupp@gmail.com>
2023-06-26 14:12:40 -04:00
Kumar Aditya 307c59a0c1
[3.11] gh-105979: Fix exception handling in unmarshal_frozen_code (`Python/import.c`) (GH-105980). (#106100)
* [3.11] gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (GH-105980).
(cherry picked from commit cd5280367a)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
2023-06-26 09:00:51 +00:00
Miss Islington (bot) 8c792749cb
[3.11] Improve typing docs on the type of class objects (GH-106081) (#106097)
Improve typing docs on the type of class objects (GH-106081)
(cherry picked from commit 3eeb8c8906)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-26 09:43:41 +01:00
Miss Islington (bot) 1bbf60dc31
[3.11] Docs: add links to 'callable' term in sqlite3 docs (GH-106072) (#106074)
(cherry picked from commit bef1c8761e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-06-25 10:16:30 +02:00
Serhiy Storchaka dbe416b82b
[3.11] gh-106033: Get rid of new occurrences of PyDict_GetItem and Py… (#106040)
[3.11] gh-106033: Get rid of new occurrences of PyDict_GetItem and PyObject_HasAttr (GH-106034)

These functions are broken by design because they discard any exceptions raised
inside, including MemoryError and KeyboardInterrupt.  They should not be
used in new code..
(cherry picked from commit 1d33d53780)
2023-06-24 16:41:02 -07:00
Miss Islington (bot) c69f29f879
[3.11] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) (#106071)
gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047)

Use a note:: tag so that these dict and object API deficiencies show up clearly.

A caution:: tag was considered, but our current python docs rendering doesn't do much with that (no box or color change).  warning:: seemed too extreme.  note looks good.
(cherry picked from commit 19d6511b0b)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-06-24 16:30:09 -07:00
Miss Islington (bot) 05d06e583b
[3.11] Typing docs: fix typo in annotating tuples comment (GH-106048) (#106050)
Typing docs: fix typo in annotating tuples comment (GH-106048)
(cherry picked from commit 8ef0ee4ebc)

Co-authored-by: Eamon Tracey <66919574+EamonTracey@users.noreply.github.com>
2023-06-23 21:35:16 +01:00
Serhiy Storchaka 26d87fd5c7
[3.11] gh-106030: Miscellaneous fixes in Python/suggestions.c (GH-106… (GH-106039)
* PyUnicode_CompareWithASCIIString() only works if the second argument
  is ASCII string.
* Refleak in get_suggestions_for_name_error.
* Add some missing error checks.

(cherry picked from commit c8c162ef52)
2023-06-23 21:13:07 +03:00
Miss Islington (bot) 15f4bba7a7
[3.11] Typing docs: improve the guidance on annotating tuples (GH-106021) (#106029)
Typing docs: improve the guidance on annotating tuples (GH-106021)
(cherry picked from commit 968435ddb1)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-23 15:53:14 +01:00
Miss Islington (bot) 581d2628f9
[3.11] Docs: Avoid a DeprecationWarning in `pyspecific.py` when running with Sphinx >=6.1 (GH-105886) (#106011)
Docs: Avoid a DeprecationWarning in `pyspecific.py` when running with Sphinx >=6.1 (GH-105886)
(cherry picked from commit a72683ba8e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-23 09:14:25 +01:00
Miss Islington (bot) 6d232ba2ec
[3.11] stdtypes.rst: remove a period (GH-105959) (#105969)
stdtypes.rst: remove a period (GH-105959)
(cherry picked from commit c5a722be5f)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2023-06-21 15:40:46 +01:00
Alex Waygood 8bb16f6656
[3.11] typing docs: Improve the intro to each section (#105901) (#105903)
typing docs: Improve the intro to each section (#105901)
2023-06-19 01:17:06 +01:00
Miss Islington (bot) 043c831365
[3.11] gh-105844: Use devguide terminology to denote versions (GH-105882) (#105893)
(cherry picked from commit dba7217511)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-18 19:56:13 +02:00
Miss Islington (bot) 69e2da0292
[3.11] CI: Bump macOS build to use OpenSSL v3.0 (GH-105538) (#105868)
(cherry picked from commit 34e93d3998)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-16 19:26:56 +00:00
Miss Islington (bot) 2944a6cc0a
[3.11] GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105864)
GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105847)
(cherry picked from commit 2beab5bdef)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-06-16 18:30:22 +00:00
Carl Meyer 7c877b58e0
[3.11] bpo-44530: Document the change in MAKE_FUNCTION behavior (GH-93189) (#105842)
* bpo-44530: Document the change in MAKE_FUNCTION behavior

Fixes dis module documentation for MAKE_FUNCTION due to 2f180ce2cb (bpo-44530, released as part of 3.11) removes the qualified name at TOS.
(cherry picked from commit 486b52a315)

Co-authored-by: Alex Doe <alexdoesh@gmail.com>
2023-06-16 12:17:58 -05:00
Alex Waygood e590338893
[3.11] gh-105834: Backport new tests for `typing.Protocol` (#105835) (#105860) 2023-06-16 16:39:12 +00:00
Miss Islington (bot) a9d4f51e7e
[3.11] CI: Remove docs build from Azure Pipelines (GH-105823) (#105855)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-16 11:29:35 +00:00
Miss Islington (bot) bb72d77c32
[3.11] gh-105844: Consistently use 'minor version' for X.Y versions (GH-105851) (#105852)
(cherry picked from commit 0bffe1acd7)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-16 10:56:58 +02:00
Miss Islington (bot) aa927f9f96
[3.11] tarfile: Fix positional-only syntax in docs (GH-105770) (#105772)
The syntax used in the current docs (a / before any args) is invalid.

I think the right approach is for the arguments to arbitrary
filter functions to be treated as positional-only, meaning that users
can supply filter functions with any names for the argument. tarfile.py
only calls the filter function with positional arguments.
(cherry picked from commit 5cdd5ba49d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-06-15 22:43:30 -07:00
Miss Islington (bot) c0c4186858
[3.11] GH-105588: Add missing error checks to some obj2ast_* converters (GH-105839)
GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)
(cherry picked from commit a4056c8f9c)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-06-15 23:13:51 +00:00
Dong-hee Na abeb589290
[3.11] gh-102541: Hide traceback in help prompt (gh-102614). (gh-105830)
(cherry picked from commit ba516e70c6)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2023-06-15 15:29:00 +00:00