MAINT: fix no-op str.replace() in editable path hook - #899
Merged
Conversation
To the best of my knowledge, this is inconsequential. The path passed to the path hook is used only to check whether it is handled by the editable wheel import hook. The only paths that match this criteria come from the __path__ attribute of a module loaded via the editable package import hook and these are computed with the correct path separator. However, it is hard to rule out anyone doing something funny with these paths, thus be on the safe side and normalize the path separators. Fixes mesonbuild#868.
dnicolodi
force-pushed
the
fix/editable-path-hook
branch
from
September 13, 2026 17:06
a94e5e4 to
010c44b
Compare
rgommers
approved these changes
Sep 14, 2026
rgommers
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks @dnicolodi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To the best of my knowledge, this is inconsequential. The path passed to the path hook is used only to check whether it is handled by the editable wheel import hook. The only paths that match this criteria come from the path attribute of a module loaded via the editable package import hook and these are computed with the correct path separator.
However, it is hard to rule out anyone doing something funny with these paths, thus be on the safe side and normalize the path separators.
Fixes #868.