Pathspec

Latest version: v0.12.1

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

Scan your dependencies

Page 1 of 7

1.1.0

- (Maint) Updated Supported Ruby Versions
- (Maint) Linting corrections

Undocumented Releases (Sorry!)

0.12.1

-------------------

Bug fixes:

- `Issue 84`_: PathSpec.match_file() returns None since 0.12.0.


.. _`Issue 84`: https://github.com/cpburnz/python-pathspec/issues/84

0.12.0

-------------------

Major changes:

- Dropped support of EOL Python 3.7. See `Pull 82`_.


API changes:

- Signature of protected method `pathspec.pathspec.PathSpec._match_file()` (with a leading underscore) has been changed from `def _match_file(patterns: Iterable[Pattern], file: str) -> bool` to `def _match_file(patterns: Iterable[Tuple[int, Pattern]], file: str) -> Tuple[Optional[bool], Optional[int]]`.

New features:

- Added `pathspec.pathspec.PathSpec.check_*()` methods. These methods behave similarly to `.match_*()` but return additional information in the `pathspec.util.CheckResult` objects (e.g., `CheckResult.index` indicates the index of the last pattern that matched the file).
- Added `pathspec.pattern.RegexPattern.pattern` attribute which stores the original, uncompiled pattern.

Bug fixes:

- `Issue 81`_: GitIgnoreSpec behaviors differ from git.
- `Pull 83`_: Fix ReadTheDocs builds.

Improvements:

- Mark Python 3.12 as supported. See `Pull 82`_.
- Improve test debugging.
- Improve type hint on *on_error* parameter on `pathspec.pathspec.PathSpec.match_tree_entries()`.
- Improve type hint on *on_error* parameter on `pathspec.util.iter_tree_entries()`.


.. _`Issue 81`: https://github.com/cpburnz/python-pathspec/issues/81
.. _`Pull 82`: https://github.com/cpburnz/python-pathspec/pull/82
.. _`Pull 83`: https://github.com/cpburnz/python-pathspec/pull/83

0.11.2

-------------------

New features:

- `Issue 80`_: match_files with negated path spec. `pathspec.PathSpec.match_*()` now have a `negate` parameter to make using *.gitignore* logic easier and more efficient.

Bug fixes:

- `Pull 76`_: Add edge case: patterns that end with an escaped space
- `Issue 77`_/`Pull 78`_: Negate with caret symbol as with the exclamation mark.


.. _`Pull 76`: https://github.com/cpburnz/python-pathspec/pull/76
.. _`Issue 77`: https://github.com/cpburnz/python-pathspec/issues/77
.. _`Pull 78`: https://github.com/cpburnz/python-pathspec/pull/78/
.. _`Issue 80`: https://github.com/cpburnz/python-pathspec/issues/80

0.11.1

-------------------

Bug fixes:

- `Issue 74`_: Include directory should override exclude file.

Improvements:

- `Pull 75`_: Fix partially unknown PathLike type.
- Convert `os.PathLike` to a string properly using `os.fspath`.


.. _`Issue 74`: https://github.com/cpburnz/python-pathspec/issues/74
.. _`Pull 75`: https://github.com/cpburnz/python-pathspec/pull/75

0.11.0

-------------------

Major changes:

- Changed build backend to `flit_core.buildapi`_ from `setuptools.build_meta`_. Building with `setuptools` through `setup.py` is still supported for distributions that need it. See `Issue 72`_.

Improvements:

- `Issue 72`_/`Pull 73`_: Please consider switching the build-system to flit_core to ease setuptools bootstrap.


.. _`flit_core.buildapi`: https://flit.pypa.io/en/latest/index.html
.. _`Issue 72`: https://github.com/cpburnz/python-pathspec/issues/72
.. _`Pull 73`: https://github.com/cpburnz/python-pathspec/pull/73

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.