{{ message }}
GH-106747: Make pathlib ABC globbing more consistent with glob.glob()#115056
Merged
barneygale merged 1 commit intoFeb 6, 2024
Merged
GH-106747: Make pathlib ABC globbing more consistent with glob.glob()#115056barneygale merged 1 commit into
glob.glob()#115056barneygale merged 1 commit into
Conversation
….glob()`
When expanding `**` wildcards, ensure we add a trailing slash to the
topmost directory path. This matches `glob.glob()` behaviour:
>>> glob.glob('dirA/**', recursive=True)
['dirA/', 'dirA/dirB', 'dirA/dirB/dirC']
This does not affect `pathlib.Path.glob()`, because trailing slashes aren't
supported in pathlib proper.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 FreeBSD14 3.x has failed when building commit 1b1f839. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1232/builds/1259 Failed tests:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 8, done.
remote: Counting objects: 12% (1/8)
remote: Counting objects: 25% (2/8)
remote: Counting objects: 37% (3/8)
remote: Counting objects: 50% (4/8)
remote: Counting objects: 62% (5/8)
remote: Counting objects: 75% (6/8)
remote: Counting objects: 87% (7/8)
remote: Counting objects: 100% (8/8)
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 14% (1/7)
remote: Compressing objects: 28% (2/7)
remote: Compressing objects: 42% (3/7)
remote: Compressing objects: 57% (4/7)
remote: Compressing objects: 71% (5/7)
remote: Compressing objects: 85% (6/7)
remote: Compressing objects: 100% (7/7)
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 1), reused 5 (delta 1), pack-reused 0
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '1b1f8398d0ffe3c8ba2cca79d0c0f19a6a34e72a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1b1f8398d0 GH-106747: Make pathlib ABC globbing more consistent with `glob.glob()` (#115056)
Switched to and reset branch 'main'
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly. |
Sorry, something went wrong.
fsc-eriker
pushed a commit
to fsc-eriker/cpython
that referenced
this pull request
Feb 14, 2024
….glob()` (python#115056) When expanding `**` wildcards, ensure we add a trailing slash to the topmost directory path. This matches `glob.glob()` behaviour: >>> glob.glob('dirA/**', recursive=True) ['dirA/', 'dirA/dirB', 'dirA/dirB/dirC'] This does not affect `pathlib.Path.glob()`, because trailing slashes aren't supported in pathlib proper.
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
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.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.
When expanding
**wildcards, ensure we add a trailing slash to the topmost directory path. This matchesglob.glob()behaviour:This does not affect
pathlib.Path.glob(), because trailing slashes aren't supported in pathlib proper.