* [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>
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>
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>
(cherry picked from commit 41cddc2e93)
In _PySys_AddXOptionWithError() and sys_add_xoption(),
bail on first error to prevent exceptions from possibly being
overwritten.
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>
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>
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>
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>
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>
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>
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>
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>
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.
Fix bugs where exceptions could end up being overwritten.
(cherry picked from commit 00b599ab5a)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
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>
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>
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>
[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>
Check for error after each call to PyUnicode_FromStringAndSize().
(cherry picked from commit a24a780d93)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
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>
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>
`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>