Open kurtbrose opened 4 years ago
worked around ModuleNotFound
# TODO: py3 compatibility hack, remove this setdefault() once on py3
if getattr(__builtins__, '__dict__', None):
# normalize __builtins__ to always be a dict
__builtins__ = __builtins__.__dict__
__builtins__.setdefault('ModuleNotFoundError', ImportError)
# everything from here to TODO above can be deleted in py3
then ran into this
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/pandleau/__init__.py", line 1, in <module>
from pandleau.pandleau import *
ImportError: No module named pandleau
(BTW: thank you very much for writing this library and putting it out there on PyPI! it has been very helpful; would you like some help with getting python 2 compatibility under test / fixed up? do you want to drop py2 compatability?)
@kurtbrose - I'm not a maintainer of this package but if you aren't aware, python2 support (by the python foundation) is ending for the legacy version of the language on 1/1/2020. If you haven't, I'd recommend reviewing the following link.
While this doesn't directly relate to your issue and this package, it could be worth considering a migration to python3 given many in the community have migrated and maintainers of many useful packages may not provide backwards compatibility.
https://github.com/bwiley1/pandleau/commit/1841213c12a9af528ea7e43f5dfc5ecf203880f5
this broke python 2 --
ModuleNotFoundError
is python3 only, butImportError
is probably close enough