Skip to content

pixi list omits "Size" and "Source" for non-PyPI PyPI-style registries #5114

Closed

Description

@charliermarsh

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Given:

[workspace]
channels = [
    "conda-forge",
    "nodefaults",
]
authors = ["Charlie Marsh <[email protected]>"]
name = "pixi-project"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[pypi-dependencies]
iniconfig = "*"

[pypi-options]
index-url = "https://pypi.org/simple"

[dependencies]
python = ">=3.14.2,<3.15"

Then pixi install followed by pixi list yields:

bzip2            1.0.8       hd037594_8          122.1 KiB  conda  https://conda.anaconda.org/conda-forge/
ca-certificates  2025.11.12  hbd8a1cb_0          148.9 KiB  conda  https://conda.anaconda.org/conda-forge/
iniconfig        2.3.0                           17.9 KiB   pypi   iniconfig-2.3.0-py3-none-any.whl
libexpat         2.7.3       haf25636_0          66.2 KiB   conda  https://conda.anaconda.org/conda-forge/
libffi           3.5.2       he5f378a_0          39.3 KiB   conda  https://conda.anaconda.org/conda-forge/
liblzma          5.8.1       h39f12f2_2          90.1 KiB   conda  https://conda.anaconda.org/conda-forge/
libmpdec         4.0.0       h5505292_0          70.1 KiB   conda  https://conda.anaconda.org/conda-forge/
libsqlite        3.51.1      h9a5124b_0          885.1 KiB  conda  https://conda.anaconda.org/conda-forge/
libzlib          1.3.1       h8359307_2          45.3 KiB   conda  https://conda.anaconda.org/conda-forge/
ncurses          6.5         h5e97a16_3          778.3 KiB  conda  https://conda.anaconda.org/conda-forge/
openssl          3.6.0       h5503f6c_0          3 MiB      conda  https://conda.anaconda.org/conda-forge/
python           3.14.2      h40d2674_100_cp314  12.9 MiB   conda  https://conda.anaconda.org/conda-forge/
python_abi       3.14        8_cp314             6.8 KiB    conda  https://conda.anaconda.org/conda-forge/
readline         8.2         h1d1bf99_2          246.4 KiB  conda  https://conda.anaconda.org/conda-forge/
tk               8.6.13      h892fb3f_3          3 MiB      conda  https://conda.anaconda.org/conda-forge/
tzdata           2025b       h78e105d_0          120.1 KiB  conda  https://conda.anaconda.org/conda-forge/
zstd             1.5.7       hbf9d68e_6          423.3 KiB  conda  https://conda.anaconda.org/conda-forge/

However, if you change to any other index:

[workspace]
channels = [
    "conda-forge",
    "nodefaults",
]
authors = ["Charlie Marsh <[email protected]>"]
name = "pixi-project"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[pypi-dependencies]
iniconfig = "*"

[pypi-options]
index-url = "https://test.pypi.org/simple"

[dependencies]
python = ">=3.14.2,<3.15"

Then pixi install followed by pixi list yields:

bzip2            1.0.8       hd037594_8          122.1 KiB  conda  https://conda.anaconda.org/conda-forge/
ca-certificates  2025.11.12  hbd8a1cb_0          148.9 KiB  conda  https://conda.anaconda.org/conda-forge/
iniconfig        2.0.0                                      pypi
libexpat         2.7.3       haf25636_0          66.2 KiB   conda  https://conda.anaconda.org/conda-forge/
libffi           3.5.2       he5f378a_0          39.3 KiB   conda  https://conda.anaconda.org/conda-forge/
liblzma          5.8.1       h39f12f2_2          90.1 KiB   conda  https://conda.anaconda.org/conda-forge/
libmpdec         4.0.0       h5505292_0          70.1 KiB   conda  https://conda.anaconda.org/conda-forge/
libsqlite        3.51.1      h9a5124b_0          885.1 KiB  conda  https://conda.anaconda.org/conda-forge/
libzlib          1.3.1       h8359307_2          45.3 KiB   conda  https://conda.anaconda.org/conda-forge/
ncurses          6.5         h5e97a16_3          778.3 KiB  conda  https://conda.anaconda.org/conda-forge/
openssl          3.6.0       h5503f6c_0          3 MiB      conda  https://conda.anaconda.org/conda-forge/
python           3.14.2      h40d2674_100_cp314  12.9 MiB   conda  https://conda.anaconda.org/conda-forge/
python_abi       3.14        8_cp314             6.8 KiB    conda  https://conda.anaconda.org/conda-forge/
readline         8.2         h1d1bf99_2          246.4 KiB  conda  https://conda.anaconda.org/conda-forge/
tk               8.6.13      h892fb3f_3          3 MiB      conda  https://conda.anaconda.org/conda-forge/
tzdata           2025b       h78e105d_0          120.1 KiB  conda  https://conda.anaconda.org/conda-forge/
zstd             1.5.7       hbf9d68e_6          423.3 KiB  conda  https://conda.anaconda.org/conda-forge/

