Commit Graph

115422 Commits

Author SHA1 Message Date
Alex Waygood 6be46c37c6
[3.11] More reorganisation of the typing docs (#105787) (#105816) 2023-06-15 10:05:50 +01:00
Alex Waygood c197bd8826
[3.11] Improve docs for `typing.dataclass_transform` (#105792) (#105815)
(cherry-picked from commit 006a453205)
2023-06-15 09:56:14 +01:00
Irit Katriel e422f35267
[3.11] gh-105196: Fix indentations of section headings in C API docs (#105672) (#105786)
gh-105196: Fix indentations of section headings in C API docs (#105672)

Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
2023-06-14 22:34:37 -05:00
Alex Waygood ab0546881f
[3.11] Typing docs: move the deprecated stuff below the non-deprecated stuff (#105781) (#105785) 2023-06-14 15:40:02 +01:00
Miss Islington (bot) c2e51a9985
[3.11] gh-105436: Ignore unrelated errors when checking empty env (GH-105742) (#105757)
gh-105436: Ignore unrelated errors when checking empty env (GH-105742)
(cherry picked from commit 4cefe3cf10)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-06-13 23:39:56 +00:00
Erlend E. Aasland 2b1745f37c
[3.11] gh-105375: Improve error handling in _Unpickler_SetInputStream() (#105667) (#105721)
Prevent exceptions from possibly being overwritten in case of multiple
failures.

(cherry picked from commit 217589d4f3)
2023-06-13 09:07:20 +00:00
Erlend E. Aasland 36c393c044
[3.11] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (#105686) (#105711)
* [3.11] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (#105686)

All fields must be explicitly initialised to prevent manipulation of
uninitialised fields in dealloc.

Align initialisation order with the layout of the object structs.

(cherry picked from commit ca3cc4b95d)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-13 06:50:00 +00:00
Miss Islington (bot) 261d0b4f0e
[3.11] gh-105436: The environment block should end with two null wchar_t values (GH-105495) (#105701)
gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit 4f7d3b602d)

Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
2023-06-12 16:49:57 +00:00
Miss Islington (bot) f5b63eab9b
[3.11] ARM64 clamping bug also exists in MSVC 14.35 (GH-105679) (#105696)
ARM64 clamping bug also exists in MSVC 14.35 (GH-105679)
(cherry picked from commit 58f0bda341)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-06-12 17:02:39 +01:00
Miss Islington (bot) 171aa086f2
[3.11] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105676)
In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit a8d69fe92c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-12 09:13:03 +00:00
Erlend E. Aasland e5fe017143
[3.11] gh-105375: Harden pyexpat initialisation (#105606) (#105668)
(cherry picked from commit 20a56d8bec)

Add proper error handling to add_errors_module() to prevent exceptions
from possibly being overwritten.
2023-06-11 21:28:12 +00:00
Erlend E. Aasland f98d475ee3
[3.11] gh-105375: Improve error handling in the sys extension module (#105611) (#105666)
(cherry picked from commit 41cddc2e93)

In _PySys_AddXOptionWithError() and sys_add_xoption(),
bail on first error to prevent exceptions from possibly being
overwritten.
2023-06-11 21:08:40 +00:00
Miss Islington (bot) a03449374e
[3.11] gh-105375: Improve error handling in _ctypes (GH-105593) (#105664)
Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the
current exception.
(cherry picked from commit e8998e46a7)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 20:30:47 +00:00
Miss Islington (bot) 91877478ed
[3.11] gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() (GH-105491) (#105662)
Bail on first error to prevent exceptions from possibly being overwritten.
(cherry picked from commit 555be81026)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-11 20:01:52 +00:00
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