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

Failure to Install Celery 4.4.2 Due to Version Parsing Error in Metadata #1686

Closed
iamnotagentleman opened this issue Feb 19, 2024 · 5 comments · Fixed by #1776
Closed

Failure to Install Celery 4.4.2 Due to Version Parsing Error in Metadata #1686

iamnotagentleman opened this issue Feb 19, 2024 · 5 comments · Fixed by #1776
Assignees
Labels
bug Something isn't working

Comments

@iamnotagentleman
Copy link

I Encounter a problem when i tried to install celery package with uv

  • The Command

uv --verbose pip install celery==4.4.2

RESULT

uv::requirements::from_source source=celery==4.4.2
0.002499s DEBUG uv_interpreter::virtual_env Found a virtualenv through VIRTUAL_ENV at: /Users/velieroglu/PycharmProjects///app/venv2
0.003561s DEBUG uv_interpreter::interpreter Using cached markers for: /Users/velieroglu/PycharmProjects///app/venv2/bin/python
0.003568s DEBUG uv::commands::pip_install Using Python 3.8.10 environment at /Users/velieroglu/PycharmProjects///app/venv2/bin/python
uv_client::flat_index::from_entries
uv_resolver::resolver::solve
0.418619s 0ms DEBUG uv_resolver::resolver Solving with target Python version 3.8.10
uv_resolver::resolver::choose_version package=root
uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
0.419496s 0ms DEBUG uv_resolver::resolver Adding direct dependency: celery==4.4.2
uv_resolver::resolver::choose_version package=celery
uv_resolver::resolver::package_wait package_name=celery
uv_resolver::resolver::process_request request=Versions celery
uv_client::registry_client::simple_api package=celery
uv_client::cached_client::get_cacheable
uv_client::cached_client::read_and_parse_cache file=/Users/velieroglu/Library/Caches/uv/simple-v1/pypi/celery.rkyv
uv_resolver::resolver::process_request request=Prefetch celery ==4.4.2
0.422276s 1ms DEBUG uv_client::cached_client Found fresh response for: https://pypi.org/simple/celery/
uv_resolver::version_map::from_metadata
uv_distribution::distribution_database::get_or_build_wheel_metadata dist=celery==4.4.2
uv_client::registry_client::wheel_metadata built_dist=celery==4.4.2
uv_client::cached_client::get_serde
uv_client::cached_client::get_cacheable
uv_client::cached_client::read_and_parse_cache file=/Users/velieroglu/Library/Caches/uv/wheels-v0/pypi/celery/celery-4.4.2-py2.py3-none-any.msgpack
0.423612s 3ms DEBUG uv_resolver::resolver Searching for a compatible version of celery (==4.4.2)
0.423633s 3ms DEBUG uv_resolver::resolver Selecting: celery==4.4.2 (celery-4.4.2-py2.py3-none-any.whl)
uv_resolver::resolver::get_dependencies package=celery, version=4.4.2
uv_resolver::resolver::distributions_wait package_id=celery-4.4.2
0.423674s 0ms WARN uv_client::cached_client Broken cache entry at /Users/velieroglu/Library/Caches/uv/wheels-v0/pypi/celery/celery-4.4.2-py2.py3-none-any.msgpack, removing: failed to open file /Users/velieroglu/Library/Caches/uv/wheels-v0/pypi/celery/celery-4.4.2-py2.py3-none-any.msgpack
0.423814s 0ms DEBUG uv_client::cached_client No cache entry for: https://files.pythonhosted.org/packages/7e/54/4d87a8f589259456efb09f574d538fcf3fd7339a3daaae8e02320c1780f1/celery-4.4.2-py2.py3-none-any.whl
uv_client::cached_client::fresh_request url="https://files.pythonhosted.org/packages/7e/54/4d87a8f589259456efb09f574d538fcf3fd7339a3daaae8e02320c1780f1/celery-4.4.2-py2.py3-none-any.whl"
uv_client::cached_client::new_cache file=/Users/velieroglu/Library/Caches/uv/wheels-v0/pypi/celery/celery-4.4.2-py2.py3-none-any.msgpack
uv_client::registry_client::read_metadata_range_request wheel=celery-4.4.2-py2.py3-none-any.whl
error: Failed to download: celery==4.4.2
Caused by: Couldn't parse metadata of celery-4.4.2-py2.py3-none-any.whl from https://files.pythonhosted.org/packages/7e/54/4d87a8f589259456efb09f574d538fcf3fd7339a3daaae8e02320c1780f1/celery-4.4.2-py2.py3-none-any.whl
Caused by: expected version to start with a number, but no leading ASCII digits were found
pytz (>dev)
^^^^

This issue seems to stem from the handling of version tags that do not begin with numeric characters, such as pre-release versions or special tags like (dev, latest, etc.) which is contrary to the observed behavior where versions are expected to start with digits.

@zanieb
Copy link
Member

zanieb commented Feb 19, 2024

This is wild syntax for the version specifier. They're looking for >0.0.0dev? I believe this is not conformant with the spec, but we could add support in our lenient parser. cc @BurntSushi

@zanieb zanieb added the bug Something isn't working label Feb 19, 2024
@charliermarsh
Copy link
Member

The version specifier is just dev?

@zanieb
Copy link
Member

zanieb commented Feb 19, 2024

See it for yourself :) https://github.com/celery/celery/blob/4.4.2/requirements/default.txt#L1

@charliermarsh
Copy link
Member

charliermarsh commented Feb 19, 2024

I'll do you one worse, I download and unzip the wheel locally.

@AlexWaygood
Copy link
Member

It seems like pip is about to disallow this, so we may not want to allow it ourselves. While pip does install celery currently, it prints this deprecation warning:

DEPRECATION: celery 4.1.1.801473 has a non-standard dependency specifier pytz>dev. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of celery or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at pypa/pip#12063

@charliermarsh charliermarsh self-assigned this Feb 20, 2024
charliermarsh added a commit that referenced this issue Feb 20, 2024
## Summary

Not a fan of this one but we don't have a clear policy on it yet so
feels weird to discriminate.

Closes #1686.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants