conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
467 stars 102 forks source link

Fix import in _vendor #406

Closed epassaro closed 1 year ago

epassaro commented 1 year ago

Description

Found an incorrect import that breaks conda-lock when toolz is not installed.

netlify[bot] commented 1 year ago

Deploy Preview for conda-lock ready!

Name Link
Latest commit ad657eb4065c135d6d01f37fe29015d66095e90b
Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/64663114a894da0008665f95
Deploy Preview https://deploy-preview-406--conda-lock.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

maresb commented 1 year ago

Thanks, but I'm a bit confused about the context. Toolz is a dependency, so how would someone even get into the situation of running conda-lock without toolz being installed?

epassaro commented 1 year ago

Thanks, but I'm a bit confused about the context. Toolz is a dependency, so how would someone even get into the situation of running conda-lock without toolz being installed?

I was doing a weird experiment, trying to "pack" conda-lock with pyinstaller, and step up with this issue. I abandoned the idea quickly, but I thought this should be fixed anyways.

You can check this behavior by force removing toolz from the environment.

maresb commented 1 year ago

Looks like this was already done upstream in https://github.com/conda/conda/pull/12016, so next time we revendor conda, that will get pulled in.

Unless there's a really compelling reason I'd opt against merging this, because the point of vendoring is that you delegate maintenance to upstream, and this would bring us out-of-sync with the vendored version. A weird experiment isn't so compelling.

By the way, taking a wild and likely incorrect guess about your motivation for trying pyinstaller, if it was to decouple conda-lock from your active environment due to dependency conflicts, then I'd recommend installing conda-lock via condax or pipx.

epassaro commented 1 year ago

Thank you! @maresb