You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the recently updated version of the specification the shell style wildcard matching is glob-like, and therefore a path separator in a path should not be matched by a wildcard in the PATHPATTERN.
Current behavior:
A path separator in a path is matched by a wildcard in the PATHPATTERN (fnmatch.fnmatch)
Expected behavior:
A path separator in a path should not be matched by a wildcard in the PATHPATTERN.
The text was updated successfully, but these errors were encountered:
Currently the implementation uses fnmatch from the fnmatch module which doesn't distinguish the filename separator ('/' on Unix) as a special character.
The recommended "path-aware" module by the python docs is the glob module. However glob.glob does it by accessing the filesystem and working relative to the current dir (or it needs an absolute path). This behaviour does not work in our case where we need to match relative paths:
Internally glob seems to use fnmatch after having parsed the path segments, maybe implementing similar functionality but treating relative paths as strings, without file system access, could do the job.
Description of issue or feature request:
According to the recently updated version of the specification the shell style wildcard matching is glob-like, and therefore a path separator in a path should not be matched by a wildcard in the PATHPATTERN.
Current behavior:
A path separator in a path is matched by a wildcard in the PATHPATTERN (
fnmatch.fnmatch
)Expected behavior:
A path separator in a path should not be matched by a wildcard in the PATHPATTERN.
The text was updated successfully, but these errors were encountered: