Repository navigation
Fixes for Python 3.7 #7617
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
Fixes for Python 3.7 #7617
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2d61303
Fix deprecation warning when importing the ABCs from 'collections'
saimn 75e39a8
Duplicate ignored warnings for Python 3.7
saimn 204aa73
Remove use of inspect.formatargspec which is deprecated
saimn a6e2c15
Setting __dir__ with a list is no more allowed
saimn 8eee26b
Ignore collections.abc warnings for lxml
saimn e35668b
Fix floating point error in FITS time test
saimn dd353b1
Update comment about getargspec deprecation [ci skip]
saimn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Setting __dir__ with a list is no more allowed
Python 3.7.0 (default, Jun 28 2018, 18:00:41) [GCC 8.1.1 20180531] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import astropy >>> dir(astropy) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'list' object is not callable
- Loading branch information
commit a6e2c154bfe596961e4995bc6217e78660d2033b
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must admit I find this auto-cleanup bad form, but that's somewhat out of scope of this PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really a cleanup, I had to change the use of
__dir__to list the attributes that shall not be deleted because setting a list to__dir__no more works.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saimn - I meant that I found the whole stanza rather bad form, not your change to it! It just seems that by being a bit more careful in the code itself, one can avoid introducing these unwanted things in the namespace (or delete them after their use). Anyway, as said, definitely out of scope here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhvk - Ah ok! I agree with you, we could find a simpler way to keep the namespace clean.