Repository navigation
Preserve directory semantics when normalizing terminal dot segments - #203
Open
rupayon123 wants to merge 1 commit into
Open
rupayon123 wants to merge 1 commit into
rupayon123 wants to merge 1 commit into
Conversation
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.
Preserve directory semantics when
Path.normalize()removes a terminal/.or/... For example,/a/b/c/d/..now normalizes to/a/b/c/, so a later relative join resolves within that directory instead of replacing its last component. Relative paths, root normalization and idempotence are covered too.This addresses the normalization part of #159. It deliberately does not change raw
join()behavior: URI resolution merges a relative reference with the base before removing dot segments. Reference: RFC3986 section5.2.Validation on Python3.11.15:
test_odd_urls,test_hostsandtest_netlocfailures; related fixes already have open PRs (Fix double '//' on URLs with empty authority and '//'-prefixed path (#185)聽#197/Fix: tests/test_furl.py::test_hosts (and the analogous case in test_netloc)...聽#198).git diff --checkpasses.AI-assisted using OpenAI Codex for rupayon123's authorized open-source contribution workflow. This uses the existing issue's reproducer and source inspection; no production deployment claim or upstream test suppression is involved.