Skip to content

Update repodata to v3 syntax#273

Draft
danyeaw wants to merge 5 commits intoconda:mainfrom
danyeaw:v3-syntax
Draft

Update repodata to v3 syntax#273
danyeaw wants to merge 5 commits intoconda:mainfrom
danyeaw:v3-syntax

Conversation

@danyeaw
Copy link
Member

@danyeaw danyeaw commented Mar 12, 2026

Description

Blocked by conda-incubator/conda-rattler-solver#46.

Closes #247. In py-rattler 0.23.0, they updated support for the v3 repodata with conditionals/extras which is defined in:

  1. CEP XXXX: Conditional dependencies, extras and flags ceps#111
  2. CEP XXXX: A backwards-compatible repodata update strategy ceps#146

Currently the conditional/extras CEP draft defines the extras field to be called extras. py-rattler is using the field depends_extra, so I am going with that to match the implementation and I posted about this on Zulip.

This also enabled usage of conditional markers which requires quite a lot of conversion:

  • Convert Python markers to python... MatchSpec fragments, including python_version not in "x, y" -> (python!=x and python!=y).
  • Convert platform/os markers to virtual packages when feasible (__win, __linux, __osx, __unix).
  • Keep extras in extra_depends, with remaining non-extra marker logic encoded via [when="..."].
  • Drop unsupported marker dimensions (e.g. interpreter/machine-specific variants) including platform_release, platform_version, implementation_version. These markers are rarely used and difficult to map to equivalents.

One thing I'm not sure about is that I am using a private _marker method from the packaging library in one place. I tried to keep the usage isolated to one area, and it is for only test metadata generation. I think this is much better than using regex to parse the markers.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@danyeaw
Copy link
Member Author

danyeaw commented Mar 13, 2026

Hey @baszalmstra, I know you have spent some time thinking about conditional marker conversion. Would you mind please taking a quick peak at the generate_noarch_wheel_repodata script and make sure something doesn't stand out for you?

@baszalmstra
Copy link

I think the best way to test this is to have a large set of conditions/requirements convert them to conda requirements and snapshot them. That makes it easy to see what the conversion will do in many different cases, whether it makes, and whether it regressed. (You might already have that, I might have missed it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

Updated repodata v3 support

3 participants