FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't cache exception with traceback reference loop in dviread. by anntzer · Pull Request #28899 · matplotlib/matplotlib · GitHub

Repository navigation

Don't cache exception with traceback reference loop in dviread. - #28899

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
anntzer:wtn
Sep 28, 2024
Merged

timhoffm merged 1 commit into
matplotlib:mainfrom
anntzer:wtn

Conversation

anntzer commented Sep 27, 2024

Copy link
Copy Markdown
Contributor

Rather, preemptively cache the reference loop by explicitly dropping the traceback.

See also db0c7c3 (#25470) for a longer description of the problem in another context.

(@tacaswell: I wonder whether using with_traceback(None) would have been a cleaner solution in #25470?)

PR summary

PR checklist

Rather, preemptively cache the reference loop by explicitly dropping
the traceback.

See also db0c7c3.

Copy link
Copy Markdown
Member

Do you know that passing None is allowed and not only works by chance? AFAICS, the docs only speak about passing another trackback. If this is not officially supported, we run into the danger that future Python versions break the solution.

QuLogic commented Sep 28, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

Not sure about docs, but it is type hinted as accepting None:
https://github.com/python/typeshed/blob/119cd09655dcb4ed7fb2021654ba809b8d88846f/stdlib/builtins.pyi#L1877

Copy link
Copy Markdown
Member

Ok, in that case it should be fine.

timhoffm added this to the v3.10.0 milestone Sep 28, 2024
timhoffm merged commit bb68469 into matplotlib:main Sep 28, 2024
anntzer deleted the wtn branch September 28, 2024 10:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL