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

handle python -OO #2393

Merged
merged 2 commits into from
Oct 8, 2024
Merged

handle python -OO #2393

merged 2 commits into from
Oct 8, 2024

Conversation

JohannesBuchner
Copy link
Contributor

@JohannesBuchner JohannesBuchner commented Oct 8, 2024

Description

Resolves the crash described in #2392, occuring when python -OO strips the __doc__ attribute

Checklist

  • Follows official PR format
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

📚 Documentation preview 📚: https://arviz--2393.org.readthedocs.build/en/2393/

Copy link
Contributor

@ahartikainen ahartikainen left a comment

Choose a reason for hiding this comment

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

Hi, very interesting bug.

Do we do something similar with some docstrings in bokeh / other tool wraps?

@JohannesBuchner
Copy link
Contributor Author

Is that question for me? I don't use bokeh, and this is not the bokeh repository, and I am confused who you are addressing with "we"?

@JohannesBuchner
Copy link
Contributor Author

FWIW, I installed bokeh and python3 -OO -c 'import bokeh' works fine.

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.81%. Comparing base (9411317) to head (39d4002).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2393   +/-   ##
=======================================
  Coverage   86.81%   86.81%           
=======================================
  Files         124      124           
  Lines       12882    12883    +1     
=======================================
+ Hits        11183    11184    +1     
  Misses       1699     1699           
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahartikainen
Copy link
Contributor

Is that question for me? I don't use bokeh, and this is not the bokeh repository, and I am confused who you are addressing with "we"?

Haha, sorry for the confusion -> we = arviz repo

Also just noticed that these are actually touching the docstring hacking parts I remembered. It has been quite a while since I look into this part of code.

@ahartikainen ahartikainen merged commit 0868c9e into arviz-devs:main Oct 8, 2024
12 checks passed
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