Repository navigation
Fix running astropy with python -OO - #3923
Merged
Merged
Conversation
embray
added a commit
to embray/astropy_helpers
that referenced
this pull request
Jul 7, 2015
…ll; even if we expect the docstring to exist it may not due to optimized compilation (see astropy/astropy#3923)
Contributor
|
Why sometimes: and sometimes: |
Member
Author
|
I wondered that myself, and I wrote the patch... I guess in principle any knucklehead can assign anything they want to |
Contributor
|
No -- doesn't bug me, just curious, really. |
Member
Author
|
Temporary insanity, I guess. |
Member
Author
|
Updated the astropy_helpers submodule, and added a changelog entry. |
…s, or module's docstring will always be there, since when compiling the modules with python's -OO flag the docstrings can be removed, rendering Astropy inoperable due to these cases.
embray
force-pushed
the
optimized-docstrings
branch
from
July 13, 2015 14:44
36b9bd8 to
fc6bf70
Compare
embray
added a commit
that referenced
this pull request
Jul 13, 2015
Fix running astropy with python -OO
embray
added a commit
that referenced
this pull request
Aug 5, 2015
Fix running astropy with python -OO Conflicts: astropy/units/function/units.py astropy_helpers
embray
added a commit
that referenced
this pull request
Aug 7, 2015
Fix running astropy with python -OO Conflicts: astropy/units/function/units.py astropy_helpers
embray
added a commit
that referenced
this pull request
Aug 11, 2015
Fix running astropy with python -OO Conflicts: astropy/units/function/units.py astropy_helpers
embray
added a commit
that referenced
this pull request
Aug 11, 2015
Fix running astropy with python -OO Conflicts: astropy/units/function/units.py astropy_helpers
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivated by this stack overflow question, fixes as many cases as I could find of code that assumes a method, class, or module's docstring will always be there, since when compiling the modules with python's -OO flag the docstrings can be removed, rendering Astropy inoperable due to these cases.
I tested this manually on Python 2 and 3 by running (in clean repos)
python -OO setup.py test.There is also an associated change to astropy-helpers that is needed. I would like to get that in first, then this PR can also include an update to the astropy-helpers submodule (which is overdue anyways).
Related: #960