Repository navigation
Conversation
Assisted-by: OpenAI Codex
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.
Add
Path.is_junction()alongside the existing filesystem predicates, delegating toself.module.isjunction. The method is available on Python 3.12 and later, matching the version that introduced the pathlib and os.path APIs.This lets code using pathlib's junction predicate also accept
path.Path, as part of the compatibility goal in #214. The tests cover ordinary files and directories, missing and invalid paths, a real Windows junction, and a junction after its target is removed. This PR is independent of #283.Validation on Windows / Python 3.13:
AttributeErrorand pass with this change. The Windows test creates a real junction.tox -e py313: 148 passed, 7 skipped, and the same 12 symlink-privilege failures/errors seen before this change (WinError 1314). Formatting and type checks passed.--python-version 3.10also passed.tox -e docs: Sphinx with warnings treated as errors and sphinx-lint passed.AI disclosure: OpenAI Codex prepared this change and ran the local validation.