Skip to content

Add missing 3.10/11 attributes to traceback module docs #105043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1,981 commits into from

Conversation

Jackenmen
Copy link
Contributor

@Jackenmen Jackenmen commented May 28, 2023

It seems that exceptions, end_lineno, and end_offset have been missed when the SyntaxError exception was modified in 3.10 and when the exception groups were added in 3.11.

There are also two new parameters to TracebackException(...) - max_group_depth and max_group_width. I have only added the documentation for the parameters, not the attributes as modifying the latter wouldn't propagate the value to chained/grouped TracebackExceptions but I can add them if you wish.


📚 Documentation preview 📚: https://cpython-previews--105043.org.readthedocs.build/

miss-islington and others added 30 commits March 23, 2023 11:27
…ecorated with `@runtime_checkable` (pythonGH-102937)

(cherry picked from commit 58d2b30)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…ror` (pythonGH-101689)

(cherry picked from commit b613208)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…onGH-102601)

(cherry picked from commit bd06375)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
…strings (pythonGH-102979)

(cherry picked from commit 7f01a11)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
(cherry picked from commit d494091)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
…ciphers (pythonGH-96932) (python#102918)

pythongh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (pythonGH-96932)
(cherry picked from commit af9c34f)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
pythongh-102027: Fix macro name (pythonGH-102124)

This fixes the ssse3 / sse2 detection when sse4 is available.

(cherry picked from commit ea93bde)

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
… parameter (pythonGH-102875)

(cherry picked from commit f2e5a6e)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
pythonGH-102981)

(cherry picked from commit ded9a7f)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
…on#103029)

* pythongh-103025: fix two ctypes doc issues  (pythonGH-103026)
(cherry picked from commit 0708437)

Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>
(cherry picked from commit 027223d)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
…initia… (python#103040)

[3.11] pythongh-102281: Fix potential nullptr dereference + use of uninitialized memory (pythongh-102282)
(cherry picked from commit afa6092)
…honGH-95495) (python#103006)

pythonGH-25309 enabled SSL_OP_IGNORE_UNEXPECTED_EOF by default, with a comment
that it restores OpenSSL 1.1.1 behavior, but this wasn't quite right.
That option causes OpenSSL to treat transport EOF as the same as
close_notify (i.e. SSL_ERROR_ZERO_RETURN), whereas Python actually has
distinct SSLEOFError and SSLZeroReturnError exceptions. (The latter is
usually mapped to a zero return from read.) In OpenSSL 1.1.1, the ssl
module would raise them for transport EOF and close_notify,
respectively. In OpenSSL 3.0, both act like close_notify.

Fix this by, instead, just detecting SSL_R_UNEXPECTED_EOF_WHILE_READING
and mapping that to the other exception type.

There doesn't seem to have been any unit test of this error, so fill in
the missing one. This had to be done with the BIO path because it's
actually slightly tricky to simulate a transport EOF with Python's fd
based APIs. (If you instruct the server to close the socket, it gets
confused, probably because the server's SSL object is still referencing
the now dead fd?)
(cherry picked from commit 420bbb7)

Co-authored-by: David Benjamin <davidben@google.com>
…ythonGH-103060)

(cherry picked from commit f4ed2c6)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
…python#103075)

There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def)

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
…ythonGH-103055)

(cherry picked from commit 60bdc16)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
…k.rst (pythonGH-102635) (pythonGH-103106)

(cherry picked from commit d835b3f)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
…nd fix pydoc output (pythonGH-103113) (python#103119)

(cherry picked from commit d052a38)

Co-authored-by: Bernhard Wagner <github.comNotification20120125@xmlizer.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
(cherry picked from commit fda95aa)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
(cherry picked from commit c1e71ce)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
…onGH-103110)

(cherry picked from commit 32937d6)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 55decb7)

Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
fix FlagBoundary statements
add warning about reloading modules and enum identity
(cherry picked from commit 5ffc1e5)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
…_init__ (pythonGH-103149)

(cherry picked from commit 2a4d8c0)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
…me display on how to workaround the macOS 13 Ventura “The installer encountered an error” failure. pythonGH-103252)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.