Commit graph

115358 commits

Author SHA1 Message Date
Miss Islington (bot)
05c73e1cd8
[3.11] gh-105375: Improve PyErr_WarnExplicit() error handling (GH-105610) (#105660)
Bail on first error to prevent exceptions from possibly being
overwritten.
(cherry picked from commit 567d6ae8e7)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 19:46:02 +00:00
Erlend E. Aasland
87e493b11a
[3.11] gh-105375: Harden _ssl initialisation (#105599) (#105651)
(cherry picked from commit 01f4230460)

Add proper error handling to prevent reference leaks and overwritten
exceptions.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 21:25:36 +02:00
Alex Waygood
f207b346d4
[3.11] Remove stray reference to PEP-695 in the typing docs (#105655) 2023-06-11 17:10:49 +01:00
Miss Islington (bot)
2ba8e6ac50
[3.11] Fix typo in configparser module docstring (GH-105652) (#105654)
Fix typo in configparser module docstring (GH-105652)

"zc.buildbot" -> "zc.buildout"
(cherry picked from commit 845e593c4e)

Co-authored-by: litlighilit <97860435+litlighilit@users.noreply.github.com>
2023-06-11 14:33:50 +00:00
Miss Islington (bot)
b3d95d4e61
[3.11] gh-105375: Improve error handling in the builtins extension module (GH-105585) (#105650)
(cherry picked from commit d4fa52934a)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 11:13:45 +00:00
Miss Islington (bot)
cb26fafdcc
[3.11] gh-105375: Improve _decimal error handling (GH-105605) (#105648)
Fix a bug where an exception could end up being overwritten.
(cherry picked from commit c932f72849)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 10:58:56 +00:00
Miss Islington (bot)
cfa0f7c59b
[3.11] gh-105375: Harden _datetime initialisation (GH-105604) (#105646)
Improve error handling so init bails on the first exception.
(cherry picked from commit 16d49680b5)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 10:41:37 +00:00
Miss Islington (bot)
3c08e54ccf
[3.11] gh-105375: Improve array.array exception handling (GH-105594) (#105643)
Fix a bug where 'tp_richcompare' could end up overwriting an exception.
(cherry picked from commit 35cff545db)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 10:22:31 +00:00
Miss Islington (bot)
aaa8a493ec
[3.11] Cleanup and clarify our hashlib docs. (GH-105624) (#105633)
Cleanup and clarify our hashlib docs. (GH-105624)

Clarify and improve our hashlib docs. Now with 50% less mess!
(cherry picked from commit 0d1d6ab966)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-06-10 11:50:27 -07:00
Miss Islington (bot)
4ceb5c4924
[3.11] gh-105375: Improve error handling in zoneinfo module (GH-105586) (#105613)
Fix bugs where exceptions could end up being overwritten
because of deferred error handling.

(cherry picked from commit 33c92c4f15)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-09 22:54:00 +00:00
Alex Waygood
6cb1308005
[3.11] Miscellaneous improvements to the typing docs (#105529) (#105568)
Miscellaneous improvements to the typing docs (#105529)

Mostly, these are changes so that we use shorter sentences and shorter paragraphs. In particular, I've tried to make the first sentence introducing each object in the typing API short and declarative.
2023-06-09 22:41:22 +01:00
Miss Islington (bot)
e4748628e1
[3.11] gh-105375: Improve error handling in _elementtree (GH-105591) (#105601)
Fix bugs where exceptions could end up being overwritten.
(cherry picked from commit 00b599ab5a)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-09 21:19:59 +00:00
Miss Islington (bot)
c1797f661d
[3.11] gh-105375: Improve posix error handling (GH-105592) (#105597)
Fix a bug where an IndexError could end up being overwritten.
(cherry picked from commit f668f73bc8)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-09 20:55:34 +00:00
Erlend E. Aasland
76682ba7af
[3.11] gh-105375: Improve errnomodule error handling (#105590) (#105595)
(cherry picked from commit eede1d2f48)

Bail immediately if an exception is set, to prevent exceptions from
being overwritten.
2023-06-09 20:35:30 +00:00
Erlend E. Aasland
4d4251d6ec
[3.11] gh-105375: Improve _pickle error handling (#105475) (#105583)
(cherry picked from commit 89aac6f6b7)

Error handling was deferred in some cases, which could potentially lead
to exceptions being overwritten.
2023-06-09 17:56:02 +00:00
Erlend E. Aasland
90e357bc8a
[3.11] gh-105375: Improve error handling in compiler_enter_scope() (#105494) (#105582)
(cherry picked from commit 6c832ddcf2)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-09 17:36:06 +00:00
Miss Islington (bot)
c28887d059
[3.11] Clarify the supported cases in the tokenize module (GH-105569) (#105574)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-06-09 16:00:53 +00:00
Miss Islington (bot)
6dcbd50eb8
[3.11] gh-105557: Remove duplicate sqlite3 test method (GH-105558) (#105562)
test_func_return_too_large_int() was defined twice.
Keep only the redefined method, as that also checks the tracebacks.
(cherry picked from commit b8fa7bda4f)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-09 14:02:15 +00:00
Alex Waygood
faf15fda28
[3.11] Fix two errors in the typing docs (#105559) 2023-06-09 14:14:47 +01:00
Miss Islington (bot)
fed1b5a198
[3.11] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105519)
* revert enum pickling from by-name to by-value

(cherry picked from commit 4ff5690e59)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-06-08 18:02:12 -07:00
Miss Islington (bot)
c3b8f9d0d2
[3.11] CI: Configure macOS build as per updated devguide recommendations (GH-105533) (#105537)
(cherry picked from commit a5f23d4110)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-08 22:57:01 +00:00
Miss Islington (bot)
c2df09fb4d
[3.11] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339) (#105527)
gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339)
(cherry picked from commit 3ee921d84f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-08 20:48:10 +00:00
Miss Islington (bot)
b073b30cae
[3.11] test_types: Replace raw assert statements (GH-105500) (#105508)
(cherry picked from commit a8eb7372ee)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-06-08 15:33:40 +00:00
Miss Islington (bot)
af80db063f
[3.11] Further improve docs for typing.Annotated (GH-105498) (#105504)
* Further improve docs for `typing.Annotated` (GH-105498)
(cherry picked from commit d213c2990f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-08 15:06:39 +00:00
Alex Waygood
02c5513b30
[3.11] [typing docs] Don't describe Sized and Hashable as deprecated in the 3.11 docs (#105496) 2023-06-08 13:09:52 +01:00
Federico Caselli
acf3916e84
[3.11] Add single value agen.athrow(value) signature to the 3.11 docs gh-105269 (#105468) 2023-06-07 23:30:33 +01:00
Jelle Zijlstra
3a195f3468
[3.11] gh-105286: Further improvements to typing.py docstrings (GH-105363) (#105417)
[3.11] gh-105286: Further improvements to `typing.py` docstrings (GH-105363).
(cherry picked from commit 9a89f1bf1e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 21:41:46 +00:00
Alex Waygood
ccc971714e
[3.11] typing: Improve documentation of generic classes and aliases (#105369) (#105454) 2023-06-07 21:27:15 +00:00
Miss Islington (bot)
571ec56b65
[3.11] gh-105375: Improve error handling in sqlite3 collation callback (GH-105412) (#105441)
Check for error after each call to PyUnicode_FromStringAndSize().
(cherry picked from commit a24a780d93)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-07 21:22:01 +00:00
Alex Waygood
18e9fd80d9
[3.11] gh-103171: Revert undocumented behaviour change for runtime-checkable protocols decorated with @final (#105445) 2023-06-07 21:18:21 +00:00
Erlend E. Aasland
2ffeb0ecc7
[3.11] gh-105455: Regen configure with GNU Autoconf 2.69 (#105467) 2023-06-07 22:55:00 +02:00
Miss Islington (bot)
40d1d28b07
[3.11] gh-90015: Document that PEP-604 unions do not support forward references (GH-105366) (#105461)
gh-90015: Document that PEP-604 unions do not support forward references (GH-105366)
(cherry picked from commit fbdee000de)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 19:11:33 +01:00
Jelle Zijlstra
34f23904e1
[3.11] Improve docs for typing.TypeAlias (GH-105372). (#105447)
(cherry picked from commit c5ec51ec8f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 07:14:36 -07:00
Jelle Zijlstra
d0af5272a7
[3.11] gh-97797: Improve documentation for typing.Annotated (GH-105365). (#105449)
(cherry picked from commit e26d296984)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 07:14:01 -07:00
Alex Waygood
0d2ed56f6c
[3.11] Improve code examples in typing.rst (#105346) (#105427) 2023-06-07 06:41:35 -07:00
Pablo Galindo
ddbd4811e4 Merge remote-tracking branch 'upstream/3.11' into 3.11 2023-06-07 09:37:18 +01:00
Pablo Galindo
5103df46e0 Post 3.11.4 2023-06-07 09:37:03 +01:00
Miss Islington (bot)
039f30380b
[3.11] typing docs: Make the PEPs list an expandable section, hidden by default (GH-105353) (#105421)
typing docs: Make the PEPs list an expandable section, hidden by default (GH-105353)
(cherry picked from commit d7645124f5)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-07 07:50:31 +01:00
Miss Islington (bot)
5e4c46f029
[3.11] GH-95088: Clarify rules for parsing an item key for format strings (GH-103779) (#105418)
GH-95088: Clarify rules for parsing an item key for format strings (GH-103779)
(cherry picked from commit 3e7316d7e8)

Co-authored-by: achhina <amanschhina@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-06-06 20:56:03 -07:00
Miss Islington (bot)
2456136360
[3.11] typing.NewType docs: the future performance improvements are now in the past (GH-105354) (#105415)
`typing.NewType` docs: the future performance improvements are now in the past (GH-105354)
(cherry picked from commit 5f65ff0370)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-06 20:55:46 -07:00
Pablo Galindo
d2340ef257 Python 3.11.4 2023-06-06 23:00:27 +01:00
Miss Islington (bot)
daf22ca7f9
[3.11] gh-104411: Update test_getint for Tcl 9.0 (GH-104412) (#105357)
gh-104411: Update test_getint for Tcl 9.0 (GH-104412)
(cherry picked from commit 2c49c759e8)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-06-06 10:04:21 -04:00
Miss Islington (bot)
c644fe403a
[3.11] gh-104399: Use newer libtommath APIs when necessary (GH-104407) (#105344)
gh-104399: Use newer libtommath APIs when necessary (GH-104407)
(cherry picked from commit 00d73caf80)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-06-06 10:01:54 -04:00
Erlend E. Aasland
b8d3bb72b0
[3.11] gh-90005: Don't link with libbsd if not needed (#105236) (#105359)
The regression was introduced with commit 5b946cada.
Restore pre gh-29696 behaviour.
2023-06-06 11:00:38 +00:00
Miss Islington (bot)
faae548e0e
[3.11] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105328)
(cherry picked from commit a4f72fa39a)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-05 19:02:23 +02:00
Alex Waygood
93d9e990fb
[3.11] gh-105286: Improve typing.py docstrings (#105287) (#105322)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-05 18:11:35 +02:00
Jelle Zijlstra
48957888d2
[3.11] gh-105164: Detect annotations inside match blocks (GH-105177). (#105314)
(cherry picked from commit 69d1245685)
2023-06-05 13:46:12 +00:00
Tian Gao
aca77b5530
[3.11] gh-105080: Fixed inconsistent signature on derived classes (GH… (#105274) 2023-06-04 15:26:01 -06:00
Miss Islington (bot)
86eab0807f
[3.11] gh-104882: Docs: fix description of relationship between socket.getblocking() and socket.gettimeout() (GH-105026) (#105284)
gh-104882: Docs: fix description of relationship between `socket.getblocking()` and `socket.gettimeout()` (GH-105026)
(cherry picked from commit 5a5ed7a3e6)

Co-authored-by: Joe Geisbauer <joegeisbauer@gmail.com>
2023-06-04 17:09:13 +01:00
Miss Islington (bot)
8de607ab1c
[3.11] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105219)
gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185)
(cherry picked from commit ee26ca13a1)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-02 08:28:35 +00:00