8000 BUG: Ensure docstrings are not accessed with -OO by ksunden · Pull Request #13973 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

BUG: Ensure docstrings are not accessed with -OO #13973

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
Apr 17, 2019

Conversation

ksunden
Copy link
Member
@ksunden ksunden commented Apr 17, 2019

PR Summary

Python when run as python -OO omits docstrings for optimization.
Previously, importing pyplot accessed the __doc__ of one function, resulting in improper formatting on None.

This simply introduces a quick check which prevents calling on __doc__ if it is not defined.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@ksunden
Copy link
Member Author
ksunden commented Apr 17, 2019

Semi-related to #10312 (though that is more about tests themselves failing, where this is only ensuring importing works)

@dstansby dstansby added this to the v3.2.0 milestone Apr 17, 2019
@dstansby dstansby merged commit 2f046b4 into matplotlib:master Apr 17, 2019
@timhoffm timhoffm modified the milestones: v3.2.0, v3.1.0 Apr 17, 2019
@timhoffm
Copy link
Member
timhoffm commented Apr 17, 2019

I think this should be fixed for 3.1

@timhoffm
Copy link
Member

@meeseeksdev backport to v3.1.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 17, 2019
tacaswell added a commit that referenced this pull request Apr 17, 2019
…973-on-v3.1.x

Backport PR #13973 on branch v3.1.x (BUG: Ensure docstrings are not accessed with -OO)
@ksunden ksunden deleted the fix_OO branch December 27, 2022 18:50
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.

4 participants
0