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
Do not raise when accessing the metadata of editable packages #5461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this doesn't solve the issue, just the crash, but the remote won't be removed for the editable reference (has to be checked in the test). I understand from the latest comment of @memsharded that the idea is to cheat the cache to consider all packages "cache" packages, but only temporary. But anyway, the remove references have to be cleaned.
ok, now I got it. The last conclusion describing the implementation was not clear to me on what to do. Thanks for the clarification. |
|
||
def rename(self, remote_name, new_remote_name): | ||
remotes = self.load_remotes() | ||
remotes.rename(remote_name, new_remote_name) | ||
with self._editables_metadata_from_cache(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to exract method? similar code repeats 5 times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO that should be done in a refactor PR, not in this one. I don't refuse to make the changes here but I would like to wait for other reviews before. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
I would put this new contextmanager closer to the ...and I would suggest (for a different PR, once this one is done) merging both functions into a context manager that accepts an argument with the dictionary to use (the overriding one for the workspaces, and an empty one for this use case). |
Co-Authored-By: Javier G. Sogo <jgsogo@gmail.com>
Changelog: Bugfix: Do not raise when accessing the metadata of editable packages
Docs: omit
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.