Releases: facelessuser/wcmatch
Releases · facelessuser/wcmatch
8.1.1
8.1
8.1
- NEW: Add
is_magic
function to theglob
andfnamtch
library. - NEW:
fnmatch
now hasescape
available via its API. Thefnmatch
variant uses filename logic instead of path logic. - NEW: Deprecate
raw_escape
inglob
as it is very niche and the same can be accomplished simply by using#!py3 codecs.decode(string, 'unicode_escape')
and then usingescape
. - FIX: Use
os.fspath
to convert path-like objects to string/bytes, whatever the return from__fspath__
is what Wildcard Match will accept. Don't try to convert paths via__str__
or__bytes__
as not all path-like objects may implement both. - FIX: Better checking of types to ensure consistent failure if the path, pattern, or root directory of are not all of type
str
orbytes
. - FIX: Some internal fixes and refactoring.
- FIX: Refactor code to take advantage of
bracex
's ability to abort parsing on extremely large pattern expansions. Patterns like{1..10000000}
will now abort dramatically quicker. Requirebracex
2.1.1 which aborts much quicker. - FIX: Fix some corner cases where limit would not abort correctly.
8.0.1
8.0.1
- FIX: Small bug in
[:alpha:]
range.
8.0
8.0
- NEW:
WcMatch
'son_init
hook now only acceptskwargs
and notargs
. - NEW: Cosmetic change of referring to the first
__init__
parameter asroot_dir
instead ofbase
. This is to make it more clear when we are talking about the overall root directory that all paths are relative to vs the base path of a file which is relative to the root directory and the actual file name. - NEW: Internal attribute of
WcMatch
changed frombase
to_root_dir
. This attribute is not really meant to be referenced by users and as been marked as private. - NEW: Drop requirement for
backrefs
and update documentation to note that POSIX properties never actually enabled the use of Unicode properties. While the documentation stated this and it was probably intended, it was never actually enabled. Currently, Wildcard match has chosen to keep with the ASCII definition for now as it has been since the feature was introduced. This may change in the future if there is demand for it. - NEW: Add
[:word:]
POSIX character class.
7.2
7.2
- NEW: Drop Python 3.5 support.
- NEW: Formally support Python 3.9 support.
- FIX: Small fix for regular expression output to ensure
NODIR
pattern looks at both/
and\\
on Windows.
7.1
7.1
- NEW: Translate functions will now use capturing groups for
EXTGLOB
/EXTMATCH
groups in the returned regular expression patterns.
7.0.1
7.0.1
- FIX: Ensure that when using
REALPATH
that all symlinks are evaluated. - FIX: Fix issue where an extended pattern pattern can't follow right behind an inverse extended pattern.
- FIX: Fix issues related to nested inverse glob patterns.
7.0
7.0
Check out Release Notes to learn more about upgrading to 7.0.
- NEW: Recognize extended UNC paths.
- NEW: Allow escaping any character in Windows drives for better compatibility with
SPLIT
andBRACE
which
requires a user to escape{
,}
and|
to avoid expanding a pattern. - NEW:
raw_escape
now accepts theraw_chars
parameter so that translation of Python character back references can be disabled. - NEW: Search functions that use
scandir
will not return.
and..
for wildcard patterns that require iterating over a directory to match the files against a pattern. This matches Python's glob and is most likely what most users expect. Pattern matching logic is unaffected. - NEW: Add
SCANDOTDIR
flag to enable previous behavior of injecting.
and..
inscandir
results.
SCANDOTDIR
has no affect on match functions such asglobmatch
which don't use directory scanning. - NEW: Flag
NODOTDIR
has been added to disable patterns such as.*
from matching.
and..
. When enabled, matching logic is changed to require a literal pattern of.
and..
to match the special directories.
and..
. This is more Zsh like. - FIX: Negative extended glob patterns (
!(...)
) incorrectly allowed for hidden files to be returned when one of the subpatterns started with.
, even whenDOTMATCH
/DOTGLOB
was not enabled. - FIX: When
NOUNIQUE
is enabled andpathlib
is being used, you could still get non-unique results across
patterns expanded withBRACE
orSPLIT
(or even by simply providing a list of patterns). Ensure that unique results are only returned whenNOUNIQUE
is not enabled. - FIX: Fix corner cases with
escape
andraw_escape
with back slashes. - FIX: Ensure that
globmatch
does not matchtest//
with patterntest/*
. - FIX:
pathlib.match
should not evaluate symlinks that are on the left hand side of what was matched.
6.1
6.1
- NEW:
EXTMATCH
/EXTGLOB
can now be used withNEGATE
without needingMINUSNEGATE
. If a pattern starts with!(
, andNEGATE
andEXTMATCH
/EXTGLOB
are both enabled, the pattern will not be treated as aNEGATE
pattern (even if!(
doesn't yield a validEXTGLOB
pattern). To negate a pattern that starts with a literal(
, you must escape the bracket:!\(
. - FIX: Support Python 3.9.
- FIX: Adjust pattern limit logic of
glob
to be consistent with other functions.
6.0.3
6.0.3
- FIX: Fix issue where when
FOLLOW
andGLOBSTAR
were used, a pattern like**/*
would not properly match a directory which was a symlink. While Bash does not return a symlinked folder with**
,*
(and other patterns), should properly find the symlinked directory. - FIX:
pathlib
clearly states that thematch
method, if the pattern is relative, matches from the right. Wildcard Match used the same implementation thatrglob
used, which prepends**/
to a relative pattern. This is essentially likeMATCHBASE
, but allows for multiple directory levels. This means that dot files (and special folders such as.
and..
) on the left side could prevent the path from matching depending on flags that were set.match
will now be evaluated in such a way as to give the same right to left matching feel that Python'spathlib
uses.