- Notifications
You must be signed in to change notification settings - Fork 886
Closed
Description
I am forwarding here the bug I have received in retext-project/retext#458:
Traceback (most recent call last): File "<stdin>", line 1, in <module> import markdown File "/usr/lib/python3.7/site-packages/markdown/__init__.py", line 67, in <module> __version__ = _get_version() File "/usr/lib/python3.7/site-packages/markdown/__init__.py", line 64, in _get_version return str(packaging.version.Version(v)) AttributeError: module 'pkg_resources._vendor.packaging' has no attribute 'version'
I looked at ArchLinux PKGBUILD file and found out that they are patching setuptools to use system versions of modules such as packaging
, instead of vendored versions:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python-setuptools#n26
Now I realized that pkg_resources.extern.packaging
is a non-documented module, and we cannot be sure that it exists on all platforms or that it will not be removed in the future. So probably we should switch to the official version of packaging
or at least do something like this:
try: import packaging except ImportError: from pkg_resources.extern import packaging
Metadata
Metadata
Assignees
Labels
No labels