Skip to content

Replace vinca's versioning, pinning, and package lookup logic with py-rattler's - #196

Merged
Tobias-Fischer merged 3 commits into
RoboStack:masterfrom
EzraBrooks:py-rattler
Nov 10, 2026
Merged

Tobias-Fischer merged 3 commits into
RoboStack:masterfrom
EzraBrooks:py-rattler

Conversation

@EzraBrooks

Copy link
Copy Markdown
Contributor

No description provided.

@EzraBrooks

Copy link
Copy Markdown
Contributor Author

this appears to have fixed a bug along the way with version ordering:

conda-smithy compares pins with conda’s version rules, but vinca’s port used PEP 440, which can’t parse values like 3.9.* *_cpython. Those fell back to string comparison, which sorted Python 3.9 above 3.10. There’s a new test for that case. vinca-migrate’s hand-written version parser is replaced too, and the packaging dependency is gone.

@Tobias-Fischer Tobias-Fischer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thank you!

@EzraBrooks
EzraBrooks marked this pull request as ready for review November 9, 2026 22:02
@Tobias-Fischer

Copy link
Copy Markdown
Contributor

This conflicts now @EzraBrooks

get_repodata fetched <channel>/<platform>/repodata.json by hand: its own
protocol handling, an MD5-keyed cache in the working directory with a fixed
27-hour lifetime, and callers that each merged "packages" and
"packages.conda" themselves. get_channel_records reads the channel with
rattler.fetch_repo_data instead, which caches by HTTP semantics and handles
zstd-compressed repodata, and returns the records of both artifact types.

As before, a channel without (valid) repodata for the platform has no records
and an unreachable one raises. vinca-migrate now also sees .conda artifacts.
The newest conda-forge-pinning was found by downloading and decompressing
conda-forge's noarch current_repodata.json.zst, an exact version through
anaconda.org's release API, and the artifact was unpacked by hand (.conda:
zip of tar.zst; .tar.bz2). A rattler.Gateway query for the package reads
only its shard of conda-forge's repodata, and
rattler.package_streaming.download_and_extract unpacks either format, so
vinca no longer depends on zstandard.
The CFEP-9 variant algebra, adapted from conda-smithy, compares pins with
conda's VersionOrder upstream but with PEP 440's packaging.Version here. PEP
440 can't parse many pins, which then compare as strings: "3.9.* *_cpython"
sorted after "3.10.* *_cpython". vinca-migrate parsed versions by hand
instead. rattler.Version orders both as conda does, and vinca no longer
depends on packaging.
@EzraBrooks

Copy link
Copy Markdown
Contributor Author

rebased and resolved!

@Tobias-Fischer
Tobias-Fischer merged commit 6022f01 into RoboStack:master Nov 10, 2026
3 checks passed
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 this pull request may close these issues.

2 participants