Skip to content
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

Fix crash when running with optimization #2160

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Conversation

QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Jun 28, 2024

In that case, __doc__ is None.

In that case, `__doc__` is None.
@takluyver
Copy link
Member

I think this is actually a good illustration of why we shouldn't care about the PYTHONOPTIMIZE or -O options. This line has been there with minor tweaks for over a decade (from 70be6cc), and would break as soon as you import nbconvert with optimize level 2. I can't find any issue filed about it before this one, and it looks like you've only noticed it because of a test failure on matplotlib, from an issue that went 5 years between comments.

The 'optimize' options make hardly any performance difference to normal code, anyway. If someone has a use case where they're actually useful, then they're easy enough to support, but I don't think everyone should spend time and thought on them just because they exist.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that helps someone else running tests, why not?

@krassowski krassowski merged commit 0b36e8b into jupyter:main Jan 28, 2025
24 checks passed
@QuLogic QuLogic deleted the fix-opt branch January 28, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants