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
Make sure old imports still work #997
Conversation
It just appears to be necessary...
Appears to work on Python 3.4.
Otherwise it somehow messes with builtins on Python 2.7.
ascii() is a built-in function on Python 2.7. Thus one would need to use __getattribute__ in attribute remapping helper class requiring a bunch more logic. This is really not worth it here as very few people would have directly imported obspy.core.ascii in the first place.
This fixes some issues with #842 and also makes "attribute access imports" like import obspy
obspy.xseed.Parser(filename) work. These worked before and I fear they are fairly common so we have to provide a deprecation path. |
Only Python 2.6 CI fails which is expected and fixed in #996 |
Make sure old imports still work
@krischer |
Good point. I'll add a deprecation path. |
Done in #999. |
This is essentially a continuation of #842 as it makes sure that packages relying on imports in ObsPy 0.10 still work with the latest master where we reorganized the structure.
With this PR, none of my codes relying on ObsPy require any changes and warnings are raised appropriately.
All of this can be removed as soon as 0.11 has been released.