Closed os closed 7 years ago
Travis build fails because ModuleNotFoundError
does not exist in python 2.7. Please make sure that your changes work for both 2.x and 3.x.
Shouldn't the existing code work fine though? ModuleNotFoundError is a subclass of ImportError
, so except ImportError
should include it as well.
@GLolol It should and it does from the shell, but that's not the case during installation. Am I missing something here?
Python 3.6.1 (default, Jun 5 2017, 17:08:26)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import md5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'md5'
>>> try:
... import md5
... except ImportError:
... print('handled')
...
handled
Duplicate of https://github.com/mailgun/expiringdict/pull/29. Closing.
My Python version is 3.6.1 and I get this error during installation: