You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug - python3.8 some imports which are using metadata module doesn't work #807
After upgrading to python3.8 I've started to encounter a strange error, when I'm importing some modules (for example jsonschema) I'm getting a importlib.metadata.PackageNotFoundError.
And when using vanilla python shell everything is working fine.
`bpython3 -p (echo 'import jsonschema' | psub )
bpython version 0.18 on top of Python 3.8.2 /usr/bin/python3
import jsonschema
Traceback (most recent call last):
File "", line 1, in
import jsonschema
File "/usr/lib/python3/dist-packages/bpython/curtsiesfrontend/repl.py", line 243, in load_module
module = self.loader.load_module(name)
File "/usr/local/lib/python3.8/dist-packages/jsonschema/init.py", line 34, in version = metadata.version("jsonschema")
File "/usr/lib/python3.8/importlib/metadata.py", line 531, in version
return distribution(distribution_name).version
File "/usr/lib/python3.8/importlib/metadata.py", line 504, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: jsonschema`
python3 -i (echo 'import jsonschema; print("ok")' | psub ) ok
Activity
Support packages that are using the new importlib.metadata api (fix of
uriariel commentedon May 27, 2020
I've made a pull request fixing this issue
Support packages that are using the new importlib.metadata api (fix of
sebastinas commentedon May 28, 2020
Thanks for the PR.