Conversation
1ff3ad1 to
a634524
Compare
| :param fetch: Fetch complete package records for installation. Environments | ||
| created with ``fetch=False`` must only be passed to lockfile exporters. |
There was a problem hiding this comment.
I think it's a bit of a warning sign that we're defining an invariant in the comments here. Once we've returned this Environment object, we don't necessarily have a way of tracking of how we created it and can use it unless we're tracking that at the caller level.
Have you thought through the implications of this and possible ways around it? I know it's not as simple as adding a new property to Environment (that's probably not the best place for it either). I also wouldn't want to change the function signature here either 🤔.
This isn't a show stopper for me. Just want to make sure we're thinking through the implications of this sort of API design.
| ### Enhancements | ||
|
|
||
| * Add an export mode to `env_for()` so callers can export lockfiles without downloading package artifacts. | ||
|
|
||
| ### Bug fixes | ||
|
|
||
| * Align the conda package runtime requirement with the EnvironmentFormat API used by the plugin. |
There was a problem hiding this comment.
| ### Enhancements | |
| * Add an export mode to `env_for()` so callers can export lockfiles without downloading package artifacts. | |
| ### Bug fixes | |
| * Align the conda package runtime requirement with the EnvironmentFormat API used by the plugin. | |
| ### Enhancements | |
| * Add an export mode to `env_for()` so callers can export lockfiles without downloading package artifacts. (#161) | |
| ### Bug fixes | |
| * Align the conda package runtime requirement with the EnvironmentFormat API used by the plugin. (#161) |
| None, | ||
| ) | ||
| if pkg is None: | ||
| raise CondaValueError( |
There was a problem hiding this comment.
This is bugfix that deserves its news item.
| if conda_pypi_channel and ref.url.startswith(PYTHONHOSTED_URL_PREFIX): | ||
| overrides["channel"] = conda_pypi_channel | ||
| if not fetch: | ||
| overrides.update(build="py3_none_any_0", subdir="noarch") |
There was a problem hiding this comment.
Are we sure these are always true? Do pypi-converted packages exhibit build numbers (e.g. the converter bumps them after a change in the implementation or a 2nd run)? You should also double check that the subdir is noarch because maybe in the future this is also shipping non-noarch packages.
| are filled from the package cache. | ||
|
|
||
| When ``fetch`` is false, package artifacts and cache entries are not read. | ||
| The metadata-only records use zero for the required ``build_number`` field |
a634524 to
a88a385
Compare
26529ff to
bb2b3df
Compare
Description
Add an atomic
transcode()method to the conda-lock v1 and rattler-lock v6 loaders. It reconstructs export-only records from package URLs and embedded metadata, renders the selected lockfile format, and returns serialized content without reading the package cache or downloading package archives.The existing
envandenv_for()paths remain fetch-backed so installation callers still receive complete package metadata. Invalid URLs, malformed wheel filenames, unsupported wheel tags, dangling or mismatched rattler references, and unsupported source package types produce controlled conda errors.Build on #175 so embedded
build_numbervalues, including zero, survive rattler-lock v6 transcoding. No-fetch records retain the existing zero default when the source omits the field. Installation loaders continue to use cached package metadata for omitted fields. Conversion emits the metadata supported by the selected output format, and conda-lock v1 has no standalone build-number field.Use the public
installerwheel filename parser and conda-pypi's current pure-wheel identity. Accept the standardmanager: pipvalue in conda-lock v1 and align the conda runtime requirement with theEnvironmentFormatAPI used by the plugin.This lets conda-presto transcode uploaded lockfiles without package downloads or exposing incomplete
Environmentobjects to callers.Closes #179. Related to #176.
Checklist - did you ...
newsdirectory for the next release's release notes?