Wcmatch

Latest version: v8.5.2

Safety actively analyzes 630094 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 8

8.2

- **NEW**: Add support for `dir_fd` in glob patterns.
- **FIX**: Small fix for Python 3.10 Beta 1 and `pathlib`.

8.1.2

- **FIX**: `fnmatch.translate` no longer requires users to normalize their Windows paths for comparison. Previously, portions of the `translate` regex handled both `/` and `\\`, while other portions did not. This inconsistent handling forced users to normalize paths for reliable matching. Now all of the generated regex should handle both `/` and `\\`.
- **FIX**: On Linux/Unix systems, a backslash should not be assumed literal if it is followed by a forward slash. Backslash is magic on all systems, and an escaped forward slash is still counted as a forward slash, not a backslash and forward slash.
- **FIX**: A trailing backslash that is not escaped via another backslash should not be assumed as a backslash. Since it is escaping nothing, it will be ignored. Literal backslashes on any system must be escaped.

8.1.1

- **FIX**: When tracking unique glob paths, the unique cache had inverted logic for case sensitive vs case insensitive comparison. (164)

8.1

- **NEW**: Add `is_magic` function to the `glob` and `fnamtch` library.
- **NEW**: `fnmatch` now has `escape` available via its API. The `fnmatch` variant uses filename logic instead of path logic.
- **NEW**: Deprecate `raw_escape` in `glob` as it is very niche and the same can be accomplished simply by using `!py3 codecs.decode(string, 'unicode_escape')` and then using `escape`.
- **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` or `bytes`.
- **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. Require `bracex` 2.1.1 which aborts much quicker.
- **FIX**: Fix some corner cases where limit would not abort correctly.

8.0.1

- **FIX**: Small bug in `[:alpha:]` range.

8.0

- **NEW**: `WcMatch`'s `on_init` hook now only accepts `kwargs` and not `args`.
- **NEW**: Cosmetic change of referring to the first `__init__` parameter as `root_dir` instead of `base`. 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 from `base` 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.

Page 2 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.