gh-84538: add strict argument to pathlib.PurePath.relative_to by domragusa · Pull Request #19813 · python/cpython · GitHub

github.com

Tin mới

domragusa:relative_to_strict_param

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

pathlib's relative_to should behave like os.path.relpath #84538

bpo-40358: add strict param to pathlib.PurePath.relative_to

bpo-40358: add strict parameter to pathlib.PurePath.relative_to #19807

View reviewed changes

resolve conflicts with

Add fs.relative_to() function. Closes #2184 mesonbuild/meson#7908

View reviewed changes

Merge branch 'python:main' into relative_to_strict_param

Update Doc/library/pathlib.rst

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

fix wording in documentation as requested

change strict argument to walk_up in pathlib.PurePath.relative_to

View reviewed changes

improve variable names

remove trailing spaces

Merge branch 'main' into relative_to_strict_param

awaiting change review

awaiting change review

View reviewed changes

Update Doc/library/pathlib.rst

Merge branch 'main' into relative_to_strict_param

https://github.com/zeehio/backports-pathlib-relative-to

With respect to the backporting, I took this pull request and created a small package out of it, following the backports package guidelines.

Allow relative_to with recursive=False (in-place on objects) SpikeInterface/spikeinterface#1824

feat: add vim.fs.relpath neovim/neovim#31790

Allow path relative-to to use parent directory symbols nushell/nushell#14055