uv icon indicating copy to clipboard operation
uv copied to clipboard

uv sync fails to install remote private dependencies when poetry is involved

Open Eyal-Shalev opened this issue 1 year ago • 8 comments

UV Version: current main - 6dc05a Platform: MacOS 14.3.1

TL;DR

package-a is managed by uv with private index-url defined in pyproject.toml.
package-b is managed by poetry.
package-a depends on package-b that depends on ujson.

error: Failed to prepare distributions
  Caused by: Failed to fetch wheel: ujson==5.10.0
  Caused by: HTTP status client error (401 Unauthorized) for url (https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl)

Files

package-a/pyproject.toml

[project]
name = "package-a"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = ["package-b"]

[tool.uv]
index-url = "https://[email protected]/pypi/bar/simple/"
keyring-provider = "subprocess"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.uv.sources]
package-b = { path = "../package-b" }

package-b/pyproject.toml

[tool.poetry]
name = "package-b"
version = "0.1.0"
description = ""

[tool.poetry.dependencies]
python = "^3.12"
package-c = { path = "../package-c", develop = true }
ujson = "^5.10.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

package-a/uv.lock (result of running uv lock)

version = 1
requires-python = ">=3.12"

[[package]]
name = "orjson"
version = "3.10.7"
source = { registry = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/" }
sdist = { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7.tar.gz", hash = "sha256:75ef0640403f945f3a1f9f6400686560dbfb0fb5b16589ad62cd477043c4eee3" }
wheels = [
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:44a96f2d4c3af51bfac6bc4ef7b182aa33f2f054fd7f34cc0ee9a320d051d41f" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76ac14cd57df0572453543f8f2575e2d01ae9e790c21f57627803f5e79b0d3c3" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bdbb61dcc365dd9be94e8f7df91975edc9364d6a78c8f7adb69c1cdff318ec93" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b48b3db6bb6e0a08fa8c83b47bc169623f801e5cc4f24442ab2b6617da3b5313" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23820a1563a1d386414fef15c249040042b8e5d07b40ab3fe3efbfbbcbcb8864" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0c6a008e91d10a2564edbb6ee5069a9e66df3fbe11c9a005cb411f441fd2c09" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d352ee8ac1926d6193f602cbe36b1643bbd1bbcb25e3c1a657a4390f3000c9a5" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d2d9f990623f15c0ae7ac608103c33dfe1486d2ed974ac3f40b693bad1a22a7b" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-none-win32.whl", hash = "sha256:7c4c17f8157bd520cdb7195f75ddbd31671997cbe10aee559c2d613592e7d7eb" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp312-none-win_amd64.whl", hash = "sha256:1d9c0e733e02ada3ed6098a10a8ee0052dd55774de3d9110d29868d24b17faa1" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:77d325ed866876c0fa6492598ec01fe30e803272a6e8b10e992288b009cbe149" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ea2c232deedcb605e853ae1db2cc94f7390ac776743b699b50b071b02bea6fe" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3dcfbede6737fdbef3ce9c37af3fb6142e8e1ebc10336daa05872bfb1d87839c" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:11748c135f281203f4ee695b7f80bb1358a82a63905f9f0b794769483ea854ad" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp313-none-win32.whl", hash = "sha256:a7e19150d215c7a13f39eb787d84db274298d3f83d85463e61d277bbd7f401d2" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/orjson/3.10.7/orjson-3.10.7-cp313-none-win_amd64.whl", hash = "sha256:eef44224729e9525d5261cc8d28d6b11cafc90e6bd0be2157bde69a52ec83024" },
]

[[package]]
name = "package-a"
version = "0.1.0"
source = { editable = "." }
dependencies = [
    { name = "package-b" },
]

[package.metadata]
requires-dist = [{ name = "package-b", directory = "../package-b" }]

[[package]]
name = "package-b"
version = "0.1.0"
source = { directory = "../package-b" }
dependencies = [
    { name = "package-c" },
    { name = "ujson" },
]

[package.metadata]
requires-dist = [
    { name = "package-c", directory = "/private/tmp/example/package-c" },
    { name = "ujson", specifier = ">=5.10.0,<6.0.0" },
]

[[package]]
name = "package-c"
version = "0.1.0"
source = { directory = "/private/tmp/example/package-c" }
dependencies = [
    { name = "orjson" },
]

[package.metadata]
requires-dist = [{ name = "orjson", specifier = ">=3.10.7" }]

[[package]]
name = "ujson"
version = "5.10.0"
source = { registry = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/" }
sdist = { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0.tar.gz", hash = "sha256:b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1" }
wheels = [
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:98ba15d8cbc481ce55695beee9f063189dce91a4b08bc1d03e7f0152cd4bbdd5" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9d2edbf1556e4f56e50fab7d8ff993dbad7f54bac68eacdd27a8f55f433578e" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6627029ae4f52d0e1a2451768c2c37c0c814ffc04f796eb36244cf16b8e57043" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8ccb77b3e40b151e20519c6ae6d89bfe3f4c14e8e210d910287f778368bb3d1" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3caf9cd64abfeb11a3b661329085c5e167abbe15256b3b68cb5d914ba7396f3" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6e32abdce572e3a8c3d02c886c704a38a1b015a1fb858004e03d20ca7cecbb21" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a65b6af4d903103ee7b6f4f5b85f1bfd0c90ba4eeac6421aae436c9988aa64a2" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:604a046d966457b6cdcacc5aa2ec5314f0e8c42bae52842c1e6fa02ea4bda42e" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-win32.whl", hash = "sha256:6dea1c8b4fc921bf78a8ff00bbd2bfe166345f5536c510671bccececb187c80e" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:38665e7d8290188b1e0d57d584eb8110951a9591363316dd41cf8686ab1d0abc" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:618efd84dc1acbd6bff8eaa736bb6c074bfa8b8a98f55b61c38d4ca2c1f7f287" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38d5d36b4aedfe81dfe251f76c0467399d575d1395a1755de391e58985ab1c2e" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67079b1f9fb29ed9a2914acf4ef6c02844b3153913eb735d4bf287ee1db6e557" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7d0e0ceeb8fe2468c70ec0c37b439dd554e2aa539a8a56365fd761edb418988" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:59e02cd37bc7c44d587a0ba45347cc815fb7a5fe48de16bf05caa5f7d0d2e816" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a890b706b64e0065f02577bf6d8ca3b66c11a5e81fb75d757233a38c07a1f20" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:621e34b4632c740ecb491efc7f1fcb4f74b48ddb55e65221995e74e2d00bbff0" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b9500e61fce0cfc86168b248104e954fead61f9be213087153d272e817ec7b4f" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-win32.whl", hash = "sha256:4c4fc16f11ac1612f05b6f5781b384716719547e142cfd67b65d035bd85af165" },
    { url = "https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:4573fd1695932d4f619928fd09d5d03d917274381649ade4328091ceca175539" },
]

Commands

cd package-a
uv lock
uv sync --locked

Output

    0.000114s DEBUG uv uv 0.2.37
warning: `uv sync` is experimental and may change without warning
    0.000512s DEBUG uv_workspace::workspace Found project root: `/private/tmp/example/package-a`
    0.000891s DEBUG uv_workspace::workspace No workspace root found, using project root
    0.001409s DEBUG uv::commands::project The virtual environment's Python version satisfies `Python >=3.12`
 uv_client::linehaul::linehaul
    0.005246s DEBUG uv_client::base_client Using request timeout of 30s
 uv_resolver::flat_index::from_entries
 uv_distribution::distribution_database::get_or_build_wheel_metadata dist=package-a @ file:///private/tmp/example/package-a
    0.007833s DEBUG uv_fs Acquired lock for `$HOME/Library/Caches/uv/built-wheels-v3/editable/f768222d742b1d88`
    0.008111s   0ms DEBUG uv_distribution::source Using cached metadata for: package-a @ file:///private/tmp/example/package-a
    0.008474s   0ms DEBUG uv_workspace::workspace No workspace root found, using project root
warning: `uv.sources` is experimental and may change without warning
 uv_distribution::distribution_database::get_or_build_wheel_metadata dist=package-b @ file:///private/tmp/example/package-b
    0.008848s DEBUG uv_fs Acquired lock for `$HOME/Library/Caches/uv/built-wheels-v3/path/41ba5dd297bfaa78`
    0.009393s   0ms DEBUG uv_distribution::source Using cached metadata for: package-b @ file:///private/tmp/example/package-b
 uv_distribution::distribution_database::get_or_build_wheel_metadata dist=package-c @ file:///private/tmp/example/package-c
    0.009863s DEBUG uv_fs Acquired lock for `$HOME/Library/Caches/uv/built-wheels-v3/path/cad22edc9f2e252e`
    0.010041s   0ms DEBUG uv_distribution::source Using cached metadata for: package-c @ file:///private/tmp/example/package-c
    0.010269s   0ms DEBUG uv_workspace::workspace No workspace root found, using project root
    0.010353s DEBUG uv::commands::project::lock Existing `uv.lock` satisfies workspace requirements
Resolved 5 packages in 5ms
 uv_client::linehaul::linehaul
    0.012922s DEBUG uv_client::base_client Using request timeout of 30s
 uv_resolver::flat_index::from_entries
    0.014768s DEBUG uv_installer::plan Requirement already cached: orjson==3.10.7
    0.014920s DEBUG uv_installer::plan Identified uncached requirement: package-a @ file:///private/tmp/example/package-a
    0.015025s DEBUG uv_installer::plan Identified uncached requirement: package-b @ file:///private/tmp/example/package-b
    0.015174s DEBUG uv_installer::plan Directory source requirement already cached: package-c==0.1.0 (from file:///private/tmp/example/package-c)
    0.015321s DEBUG uv_installer::plan Identified uncached requirement: ujson==5.10.0
 uv_installer::preparer::prepare total=3
   uv_installer::preparer::get_wheel name=package-a @ file:///private/tmp/example/package-a, size=None, url=""
     uv_distribution::distribution_database::get_or_build_wheel dist=package-a @ file:///private/tmp/example/package-a
   uv_installer::preparer::get_wheel name=package-b @ file:///private/tmp/example/package-b, size=None, url=""
     uv_distribution::distribution_database::get_or_build_wheel dist=package-b @ file:///private/tmp/example/package-b
    0.015732s DEBUG uv_fs Acquired lock for `$HOME/Library/Caches/uv/built-wheels-v3/editable/f768222d742b1d88`
    0.015779s DEBUG uv_fs Acquired lock for `$HOME/Library/Caches/uv/built-wheels-v3/path/41ba5dd297bfaa78`
   uv_installer::preparer::get_wheel name=ujson==5.10.0, size=None, url="https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl"
     uv_distribution::distribution_database::get_or_build_wheel dist=ujson==5.10.0
       uv_client::cached_client::get_serde
         uv_client::cached_client::get_cacheable
           uv_client::cached_client::read_and_parse_cache file=$HOME/Library/Caches/uv/wheels-v1/index/4badb35c1cd49698/ujson/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.http
 uv_client::cached_client::from_path_sync path="$HOME/Library/Caches/uv/wheels-v1/index/4badb35c1cd49698/ujson/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.http"
       uv_distribution::source::build_distribution dist=package-a @ file:///private/tmp/example/package-a
          0.016201s   0ms DEBUG uv_distribution::source Building: package-a @ file:///private/tmp/example/package-a
       uv_distribution::source::build_distribution dist=package-b @ file:///private/tmp/example/package-b
          0.016354s   0ms DEBUG uv_distribution::source Building: package-b @ file:///private/tmp/example/package-b
            0.016411s   0ms DEBUG uv_client::cached_client No cache entry for: https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl
           uv_client::cached_client::fresh_request url="https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl"
         uv_dispatch::setup_build version_id="package-a @ file:///private/tmp/example/package-a", subdirectory=None
            0.027821s  11ms INFO uv_virtualenv::virtualenv Ignoring empty directory
         uv_dispatch::setup_build version_id="package-b @ file:///private/tmp/example/package-b", subdirectory=None
 uv_resolver::resolver::solve
    0.045316s   0ms DEBUG uv_resolver::resolver Solving with installed Python version: 3.12.4
   uv_resolver::resolver::choose_version package=root
   uv_resolver::resolver::get_dependencies_forking package=root, version=0a0.dev0
     uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
    0.045627s   0ms DEBUG uv_resolver::resolver Adding direct dependency: setuptools*
   uv_resolver::resolver::choose_version package=setuptools
            0.045908s   0ms INFO uv_virtualenv::virtualenv Ignoring empty directory
 uv_resolver::resolver::solve
    0.065162s   0ms DEBUG uv_resolver::resolver Solving with installed Python version: 3.12.4
   uv_resolver::resolver::choose_version package=root
   uv_resolver::resolver::get_dependencies_forking package=root, version=0a0.dev0
     uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
    0.065388s   0ms DEBUG uv_resolver::resolver Adding direct dependency: poetry-core*
           uv_resolver::resolver::process_request request=Versions setuptools
   uv_resolver::resolver::choose_version package=poetry-core
             uv_client::registry_client::simple_api package=setuptools
               uv_client::cached_client::get_cacheable
                 uv_client::cached_client::read_and_parse_cache file=$HOME/Library/Caches/uv/simple-v12/index/4badb35c1cd49698/setuptools.rkyv
 uv_client::cached_client::from_path_sync path="$HOME/Library/Caches/uv/simple-v12/index/4badb35c1cd49698/setuptools.rkyv"
           uv_resolver::resolver::process_request request=Prefetch setuptools *
           uv_resolver::resolver::process_request request=Versions poetry-core
             uv_client::registry_client::simple_api package=poetry-core
               uv_client::cached_client::get_cacheable
                 uv_client::cached_client::read_and_parse_cache file=$HOME/Library/Caches/uv/simple-v12/index/4badb35c1cd49698/poetry-core.rkyv
 uv_client::cached_client::from_path_sync path="$HOME/Library/Caches/uv/simple-v12/index/4badb35c1cd49698/poetry-core.rkyv"
           uv_resolver::resolver::process_request request=Prefetch poetry-core *
                  0.065975s   0ms DEBUG uv_client::cached_client Found stale response for: https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/
                  0.065993s   0ms DEBUG uv_client::cached_client Sending revalidation request for: https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/
                 uv_client::cached_client::revalidation_request url="https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/"
                    0.066081s   0ms DEBUG uv_auth::middleware Checking keyring for credentials for aws@https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/
                   uv_auth::keyring::fetch url=https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/
                     uv_auth::keyring::fetch_subprocess service_name="https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/", username="aws"
                  0.068696s   2ms DEBUG uv_client::cached_client Found stale response for: https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/poetry-core/
                  0.068714s   2ms DEBUG uv_client::cached_client Sending revalidation request for: https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/poetry-core/
                 uv_client::cached_client::revalidation_request url="https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/poetry-core/"
                     uv_auth::keyring::fetch_subprocess service_name="foo-012345678901.d.codeartifact.us-east-1.amazonaws.com", username="aws"
                    0.363706s 297ms DEBUG uv_auth::middleware Found credentials in keyring for https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/setuptools/
              0.536341s 519ms DEBUG uv_auth::middleware Skipping keyring lookup for https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl with no username
error: Failed to prepare distributions
  Caused by: Failed to fetch wheel: ujson==5.10.0
  Caused by: HTTP status client error (401 Unauthorized) for url (https://foo-012345678901.d.codeartifact.us-east-1.amazonaws.com/pypi/bar/simple/ujson/5.10.0/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl)

Eyal-Shalev avatar Aug 20 '24 05:08 Eyal-Shalev

How are you providing the credentials for your registry? Is aws@ above a placeholder, and you're using a full auth token in practice?

charliermarsh avatar Aug 20 '24 13:08 charliermarsh

Relatedly, are the contents of package-c relevant?

charliermarsh avatar Aug 20 '24 13:08 charliermarsh

I'm using keyring for the credentials, and the aws username is per the documentation.

Forgot to mention that the sync works if I pass the --reinstall flag.

Eyal-Shalev avatar Aug 20 '24 13:08 Eyal-Shalev

Relatedly, are the contents of package-c relevant?

There isn't any actual code in any of the packages. Just empty __init__.py files.

Eyal-Shalev avatar Aug 20 '24 13:08 Eyal-Shalev

Thanks!

charliermarsh avatar Aug 20 '24 13:08 charliermarsh

Thanks, this is a real bug. We need to find a way to re-attach the username.

charliermarsh avatar Aug 20 '24 14:08 charliermarsh

Very weird that the username is present in some of the requests.

zanieb avatar Aug 20 '24 14:08 zanieb

This bug still exists on 0.4.20

I had to check because there were so many releases since I opened this ticket.

Eyal-Shalev avatar Oct 08 '24 21:10 Eyal-Shalev