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

Index Strategy ignored for distributions packages #4465

Closed
MattiasDC opened this issue Jun 24, 2024 · 1 comment · Fixed by #4468
Closed

Index Strategy ignored for distributions packages #4465

MattiasDC opened this issue Jun 24, 2024 · 1 comment · Fixed by #4468
Assignees

Comments

@MattiasDC
Copy link

It seems that uv is ignoring index strategies for installing distribution packages. E.g. when executing the next command: UV_INDEX_STRATEGY=unsafe-best-match uv pip install pdoc==0.11.0 --no-cache -vvv

Uv decides to use version 46.1.3 (minimal version is 40.8.0) which is the latest version on custom.pypi.index, however on the https://pypi.org index there is already version 70. Relevant part of the debug log:

 uv_resolver::resolver::solve 
      0.058848s   0ms DEBUG uv_resolver::resolver Solving with target Python version 3.11.5
   uv_resolver::resolver::choose_version package=root
   uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
        0.059061s   0ms DEBUG uv_resolver::resolver Adding direct dependency: pdoc3*
   uv_resolver::resolver::choose_version package=pdoc3
     uv_resolver::resolver::package_wait package_name=pdoc3
 uv_resolver::resolver::process_request request=Versions pdoc3
   uv_client::registry_client::simple_api package=pdoc3
     uv_client::cached_client::get_cacheable 
       uv_client::cached_client::read_and_parse_cache file=/tmp/.tmpUKz5XB/simple-v7/5ee1fc4f1a888b63/pdoc3.rkyv
 uv_resolver::resolver::process_request request=Prefetch pdoc3 *
 uv_client::cached_client::from_path_sync path="/tmp/.tmpUKz5XB/simple-v7/5ee1fc4f1a888b63/pdoc3.rkyv"
          0.060462s   1ms DEBUG uv_client::cached_client No cache entry for: https://custom.pypi.index/pypi/PyPi/simple/pdoc3/
       uv_client::cached_client::fresh_request url="https://custom.pypi.index/pypi/PyPi/simple/pdoc3/"
     uv_client::cached_client::get_cacheable 
       uv_client::cached_client::read_and_parse_cache file=/tmp/.tmpUKz5XB/simple-v7/pypi/pdoc3.rkyv
 uv_client::cached_client::from_path_sync path="/tmp/.tmpUKz5XB/simple-v7/pypi/pdoc3.rkyv"
          0.217432s   0ms DEBUG uv_client::cached_client No cache entry for: https://pypi.org/simple/pdoc3/
       uv_client::cached_client::fresh_request url="https://pypi.org/simple/pdoc3/"
       uv_client::cached_client::new_cache file=/tmp/.tmpUKz5XB/simple-v7/pypi/pdoc3.rkyv
       uv_client::registry_client::parse_simple_api package=pdoc3
   uv_resolver::version_map::from_metadata 
   uv_distribution::distribution_database::get_or_build_wheel_metadata dist=pdoc3==0.11.0
     uv_client::cached_client::get_serde 
       uv_client::cached_client::get_cacheable 
         uv_client::cached_client::read_and_parse_cache file=/tmp/.tmpUKz5XB/built-wheels-v3/pypi/pdoc3/0.11.0/revision.http
        0.234654s 175ms DEBUG uv_resolver::resolver Searching for a compatible version of pdoc3 (*)
        0.234711s 175ms DEBUG uv_resolver::resolver Selecting: pdoc3==0.11.0 (pdoc3-0.11.0.tar.gz)
 uv_client::cached_client::from_path_sync path="/tmp/.tmpUKz5XB/built-wheels-v3/pypi/pdoc3/0.11.0/revision.http"
   uv_resolver::resolver::get_dependencies package=pdoc3, version=0.11.0
     uv_resolver::resolver::distributions_wait version_id=pdoc3-0.11.0
            0.234939s   0ms DEBUG uv_client::cached_client No cache entry for: https://files.pythonhosted.org/packages/e1/4e/741d6dbd64934c4769c055dd6952e1c6d117a1a25236f633e68ea2d375c8/pdoc3-0.11.0.tar.gz
         uv_client::cached_client::fresh_request url="https://files.pythonhosted.org/packages/e1/4e/741d6dbd64934c4769c055dd6952e1c6d117a1a25236f633e68ea2d375c8/pdoc3-0.11.0.tar.gz"
         uv_client::cached_client::new_cache file=/tmp/.tmpUKz5XB/built-wheels-v3/pypi/pdoc3/0.11.0/revision.http
         uv_distribution::source::download source_dist=pdoc3==0.11.0
              0.280857s   0ms DEBUG uv_distribution::source Downloading source distribution: pdoc3==0.11.0
           uv_distribution::source::download_source_dist filename="pdoc3-0.11.0.tar.gz", source_dist=pdoc3==0.11.0
     uv_distribution::source::build_metadata dist=pdoc3==0.11.0
          0.307510s   0ms DEBUG uv_distribution::source Preparing metadata for: pdoc3==0.11.0
          0.307617s   0ms DEBUG uv_distribution::source No static `PKG-INFO` available for: pdoc3==0.11.0 (DynamicPkgInfo(UnsupportedMetadataVersion("2.1")))
          0.307663s   0ms DEBUG uv_distribution::source No static `pyproject.toml` available for: pdoc3==0.11.0 (MissingPyprojectToml)
       uv_dispatch::setup_build version_id="pdoc3==0.11.0", subdirectory=None
         uv_resolver::resolver::solve 
              0.308204s   0ms DEBUG uv_resolver::resolver Solving with target Python version 3.11.5
           uv_resolver::resolver::choose_version package=root
           uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
                0.308264s   0ms DEBUG uv_resolver::resolver Adding direct dependency: setuptools>=40.8.0
           uv_resolver::resolver::choose_version package=setuptools
             uv_resolver::resolver::package_wait package_name=setuptools
         uv_resolver::resolver::process_request request=Versions setuptools
           uv_client::registry_client::simple_api package=setuptools
             uv_client::cached_client::get_cacheable 
               uv_client::cached_client::read_and_parse_cache file=/tmp/.tmpUKz5XB/simple-v7/5ee1fc4f1a888b63/setuptools.rkyv
         uv_resolver::resolver::process_request request=Prefetch setuptools >=40.8.0
 uv_client::cached_client::from_path_sync path="/tmp/.tmpUKz5XB/simple-v7/5ee1fc4f1a888b63/setuptools.rkyv"
                  0.308474s   0ms DEBUG uv_client::cached_client No cache entry for: https://custom.pypi.index/pypi/PyPi/simple/setuptools/
               uv_client::cached_client::fresh_request url="https://custom.pypi.index/pypi/PyPi/simple/setuptools/"
               uv_client::cached_client::new_cache file=/tmp/.tmpUKz5XB/simple-v7/5ee1fc4f1a888b63/setuptools.rkyv
               uv_client::registry_client::parse_simple_api package=setuptools
                 uv_client::html::parse url=https://custom.pypi.index/pypi/PyPi/simple/setuptools/
             uv_client::cached_client::get_cacheable 
               uv_client::cached_client::read_and_parse_cache file=/tmp/.tmpUKz5XB/simple-v7/pypi/setuptools.rkyv
 uv_client::cached_client::from_path_sync path="/tmp/.tmpUKz5XB/simple-v7/pypi/setuptools.rkyv"
                  0.333120s   0ms DEBUG uv_client::cached_client No cache entry for: https://pypi.org/simple/setuptools/
               uv_client::cached_client::fresh_request url="https://pypi.org/simple/setuptools/"
               uv_client::cached_client::new_cache file=/tmp/.tmpUKz5XB/simple-v7/pypi/setuptools.rkyv
               uv_client::registry_client::parse_simple_api package=setuptools
           uv_resolver::version_map::from_metadata 
           uv_resolver::version_map::from_metadata 
           uv_distribution::distribution_database::get_or_build_wheel_metadata dist=setuptools==46.1.3
             uv_client::registry_client::wheel_metadata built_dist=setuptools==46.1.3
               uv_client::cached_client::get_serde 
                 uv_client::cached_client::get_cacheable 
                   uv_client::cached_client::read_and_parse_cache file=/tmp/.tmpUKz5XB/wheels-v1/index/5ee1fc4f1a888b63/setuptools/setuptools-46.1.3-py3-none-any.msgpack
                0.360786s  52ms DEBUG uv_resolver::resolver Searching for a compatible version of setuptools (>=40.8.0)
                0.360808s  52ms DEBUG uv_resolver::resolver Selecting: setuptools==46.1.3 (setuptools-46.1.3-py3-none-any.whl)
           uv_resolver::resolver::get_dependencies package=setuptools, version=46.1.3
@MattiasDC MattiasDC changed the title Index Strategy ignored for backend distributions Index Strategy ignored for distributions packages Jun 24, 2024
@charliermarsh charliermarsh self-assigned this Jun 24, 2024
@charliermarsh
Copy link
Member

Thank you, fixed in the next release.

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.

2 participants