Skip to content

Add new fields to TracebackException, fix cause/context/lineno types #13231

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

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Add new fields to TracebackException, fix cause/context/lineno types #13231

merged 1 commit into from
Dec 23, 2024

Conversation

kevinji
Copy link
Contributor

@kevinji kevinji commented Dec 11, 2024

@kevinji kevinji changed the title Add new fields to TracebackException, fix lineno type Add new fields to TracebackException, fix cause/context/lineno type Dec 11, 2024
@kevinji kevinji changed the title Add new fields to TracebackException, fix cause/context/lineno type Add new fields to TracebackException, fix cause/context/lineno types Dec 11, 2024
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/debug/tbtools.py:261: error: Incompatible types in assignment (expression has type "Optional[TracebackException]", variable has type "TracebackException")  [assignment]

@kevinji
Copy link
Contributor Author

kevinji commented Dec 22, 2024

@srittau maybe you can help review this, as a follow-up to #13204?

@JelleZijlstra JelleZijlstra merged commit 8ad4f1b into python:main Dec 23, 2024
63 checks passed
@kevinji kevinji deleted the patch-1 branch December 23, 2024 04:39
@cdce8p cdce8p mentioned this pull request Jan 1, 2025
pgjones pushed a commit to pallets/werkzeug that referenced this pull request Apr 18, 2025
This preps for a typing fix in python/typeshed#13231 where `__cause__` and `__context__` can be None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants