Debian Codegraph @

CHANGES_1.in.rst

raw
1
2 1.1.1 (2026-04-26)
3 ------------------
4
5 Improvements:
6
7 - Improved type checking with mypy and pyright.
8
9 Bug fixes:
10
11 - Fixed typing on `PathSpec[TPattern]` to `PathSpec[TPattern_co]`.
12 - Added missing variant type-hint `type[Pattern]` to `PathSpec.from_lines()` parameter `pattern_factory`.
13 - Fixed possible type error when using `+` and `+=` operators on `PathSpec`.
14
15
16 1.1.0 (2026-04-22)
17 ------------------
18
19 New features:
20
21 - `Issue #108`_: Specialize pattern type for `PathSpec` as `PathSpec[TPattern]` for better debugging of `PathSpec().patterns`.
22
23 Bug fixes:
24
25 - `Issue #93`_: Git discards invalid range notation. `GitIgnoreSpecPattern` now discards patterns with invalid range notation like Git.
26 - `Pull #106`_: Fix escape() not escaping backslash characters.
27
28 Improvements:
29
30 - `Pull #110`_: Nicer debug print outs (and str for regex pattern).
31
32
33 .. _`Pull #106`: https://github.com/cpburnz/python-pathspec/pull/106
34 .. _`Issue #108`: https://github.com/cpburnz/python-pathspec/issues/108
35 .. _`Pull #110`: https://github.com/cpburnz/python-pathspec/pull/110
36
37
38 1.0.4 (2026-01-26)
39 ------------------
40
41 Bug fixes:
42
43 - `Issue #103`_: Using re2 fails if pyre2 is also installed.
44
45 .. _`Issue #103`: https://github.com/cpburnz/python-pathspec/issues/103
46
47
48 1.0.3 (2026-01-09)
49 ------------------
50
51 Bug fixes:
52
53 - `Issue #101`_: pyright strict errors with pathspec >= 1.0.0.
54 - `Issue #102`_: No module named 'tomllib'.
55
56
57 .. _`Issue #101`: https://github.com/cpburnz/python-pathspec/issues/101
58 .. _`Issue #102`: https://github.com/cpburnz/python-pathspec/issues/102
59
60
61 1.0.2 (2026-01-07)
62 ------------------
63
64 Bug fixes:
65
66 - Type hint `collections.abc.Callable` does not properly replace `typing.Callable` until Python 3.9.2.
67
68
69 1.0.1 (2026-01-06)
70 ------------------
71
72 Bug fixes:
73
74 - `Issue #100`_: ValueError(f"{patterns=!r} cannot be empty.") when using black.
75
76
77 .. _`Issue #100`: https://github.com/cpburnz/python-pathspec/issues/100
78
79
80 1.0.0 (2026-01-05)
81 ------------------
82
83 Major changes:
84
85 - `Issue #91`_: Dropped support of EoL Python 3.8.
86 - Added concept of backends to allow for faster regular expression matching. The backend can be controlled using the `backend` argument to `PathSpec()`, `PathSpec.from_lines()`, `GitIgnoreSpec()`, and `GitIgnoreSpec.from_lines()`.
87 - Renamed "gitwildmatch" pattern back to "gitignore". The "gitignore" pattern behaves slightly differently when used with `PathSpec` (*gitignore* as documented) than with `GitIgnoreSpec` (replicates *Git*'s edge cases).
88
89 API changes:
90
91 - Breaking: protected method `pathspec.pathspec.PathSpec._match_file()` (with a leading underscore) has been removed and replaced by backends. This does not affect normal usage of `PathSpec` or `GitIgnoreSpec`. Only custom subclasses will be affected. If this breaks your usage, let me know by `opening an issue <https://github.com/cpburnz/python-pathspec/issues>`_.
92 - Deprecated: "gitwildmatch" is now an alias for "gitignore".
93 - Deprecated: `pathspec.patterns.GitWildMatchPattern` is now an alias for `pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern`.
94 - Deprecated: `pathspec.patterns.gitwildmatch` module has been replaced by the `pathspec.patterns.gitignore` package.
95 - Deprecated: `pathspec.patterns.gitwildmatch.GitWildMatchPattern` is now an alias for `pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern`.
96 - Deprecated: `pathspec.patterns.gitwildmatch.GitWildMatchPatternError` is now an alias for `pathspec.patterns.gitignore.GitIgnorePatternError`.
97 - Removed: `pathspec.patterns.gitwildmatch.GitIgnorePattern` has been deprecated since v0.4 (2016-07-15).
98 - Signature of method `pathspec.pattern.RegexPattern.match_file()` has been changed from `def match_file(self, file: str) -> RegexMatchResult | None` to `def match_file(self, file: AnyStr) -> RegexMatchResult | None` to reflect usage.
99 - Signature of class method `pathspec.pattern.RegexPattern.pattern_to_regex()` has been changed from `def pattern_to_regex(cls, pattern: str) -> tuple[str, bool]` to `def pattern_to_regex(cls, pattern: AnyStr) -> tuple[AnyStr | None, bool | None]` to reflect usage and documentation.
100
101 New features:
102
103 - Added optional "hyperscan" backend using `hyperscan`_ library. It will automatically be used when installed. This dependency can be installed with ``pip install 'pathspec[hyperscan]'``.
104 - Added optional "re2" backend using the `google-re2`_ library. It will automatically be used when installed. This dependency can be installed with ``pip install 'pathspec[re2]'``.
105 - Added optional dependency on `typing-extensions`_ library to improve some type hints.
106
107 Bug fixes:
108
109 - `Issue #93`_: Do not remove leading spaces.
110 - `Issue #95`_: Matching for files inside folder does not seem to behave like .gitignore's.
111 - `Issue #98`_: UnboundLocalError in RegexPattern when initialized with `pattern=None`.
112 - Type hint on return value of `pathspec.pattern.RegexPattern.match_file()` to match documentation.
113
114 Improvements:
115
116 - Mark Python 3.13 and 3.14 as supported.
117 - No-op patterns are now filtered out when matching files, slightly improving performance.
118 - Fix performance regression in `iter_tree_files()` from v0.10.
119
120
121 .. _`Issue #38`: https://github.com/cpburnz/python-pathspec/issues/38
122 .. _`Issue #91`: https://github.com/cpburnz/python-pathspec/issues/91
123 .. _`Issue #93`: https://github.com/cpburnz/python-pathspec/issues/93
124 .. _`Issue #95`: https://github.com/cpburnz/python-pathspec/issues/95
125 .. _`Issue #98`: https://github.com/cpburnz/python-pathspec/issues/98
126 .. _`google-re2`: https://pypi.org/project/google-re2/
127 .. _`hyperscan`: https://pypi.org/project/hyperscan/
128 .. _`typing-extensions`: https://pypi.org/project/typing-extensions/