Pathspec

Latest version: v0.12.1

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

Scan your dependencies

Page 2 of 7

0.10.3

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

New features:

- Added utility function `pathspec.util.append_dir_sep()` to aid in distinguishing between directories and files on the file-system. See `Issue 65`_.

Bug fixes:

- `Issue 66`_/`Pull 67`_: Package not marked as py.typed.
- `Issue 68`_: Exports are considered private.
- `Issue 70`_/`Pull 71`_: 'Self' string literal type is Unknown in pyright.

Improvements:

- `Issue 65`_: Checking directories via match_file() does not work on Path objects.


.. _`Issue 65`: https://github.com/cpburnz/python-pathspec/issues/65
.. _`Issue 66`: https://github.com/cpburnz/python-pathspec/issues/66
.. _`Pull 67`: https://github.com/cpburnz/python-pathspec/pull/67
.. _`Issue 68`: https://github.com/cpburnz/python-pathspec/issues/68
.. _`Issue 70`: https://github.com/cpburnz/python-pathspec/issues/70
.. _`Pull 71`: https://github.com/cpburnz/python-pathspec/pull/71

0.10.2

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

Bug fixes:

- Fix failing tests on Windows.
- Type hint on *root* parameter on `pathspec.pathspec.PathSpec.match_tree_entries()`.
- Type hint on *root* parameter on `pathspec.pathspec.PathSpec.match_tree_files()`.
- Type hint on *root* parameter on `pathspec.util.iter_tree_entries()`.
- Type hint on *root* parameter on `pathspec.util.iter_tree_files()`.
- `Issue 64`_: IndexError with my .gitignore file when trying to build a Python package.

Improvements:

- `Pull 58`_: CI: add GitHub Actions test workflow.


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

0.10.1

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

Bug fixes:

- Fix documentation on `pathspec.pattern.RegexPattern.match_file()`.
- `Pull 60`_: Remove redundant wheel dep from pyproject.toml.
- `Issue 61`_: Dist failure for Fedora, CentOS, EPEL.
- `Issue 62`_: Since version 0.10.0 pure wildcard does not work in some cases.

Improvements:

- Restore support for legacy installations using `setup.py`. See `Issue 61`_.


.. _`Pull 60`: https://github.com/cpburnz/python-pathspec/pull/60
.. _`Issue 61`: https://github.com/cpburnz/python-pathspec/issues/61
.. _`Issue 62`: https://github.com/cpburnz/python-pathspec/issues/62

0.10.0

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

Major changes:

- Dropped support of EOL Python 2.7, 3.5, 3.6. See `Issue 47`_.
- The *gitwildmatch* pattern `dir/*` is now handled the same as `dir/`. This means `dir/*` will now match all descendants rather than only direct children. See `Issue 19`_.
- Added `pathspec.GitIgnoreSpec` class (see new features).
- Changed build system to `pyproject.toml`_ and build backend to `setuptools.build_meta`_ which may have unforeseen consequences.
- Renamed GitHub project from `python-path-specification`_ to `python-pathspec`_. See `Issue 35`_.

API changes:

- Deprecated: `pathspec.util.match_files()` is an old function no longer used.
- Deprecated: `pathspec.match_files()` is an old function no longer used.
- Deprecated: `pathspec.util.normalize_files()` is no longer used.
- Deprecated: `pathspec.util.iter_tree()` is an alias for `pathspec.util.iter_tree_files()`.
- Deprecated: `pathspec.iter_tree()` is an alias for `pathspec.util.iter_tree_files()`.
- Deprecated: `pathspec.pattern.Pattern.match()` is no longer used. Use or implement
`pathspec.pattern.Pattern.match_file()`.

New features:

- Added class `pathspec.gitignore.GitIgnoreSpec` (with alias `pathspec.GitIgnoreSpec`) to implement *gitignore* behavior not possible with standard `PathSpec` class. The particular *gitignore* behavior implemented is prioritizing patterns matching the file directly over matching an ancestor directory.

Bug fixes:

- `Issue 19`_: Files inside an ignored sub-directory are not matched.
- `Issue 41`_: Incorrectly (?) matches files inside directories that do match.
- `Pull 51`_: Refactor deprecated unittest aliases for Python 3.11 compatibility.
- `Issue 53`_: Symlink pathspec_meta.py breaks Windows.
- `Issue 54`_: test_util.py uses os.symlink which can fail on Windows.
- `Issue 55`_: Backslashes at start of pattern not handled correctly.
- `Pull 56`_: pyproject.toml: include subpackages in setuptools config
- `Issue 57`_: `!` doesn't exclude files in directories if the pattern doesn't have a trailing slash.

Improvements:

- Support Python 3.10, 3.11.
- Modernize code to Python 3.7.
- `Issue 52`_: match_files() is not a pure generator function, and it impacts tree_*() gravely.


.. _`python-path-specification`: https://github.com/cpburnz/python-path-specification
.. _`python-pathspec`: https://github.com/cpburnz/python-pathspec
.. _`pyproject.toml`: https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
.. _`setuptools.build_meta`: https://setuptools.pypa.io/en/latest/build_meta.html
.. _`Issue 19`: https://github.com/cpburnz/python-pathspec/issues/19
.. _`Issue 35`: https://github.com/cpburnz/python-pathspec/issues/35
.. _`Issue 41`: https://github.com/cpburnz/python-pathspec/issues/41
.. _`Issue 47`: https://github.com/cpburnz/python-pathspec/issues/47
.. _`Pull 51`: https://github.com/cpburnz/python-pathspec/pull/51
.. _`Issue 52`: https://github.com/cpburnz/python-pathspec/issues/52
.. _`Issue 53`: https://github.com/cpburnz/python-pathspec/issues/53
.. _`Issue 54`: https://github.com/cpburnz/python-pathspec/issues/54
.. _`Issue 55`: https://github.com/cpburnz/python-pathspec/issues/55
.. _`Pull 56`: https://github.com/cpburnz/python-pathspec/pull/56
.. _`Issue 57`: https://github.com/cpburnz/python-pathspec/issues/57

0.9.0

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

- `Issue 44`_/`Pull 50`_: Raise `GitWildMatchPatternError` for invalid git patterns.
- `Pull 45`_: Fix for duplicate leading double-asterisk, and edge cases.
- `Issue 46`_: Fix matching absolute paths.
- API change: `util.normalize_files()` now returns a `Dict[str, List[pathlike]]` instead of a `Dict[str, pathlike]`.
- Added type hinting.

.. _`Issue 44`: https://github.com/cpburnz/python-pathspec/issues/44
.. _`Pull 45`: https://github.com/cpburnz/python-pathspec/pull/45
.. _`Issue 46`: https://github.com/cpburnz/python-pathspec/issues/46
.. _`Pull 50`: https://github.com/cpburnz/python-pathspec/pull/50

0.8.1

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

- `Pull 43`_: Add support for addition operator.

.. _`Pull 43`: https://github.com/cpburnz/python-pathspec/pull/43

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.