Repository navigation
Make AstropyDeprecationWarnings appear by default in py2.7 - #1871
Merged
Merged
Conversation
Member
|
We've already changed the |
we do this because in py2.7, DeprecationWarning and subclasses are hidden by default, but we want astropy's deprecations to get shown by default
Member
Author
|
Oh, duh, I guess that's an easy way to do it! In a moment I will attach code to this issue that does exactly what @embray says here. I tested it and the |
Member
|
👍 |
Member
|
I also think, in retrospect, it makes more sense to use our own warning rather than mix in with Python's own deprecation warnings. |
embray
added a commit
that referenced
this pull request
Dec 9, 2013
Make `AstropyDeprecationWarning`s appear by default in py2.7
Member
|
Should also mention this in the changelog probably, since users will start to see these more when they didn't before. |
embray
added a commit
that referenced
this pull request
Feb 12, 2014
Make `AstropyDeprecationWarning`s appear by default in py2.7
embray
added a commit
that referenced
this pull request
Feb 12, 2014
Make `AstropyDeprecationWarning`s appear by default in py2.7
mwcraig
added a commit
to mwcraig/astropy
that referenced
this pull request
Jun 24, 2015
Closes astropy#1871 by using an earlier version of HDF5
dhomeier
pushed a commit
to dhomeier/astropy
that referenced
this pull request
Aug 11, 2015
Closes astropy#1871 by using an earlier version of HDF5
1 task done
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.
This came up in a discussion in astropy/astropy-APEs#2 . As it stands right now,
AstropyDeprecationWarnings are not shown when they are raised withwarnings.warnin python 2.7. This is due to python's default behavior of hidingDeprecationWarning(which isAstropyDeprecationWarning's superclass) in py2.7 given that it is the last 2.x release.This makes sense for python deprecations, but we probably do want user's to see our deprecation warnings, as they often deal with something they'll have to change in future astropy releases. So we should figure out how to adjust the defaults so that
AstropyDeprecationWarningis shown by default and has to be manually turned off by the user.cc @embray @astrofrog