Skip to content
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

[Bug] import elephant rendered useless by removal of imports in __init__.py #237

Closed
jpgill86 opened this issue Jul 10, 2019 · 2 comments · Fixed by #239
Closed

[Bug] import elephant rendered useless by removal of imports in __init__.py #237

jpgill86 opened this issue Jul 10, 2019 · 2 comments · Fixed by #239

Comments

@jpgill86
Copy link
Contributor

jpgill86 commented Jul 10, 2019

@dizcza said

Now fim.so is downloaded at pip install and during the import (mostly to support travis tests).
To do so, I merged version_file branch because it includes removing unnecessary imports at elephant/__init__.py

This removal of all imports from __init__.py means that import elephant does nothing.

In [1]: import elephant

In [2]: dir(elephant)
Out[2]:
['__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__',
 '__version__',
 '_get_version']

In order to use elephant, the user now has to manually import every subpackage they need by name. This breaks all code that uses import elephant! 👎👎

@dizcza
Copy link
Member

dizcza commented Jul 10, 2019

Indeed, as you pointed out, dir(elephant) should contain useful internal packages. I'll revert the change back soon.

@jpgill86
Copy link
Contributor Author

See also #231 (comment).

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 a pull request may close this issue.

2 participants