-------------------
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