Notice that iniconfig does not have a size or source.

Issue description

No response

Expected behavior

That the size and source fields would be present for all indexes.

\cc @lerebear

Activity

  1. added
    bug
    on Dec 11, 2025
  2. prady0t commented on Dec 11, 2025

    @prady0t
    Contributor

    This has to do with how Rattler extracts info from PyPI packages,

    pub struct PypiPackageData {
        /// The name of the package.
        pub name: PackageName,
    
        /// The version of the package.
        pub version: pep440_rs::Version,
    
        /// The location of the package. This can be a URL or a path.
        pub location: UrlOrPath,
    
        /// Hashes of the file pointed to by `url`.
        pub hash: Option<PackageHashes>,
    
        /// A list of dependencies on other packages.
        pub requires_dist: Vec<Requirement>,
    
        /// The python version that this package requires.
        pub requires_python: Option<VersionSpecifiers>,
    
        /// Whether the projects should be installed in editable mode or not.
        pub editable: bool,
    }

    Whereas for a conda package:

    pub struct CondaBinaryData {  
        /// The package record.
        pub package_record: PackageRecord,
    
        /// The location of the package. This can be a URL or a local path.
        pub location: UrlOrPath,
    
        /// The filename of the package.
        pub file_name: String,
    
        /// The channel of the package.
        pub channel: Option<ChannelUrl>,
    }
    
    
    pub struct CondaSourceData {
        /// The package record.
        pub package_record: PackageRecord,
    
        /// The location of the package. This can be a URL or a local path.
        pub location: UrlOrPath,
    
        /// Conda-build variants used to disambiguate between multiple source packages
        /// at the same location. This is a map from variant name to variant value.
        /// Optional field added in lock file format V6 (made required in V7).
        pub variants: Option<BTreeMap<String, VariantValue>>,
    
        /// Package build source location for reproducible builds
        pub package_build_source: Option<PackageBuildSource>,
    
        /// The input hash of the package
        pub input: Option<InputHash>,
    
        /// Information about packages that should be built from source instead of binary.
        /// This maps from a normalized package name to location of the source.
        pub sources: BTreeMap<String, SourceLocation>,
    }
    
    
    
    pub struct PackageRecord {
        /// Optionally the architecture the package supports.
        pub arch: Option<String>,
    
        /// The build string of the package
        pub build: String,
    
        /// The build number of the package
        pub build_number: BuildNumber,
    
        /// Additional constraints on packages. `constrains` are different from
        /// `depends` in that packages specified in `depends` must be installed
        /// next to this package, whereas packages specified in `constrains` are
        /// not required to be installed, but if they are installed they must follow
        /// these constraints.
        #[serde(default, skip_serializing_if = "Vec::is_empty")]
        pub constrains: Vec<String>,
    
        /// Specification of packages this package depends on
        #[serde(default)]
        pub depends: Vec<String>,
    
        /// Specifications of optional or dependencies. These are dependencies that
        /// are only required if certain features are enabled or if certain
        /// conditions are met.
        pub experimental_extra_depends: BTreeMap<String, Vec<String>>,
    
        /// Features are a deprecated way to specify different feature sets for the
        /// conda solver. This is not supported anymore and should not be used.
        pub features: Option<String>,
    
        /// A deprecated md5 hash
        #[serde_as(as = "Option<SerializableHash::<rattler_digest::Md5>>")]
        pub legacy_bz2_md5: Option<Md5Hash>,
    
        /// A deprecated package archive size.
        pub legacy_bz2_size: Option<u64>,
    
        /// The specific license of the package
        pub license: Option<String>,
    
        /// The license family
        pub license_family: Option<String>,
    
        /// Optionally a MD5 hash of the package archive
        #[serde_as(as = "Option<SerializableHash::<rattler_digest::Md5>>")]
        pub md5: Option<Md5Hash>,
    
        /// The name of the package
        #[serde_as(deserialize_as = "DeserializeFromStrUnchecked")]
        pub name: PackageName,
    
        /// If this package is independent of architecture this field specifies in
        /// what way. See [`NoArchType`] for more information.
        #[serde(skip_serializing_if = "NoArchType::is_none")]
        pub noarch: NoArchType,
    
        /// Optionally the platform the package supports.
        pub platform: Option<String>,
    
        /// Package identifiers of packages that are equivalent to this package but
        /// from other ecosystems.
        #[serde(default, skip_serializing_if = "Option::is_none")]
        pub purls: Option<BTreeSet<PackageUrl>>,
    
        /// Optionally a path within the environment of the site-packages directory.
        /// This field is only present for python interpreter packages.
        pub python_site_packages_path: Option<String>,
    
        /// Run exports that are specified in the package.
        #[serde(default, skip_serializing_if = "Option::is_none")]
        pub run_exports: Option<RunExportsJson>,
    
        /// Optionally a SHA256 hash of the package archive
        #[serde_as(as = "Option<SerializableHash::<rattler_digest::Sha256>>")]
        pub sha256: Option<Sha256Hash>,
    
        /// Optionally the size of the package archive in bytes
        pub size: Option<u64>,
    
        /// The subdirectory where the package can be found
        pub subdir: String,
    
        /// The date this entry was created.
        pub timestamp: Option<crate::utils::TimestampMs>,
    
        pub track_features: Vec<String>,
    
        /// The version of the package
        pub version: VersionWithSource,
    
    }

    There is much more information available for conda packages, such as size and source info, that is missing from PyPI. It's very typical of PyPI packages to include less comprehensive metadata.

  3. baszalmstra commented on Dec 11, 2025

    @baszalmstra
    Contributor

    Thanks for the investigation @prady0t but that doesnt explain why we do have that information if the index is not specified.

  4. baszalmstra commented on Dec 11, 2025

    @baszalmstra
    Contributor

    @charliermarsh Does uv store the size and index in the lockfile?

  5. prady0t commented on Dec 11, 2025

    @prady0t
    Contributor

    Thanks for the investigation @prady0t but that doesnt explain why we do have that information if the index is not specified.

    Very true.

  6. zsol commented on Dec 11, 2025

    @zsol

    Does uv store the size and index in the lockfile?

    Yes, the registry is stored per package (in the source field), and the size is stored next to each artifact

  7. baszalmstra commented on Dec 11, 2025

    @baszalmstra
    Contributor

    It turns out we don't correctly restore the index when we read the package from the lock file. This is fine in most cases, but it incorrectly invalidates the cache. Since this is the only thing pixi list uses, it fails to report the size and index.

    I'll make a PR later today to fix this.

  8. self-assigned this
    on Dec 11, 2025
  9. hunger commented on Feb 24, 2026

    @hunger
    Contributor

    This is what the output looks like with my lockfile-v7 branch on top of rattler/pixi:

    Image

    torch is taken from a different index, but the output looks like the pypi packages around it for me.

    Double-checking this again: This seems to already work with a released version of pixi, without any of my lockfile-v7 changes applied. I think we can close this issue.

  10. baszalmstra commented on Feb 24, 2026

    @baszalmstra
    Contributor

    Make sure to clear caches before doing so!

  11. added a commit that references this issue on Feb 27, 2026
    bdb8da4
  12. hunger commented on Feb 27, 2026

    @hunger
    Contributor

    bdb8da4 addresses this issue.

    It sits on top of quite a few changes needed to adapt pixi to use rattler from the feature/lockfile-v7 branch. Not sure how to set this up for proper review.

  13. added 3 commits that reference this issue on Mar 4, 2026
    0d36744
    af0ffc3
    69731e5
  14. 5 remaining items

  15. added 3 commits that reference this issue on Mar 10, 2026
    12e559f
    fb8a6c0
    fe6c823
  16. added a commit that references this issue on Mar 11, 2026
    6d14c58
  17. added 2 commits that reference this issue on Mar 12, 2026
    9e6e856
    89e9cee
  18. added a commit that references this issue on Mar 18, 2026
    7cc05ca
  19. added 2 commits that reference this issue on Mar 20, 2026
    6c3c680
    d022c60
  20. added 2 commits that reference this issue on Apr 9, 2026
    2487469
    99666e6
  21. added a commit that references this issue on Apr 13, 2026
    6cf584e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions