Skip to content

Only import from conda if current_repodata is generated#245

Open
dholth wants to merge 5 commits into
mainfrom
244-reduce-conda-dependency
Open

Only import from conda if current_repodata is generated#245
dholth wants to merge 5 commits into
mainfrom
244-reduce-conda-dependency

Conversation

@dholth
Copy link
Copy Markdown
Contributor

@dholth dholth commented Jan 29, 2026

Description

Reduce or remove conda dependencies.

Fix #244

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?

@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Jan 29, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jan 29, 2026
@dholth dholth changed the title Reduce conda dependencies. Reduce conda dependency to current_repodata only. Jan 29, 2026
@dholth dholth changed the title Reduce conda dependency to current_repodata only. Only import from conda if current_repodata is generated. Jan 29, 2026
Comment thread conda_index/index/__init__.py Outdated

self._write_repodata(
subdir,
current_repodata,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If --current-repodata is passed then check for "import conda"; ask user to install conda or pass --no-current-repodata. Should happen in the CLI entry point before this is called.

@dholth dholth changed the title Only import from conda if current_repodata is generated. Remove locks; only import from conda if current_repodata is generated Feb 2, 2026
@dholth dholth marked this pull request as ready for review February 2, 2026 16:25
@dholth dholth self-assigned this Feb 2, 2026
@dholth dholth requested a review from jezdez February 2, 2026 18:05
@dholth dholth moved this from 🆕 New to 👀 In Review in 🔎 Review Feb 4, 2026
@dholth dholth moved this from Sorting ⚙️ to In review 🔍 in conda Roadmap and Sprint Planning Feb 4, 2026
Copy link
Copy Markdown
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

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

I don't agree with this approach or the core of the ticket it tries to close; it puts a maintenance burden on conda-index for almost no gain, which we already struggle with.

The better strategy is the one we've been following but not sufficiently executed on since conda-index was maintained underresourced and independent from the conda release cycle: conda is the bottom of the well, implementing core primitives, which conda-index should be importing using the Python import system.

If new features of conda-index require new versions of conda, it should bump up the lower versions of conda to the version of the required feature.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not in favor of this since versions are quite possibly the most important part to reuse from conda and it puts maintenance burden to keep this in sync, for which I have little confidence we'll be able to afford

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is used to generate another optional file channeldata. The indexer uses version comparison to choose the newest version of a package from a random subdir, as a representative for that package in channeldata.json.

@dholth
Copy link
Copy Markdown
Contributor Author

dholth commented Feb 5, 2026

@jezdez #257 separates the locking concern from the vendoring concern.

@dholth dholth force-pushed the 244-reduce-conda-dependency branch from d26c3ed to 6c4ec81 Compare February 5, 2026 13:30
@dholth dholth changed the title Remove locks; only import from conda if current_repodata is generated Only import from conda if current_repodata is generated Feb 5, 2026
@dholth
Copy link
Copy Markdown
Contributor Author

dholth commented Feb 5, 2026

I don't agree with this approach or the core of the ticket it tries to close; it puts a maintenance burden on conda-index for almost no gain, which we already struggle with.

The better strategy is the one we've been following but not sufficiently executed on since conda-index was maintained underresourced and independent from the conda release cycle: conda is the bottom of the well, implementing core primitives, which conda-index should be importing using the Python import system.

This premise is not correct. The conda dependency creates the maintenance burden, otherwise it's easy enough to add needed features to conda-index. By removing its conda dependency, conda-index can be a non-circular dependency of other projects; when a new conda-index feature is needed then conda can request it from conda-index.

We have also made progress updating conda's CI to require that the conda developer updates a set of dependent projects before a breaking change can be merged into conda; conda's CI started doing this for conda-build to deal with this exact issue. This moves the work to the right place, to the person who's enacting a deprecation in conda, instead of to the dependent projects that are working on something unrelated and are not familiar with that deprecation.

If new features of conda-index require new versions of conda, it should bump up the lower versions of conda to the version of the required feature.

When this is completed conda-index does not require any version of conda; it would continue to work in perpetuity until a real additional feature and not a deprecation workaround was required. This reduces the total amount of work required to maintain the conda ecosystem. To deal with today's churn, conda-index would set a maximum version of conda, not a minimum.

To me the most questionable part of this PR is the list of subdirs. The version comparison algorithm and the strings ".conda" and ".tar.bz2" are very unlikely to change in a way that is relevant to conda-index. It might be a good idea to discover the subdirs in a different way; this would also help users who wanted to bring up new platforms.

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

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 👀 In Review

Development

Successfully merging this pull request may close these issues.

Remove conda dependency

4 participants