Skip to content

Preserve directory semantics when normalizing terminal dot segments - #203

Open
rupayon123 wants to merge 1 commit into
gruns:masterfrom
rupayon123:contribution/normalize-terminal-dots-20260920
Open

rupayon123 wants to merge 1 commit into
gruns:masterfrom
rupayon123:contribution/normalize-terminal-dots-20260920

Conversation

@rupayon123

Copy link
Copy Markdown

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant