conda / conda-lock

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

Refactor lookup._LookupLoader #364

Closed maresb closed 1 year ago

maresb commented 1 year ago

Locally I see test failures in test_choose_wheel due to the assertion in conda_lookup() failing. It seems to result from flaky caching logic. Using python>=3.8's functools, we can get rid of most of the boilerplate. In a subsequent PR we could also remove the module-level boilerplate.

In short, _LookupLoader was implementing a bunch of caching functionality by hand. This simply uses modern Python and functools to eliminate all that boilerplate.

netlify[bot] commented 1 year ago

Deploy Preview for conda-lock ready!

Name Link
Latest commit b73f1a58a42ede27f4fd6d4456d2c404897075ed
Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/6400b79b73a03b00087274a8
Deploy Preview https://deploy-preview-364--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

Here is an instance in the CI of the failure I was seeing: https://github.com/conda/conda-lock/actions/runs/4271730580/jobs/7436402534

maresb commented 1 year ago

@mariusvniekerk this occurs an order-of-magnitude less than the md5 keyerror, but this still occasionally snags up the CI.