-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Slash-normalize PrefixRecord.files for conda list
#14523
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #14523 will not alter performanceComparing Summary
|
anchor_paths = [] | ||
for fpath in prefix_record.files: | ||
if on_win: | ||
fpath = fpath.replace("\\", "/") | ||
if matcher(fpath): | ||
anchor_paths.append(fpath) |
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.
We could fix this earlier in the PrefixRecord instantiation, but then we would pay for this conversion every time we load any record. However we only need this fix for conda list
, which is the only one that uses PrefixData
with pip_interop_enabled=True
. This function in only called in that code path.
@conda/conda-maintainers, ready for review. |
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.
This doesn't have an issue assigned, please open one for record keeping (and user discovery).
On the specific change, this looks a little weird as a fix to work around a behavior that only happens when used with micromamba. I do think that in case another conda-like system uses the same files internally, it should follow conda's pattern of encoding data, like file paths.
I haven't done the research why this uses forward slashes, and why micromamba doesn't. But either way, this smells like something to fix in the path actions, instead of just superficially when running conda list
.
Oh, also, this kind of needs tests it seems? |
Description
Fixes conda-forge/conda-forge-ci-setup-feedstock#362
Checklist - did you ...
news
directory (using the template) for the next release's release notes?