Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release #678

Closed
ijnek opened this issue Jun 14, 2022 · 2 comments · Fixed by #693

Comments

@ijnek
Copy link
Member

ijnek commented Jun 14, 2022

Following warning spams when running bloom-release:

/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release

This deprecation warning was added to pypa/setuptools some time last year, and it seems like all the has to be done is to use packaging.parse instead of pkg_resources.parse_version as described in PEP 440.

I will try and get a fix in if no one gets to it first.

@jbarry-bdai
Copy link

With setuptools 66.0.0 this now breaks bloom-generate on anything but Mac I believe:

Traceback (most recent call last):
  File "/usr/local/bin/bloom-generate", line 5, in <module>
    from bloom.commands.generate import main
  File "/usr/local/lib/python3.10/dist-packages/bloom/commands/__init__.py", line 42, in <module>
    from bloom.commands.update import start_updater
  File "/usr/local/lib/python3.10/dist-packages/bloom/commands/update.py", line 49, in <module>
    from bloom.logging import warning
  File "/usr/local/lib/python3.10/dist-packages/bloom/logging.py", line 63, in <module>
    _is_mac_lion_or_greater = parse_version(mac_ver()[0]) >= parse_version('10.7.0')
  File "/usr/local/lib/python3.10/dist-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ''

Downgrading setuptools to 65.7.0 solved the problem.

@facontidavide
Copy link

facontidavide commented May 19, 2023

Thanks, I had this same problem.
Is the version with the fix released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants