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 <[email protected]>
…ror` (pythonGH-101689)

(cherry picked from commit b613208)

Co-authored-by: Nikita Sobolev <[email protected]>
…strings (pythonGH-102979)

(cherry picked from commit 7f01a11)

Co-authored-by: Raymond Hettinger <[email protected]>
(cherry picked from commit d494091)

Co-authored-by: Raymond Hettinger <[email protected]>
…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 <[email protected]>
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 <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
… parameter (pythonGH-102875)

(cherry picked from commit f2e5a6e)

Co-authored-by: Amin Alaee <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
…on#103029)

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

Co-authored-by: Peter Jiping Xie <[email protected]>
(cherry picked from commit 027223d)

Co-authored-by: gaogaotiantian <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
Co-authored-by: Chenxi Mao <[email protected]>
…ythonGH-103055)

(cherry picked from commit 60bdc16)

Co-authored-by: Nikita Sobolev <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Eclips4 <[email protected]>
…nd fix pydoc output (pythonGH-103113) (python#103119)

(cherry picked from commit d052a38)

Co-authored-by: Bernhard Wagner <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <[email protected]>
Co-authored-by: Éric <[email protected]>
(cherry picked from commit c1e71ce)

Co-authored-by: gaogaotiantian <[email protected]>
…onGH-103110)

(cherry picked from commit 32937d6)

Co-authored-by: Charlie Zhao <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]>
fix FlagBoundary statements
add warning about reloading modules and enum identity
(cherry picked from commit 5ffc1e5)

Co-authored-by: Ethan Furman <[email protected]>
…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.