-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed fix for #579 #588
Conversation
✅ Deploy Preview for conda-lock ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks a lot @ianpye for taking the initiative on this! I believe the proper fix is something more like: if self._mapping_url != value:
self._mapping_url = value
# Invalidate cache
try:
del self.pypi_lookup
except AttributeError:
pass
try:
del self.conda_lookup
except AttributeError:
pass This feature desperately needs a test to prevent a similar regression in the future. |
78b759e
to
5bcfaab
Compare
Thanks @maresb for your input, I have changed my code to reflect those suggestions that you made. |
Thanks @ianpye! I made a quick attempt to write a test, but I didn't manage to get it to work properly yet. Do you have any ideas for a brief test that ensures we are using the specified mapping? I was thinking we could create a mapping URL that swaps some dependency, and then the test checks inside the generated lockfile for that substituted dependency. |
Maybe I'm going the wrong way in my gist. I was thinking about constructing an example for |
The current test failure on macos is erroneous. See #591. |
@maresb What do you think about having 2 simple tests, one that uses the flag to point to the new mapping url that you provided and one that swaps the link to an invalid link. The 2nd test would check for failure and show that there is an attempt to connect to the link provided. |
a623ac5
to
e8cc744
Compare
e8cc744
to
c1e4d2f
Compare
Description
This PR proposes a simple fix to issue #579. Currently, the --pypi_to_conda_lookup_file flag does not work and produces an error whenever it is used, without checking the link first.
The removal of the following lines allows the flag to work as intended: