Change some ImportErrors into ModuleNotFoundErrors #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ModuleNotFoundError
is a subclass ofImportError
, new in Python 3.6. It describes a module not being available in the virtual environment (because blocked by vext) better than the more genericImportError
.This PR changes
ImportError
intoModuleNotFoundError
in functionGateKeeperLoader.load_module()
. I've let the otherImportError
s in the code as they are, as I'm not sure about them.Obviously a drawback of using
ModuleNotFoundError
is that it requires Python 3.6, but then again Python 3.6 was released in 2016, and as of today Python 3.7 is the oldest version still maintained.I've tested the same way as
.travis.yml
tests, but with dependencies fixed to what they were at the time of the previous commit, Mar 24, 2021. In a new virtual environment:Tests pass this way. They don't pass using current pip and setuptools. Too much has changed in these dependencies since last commit. I think
python3 setup.py ...
is now deprecated in favor ofpython3 -m build
, alsovirtualenv
in favor ofpython3 -m venv
if I understand correctly. Here's what trying to build vext with current dependencies return, in a new virtual environment:With this modified
vext
, I confirm that I can build distribution packages for my project at work withpython3 -m build
without triggering #85, so this PR closes #85.