-
-
Notifications
You must be signed in to change notification settings - Fork 18k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
21 changed files
with
183 additions
and
181 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Check that certain modules are not loaded by `import pandas` | ||
""" | ||
import sys | ||
|
||
blacklist = { | ||
'bs4', | ||
'html5lib', | ||
'ipython', | ||
'jinja2' | ||
'lxml', | ||
'matplotlib', | ||
'numexpr', | ||
'openpyxl', | ||
'py', | ||
'pytest', | ||
's3fs', | ||
'scipy', | ||
'tables', | ||
'xlrd', | ||
'xlsxwriter', | ||
'xlwt', | ||
} | ||
|
||
|
||
def main(): | ||
import pandas # noqa | ||
|
||
modules = set(x.split('.')[0] for x in sys.modules) | ||
imported = modules & blacklist | ||
if modules & blacklist: | ||
sys.exit("Imported {}".format(imported)) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
|
||
import warnings | ||
from distutils.version import LooseVersion | ||
|
||
_NUMEXPR_INSTALLED = False | ||
_MIN_NUMEXPR_VERSION = "2.4.6" | ||
|
||
try: | ||
import numexpr as ne | ||
ver = ne.__version__ | ||
_NUMEXPR_INSTALLED = ver >= LooseVersion(_MIN_NUMEXPR_VERSION) | ||
|
||
if not _NUMEXPR_INSTALLED: | ||
warnings.warn( | ||
"The installed version of numexpr {ver} is not supported " | ||
"in pandas and will be not be used\nThe minimum supported " | ||
"version is {min_ver}\n".format( | ||
ver=ver, min_ver=_MIN_NUMEXPR_VERSION), UserWarning) | ||
|
||
except ImportError: # pragma: no cover | ||
pass | ||
|
||
__all__ = ['_NUMEXPR_INSTALLED'] | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import warnings | ||
from distutils.version import LooseVersion | ||
|
||
_NUMEXPR_INSTALLED = False | ||
_MIN_NUMEXPR_VERSION = "2.4.6" | ||
|
||
try: | ||
import numexpr as ne | ||
ver = ne.__version__ | ||
_NUMEXPR_INSTALLED = ver >= LooseVersion(_MIN_NUMEXPR_VERSION) | ||
|
||
if not _NUMEXPR_INSTALLED: | ||
warnings.warn( | ||
"The installed version of numexpr {ver} is not supported " | ||
"in pandas and will be not be used\nThe minimum supported " | ||
"version is {min_ver}\n".format( | ||
ver=ver, min_ver=_MIN_NUMEXPR_VERSION), UserWarning) | ||
|
||
except ImportError: # pragma: no cover | ||
pass | ||
|
||
__all__ = ['_NUMEXPR_INSTALLED'] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
2310faa
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.
This commit appears to trigger pydata/xarray#1661