pathspec breaking changes
pathspec 1.1.1 (April 27, 2026) is its newest release with breaking changes, 20 of them. The first: Signature changed pathspec.gitignore.GitIgnoreBasicPattern.pattern. Every breaking API change we have recorded in pathspec on PyPI: 68 breaking changes in 5 versions. Below, its 5 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 1.1.1, released April 27, 2026. Source repository
Its 1.0.0 release drops Python 3.8. Python end of life dates.
- From 0.12.0 to 1.1.1: 55 breaking changes in 3 versions.
- From 0.11.0 to 1.1.1: 67 breaking changes in 4 versions.
pathspec 1.1.1 breaking changes
- Signature changed
pathspec.gitignore.GitIgnoreBasicPattern.pattern
Was pattern: Union[AnyStr, re.Pattern, None]; now pattern: Union[str, bytes, re.Pattern, None]. pypi.org - Signature changed
pathspec.gitignore.GitIgnoreSpecPattern.pattern
Was pattern: Union[AnyStr, re.Pattern, None]; now pattern: Union[str, bytes, re.Pattern, None]. pypi.org - Signature changed
pathspec.gitignore.override
Was def override(f: F) -> F; now def override(f: F, /) -> F. pypi.org - Signature changed
pathspec.GitIgnoreSpec.__init__
Was def __init__(self, patterns: Union[Sequence[TPattern], Iterable[TPattern]], *, backend: Union[BackendNamesHint, str, None] = None, _test_backend_factory: Optional[Callable[[Sequence[TPattern]], _Backend]] = None) -> None; now def... pypi.org - Signature changed
pathspec.GitIgnoreSpec.from_lines
Was @classmethod def from_lines(cls: type[Self], lines: Iterable[AnyStr], pattern_factory: Union[str, Callable[[AnyStr], Pattern], None] = None, *, backend: Union[BackendNamesHint, str, None] = None, _test_backend_factory... pypi.org - Signature changed
pathspec.GitIgnoreSpec.match_files
Was def match_files(self, files: Iterable[StrPath], separators: Optional[Collection[str]] = None, *, negate: Optional[bool] = None) -> Iterator[StrPath]; now def match_files(self, files: Iterable[TStrPath], separators... pypi.org - Signature changed
pathspec.GitIgnoreSpec.patterns
Was patterns: Sequence[TPattern]; now patterns: Sequence[TPattern_co]. pypi.org - Signature changed
pathspec.PathSpec
Was class PathSpec(Generic[TPattern]); now class PathSpec(Generic[TPattern_co]). pypi.org - Signature changed
pathspec.PathSpec.__init__
Was def __init__(self, patterns: Union[Sequence[TPattern], Iterable[TPattern]], *, backend: Union[BackendNamesHint, str, None] = None, _test_backend_factory: Optional[Callable[[Sequence[TPattern]], _Backend]] = None) -> None; now def... pypi.org - Signature changed
pathspec.PathSpec.from_lines
Was @classmethod def from_lines(cls: type[Self], pattern_factory: Union[str, Callable[[AnyStr], Pattern]], lines: Iterable[AnyStr], *, backend: Union[BackendNamesHint, str, None] = None, _test_backend_factory... pypi.org - Signature changed
pathspec.PathSpec.match_files
Was def match_files(self, files: Iterable[StrPath], separators: Optional[Collection[str]] = None, *, negate: Optional[bool] = None) -> Iterator[StrPath]; now def match_files(self, files: Iterable[TStrPath], separators... pypi.org - Signature changed
pathspec.PathSpec.patterns
Was patterns: Sequence[TPattern]; now patterns: Sequence[TPattern_co]. pypi.org - Signature changed
pathspec.pattern.override
Was def override(f: F) -> F; now def override(f: F, /) -> F. pypi.org - Signature changed
pathspec.patterns.gitignore.basic.override
Was def override(f: F) -> F; now def override(f: F, /) -> F. pypi.org - Signature changed
pathspec.patterns.gitignore.spec.override
Was def override(f: F) -> F; now def override(f: F, /) -> F. pypi.org - Signature changed
pathspec.patterns.gitwildmatch.override
Was def override(f: F) -> F; now def override(f: F, /) -> F. pypi.org - Signature changed
pathspec.RegexPattern.pattern
Was pattern: Union[AnyStr, re.Pattern, None]; now pattern: Union[str, bytes, re.Pattern, None]. pypi.org - Signature changed
pathspec.util.AlreadyRegisteredError.__init__
Was def __init__(self, name: str, pattern_factory: Callable[[AnyStr], Pattern]) -> None; now def __init__(self, name: str, pattern_factory: Callable[[Union[str, bytes]], Pattern]) -> None. pypi.org - Signature changed
pathspec.util.AlreadyRegisteredError.pattern_factory
Was pattern_factory: Callable[[AnyStr], Pattern]; now pattern_factory: Callable[[Union[str, bytes]], Pattern]. pypi.org - Signature changed
pathspec.util.register_pattern
Was def register_pattern(name: str, pattern_factory: Callable[[AnyStr], Pattern], override: Optional[bool] = None) -> None; now def register_pattern(name: str, pattern_factory: Union[Callable[[Union[str, bytes]], Pattern], type[Pattern]]... pypi.org
pathspec 1.1.0 breaking changes
- Behavior changed
escape
escape() now also escapes backslashes, so its output differs from earlier versions for inputs containing backslashes. github.com - Signature changed
pathspec.gitignore.GitIgnoreBasicPattern.__eq__
Was def __eq__(self, other: RegexPattern) -> bool; now def __eq__(self, other: object) -> bool. pypi.org - Signature changed
pathspec.gitignore.GitIgnoreSpecPattern.__eq__
Was def __eq__(self, other: RegexPattern) -> bool; now def __eq__(self, other: object) -> bool. pypi.org - Signature changed
pathspec.GitIgnoreSpec
Was class GitIgnoreSpec(PathSpec); now class GitIgnoreSpec(PathSpec[GitIgnoreSpecPattern]). pypi.org - Signature changed
pathspec.PathSpec
Was class PathSpec(object); now class PathSpec(Generic[TPattern]). pypi.org - Signature changed
pathspec.PathSpec.__init__
Was def __init__(self, patterns: Union[Sequence[Pattern], Iterable[Pattern]], *, backend: Union[BackendNamesHint, str, None] = None, _test_backend_factory: Optional[Callable[[Sequence[Pattern]], _Backend]] = None) -> None; now def... pypi.org - Signature changed
pathspec.PathSpec.patterns
Was patterns: Sequence[Pattern]; now patterns: Sequence[TPattern]. pypi.org - Signature changed
pathspec.RegexPattern.__eq__
Was def __eq__(self, other: RegexPattern) -> bool; now def __eq__(self, other: object) -> bool. pypi.org
pathspec 1.0.0 breaking changes
- Removed
Python 3.8 is no longer supported. Users on Python 3.8 must upgrade their Python version before using this release. github.com - Removed
pathspec.gitignore.GitWildMatchPattern
pathspec.gitignore.GitWildMatchPattern was removed in pathspec 1.0.0 pypi.org - Removed
pathspec.gitignore.Self
pathspec.gitignore.Self was removed in pathspec 1.0.0 pypi.org - Removed
pathspec.iter_tree
pathspec.iter_tree was removed in pathspec 1.0.0 pypi.org - Removed
pathspec.match_files
Use pathspec.util.match_file instead. pypi.org - Removed
pathspec.pathspec.PathSpec._match_file
The protected method was removed and replaced by backends. Only custom subclasses that override or call it are affected. github.com - Removed
pathspec.pathspec.Self
pathspec.pathspec.Self was removed in pathspec 1.0.0 pypi.org - Removed
pathspec.patterns.gitwildmatch.GitIgnorePattern
The class had been deprecated since v0.4 and has now been removed. pypi.org - Renamed
pathspec.patterns.gitwildmatch.RegexPattern
Use pathspec.patterns.gitignore.base.RegexPattern instead. pypi.org - Signature changed
pathspec.GitIgnoreSpec.from_lines
Was @classmethod def from_lines(cls: Type[Self], lines: Iterable[AnyStr], pattern_factory: Union[str, Callable[[AnyStr], Pattern], None] = None) -> Self; now @classmethod def from_lines(cls: type[Self], lines: Iterable[AnyStr]... pypi.org
And 17 more in this version. Sign up to see every change
pathspec 0.12.0 breaking changes
- Removed
The release ends support for Python 3.7, which has reached end of life. Users on Python 3.7 must upgrade Python or stay on an earlier pathspec release. github.com - Removed
pathspec.gitignore.GitWildMatchPatternError
pathspec.gitignore.GitWildMatchPatternError was removed in pathspec 0.12.0 pypi.org - Removed
pathspec.pathspec.match_file
pathspec.pathspec.match_file was removed in pathspec 0.12.0 pypi.org - Signature changed
pathspec.PathSpec.match_tree_entries
Was def match_tree_entries(self, root: StrPath, on_error: Optional[Callable] = None, follow_links: Optional[bool] = None, *, negate: Optional[bool] = None) -> Iterator[TreeEntry]; now def match_tree_entries(self, root: StrPath, on_error... pypi.org - Signature changed
pathspec.PathSpec.match_tree_files
Was def match_tree_files(self, root: StrPath, on_error: Optional[Callable] = None, follow_links: Optional[bool] = None, *, negate: Optional[bool] = None) -> Iterator[str]; now def match_tree_files(self, root: StrPath, on_error... pypi.org - Signature changed
pathspec.pathspec.PathSpec._match_file
The protected _match_file method now takes patterns as (index, Pattern) tuples and returns a tuple of (match, index). Code calling this private method must be updated to the new signature. github.com - Signature changed
pathspec.pathspec.PathSpec.match_tree_entries
Was def match_tree_entries(self, root: StrPath, on_error: Optional[Callable] = None, follow_links: Optional[bool] = None, *, negate: Optional[bool] = None) -> Iterator[TreeEntry]; now def match_tree_entries(self, root: StrPath, on_error... pypi.org - Signature changed
pathspec.pathspec.PathSpec.match_tree_files
Was def match_tree_files(self, root: StrPath, on_error: Optional[Callable] = None, follow_links: Optional[bool] = None, *, negate: Optional[bool] = None) -> Iterator[str]; now def match_tree_files(self, root: StrPath, on_error... pypi.org - Signature changed
pathspec.pattern.RegexPattern.__init__
Was def __init__(self, pattern: Union[AnyStr, PatternHint], include: Optional[bool] = None) -> None; now def __init__(self, pattern: Union[AnyStr, PatternHint, None], include: Optional[bool] = None) -> None. pypi.org - Signature changed
pathspec.RegexPattern.__init__
Was def __init__(self, pattern: Union[AnyStr, PatternHint], include: Optional[bool] = None) -> None; now def __init__(self, pattern: Union[AnyStr, PatternHint, None], include: Optional[bool] = None) -> None. pypi.org
And 2 more in this version. Sign up to see every change
pathspec 0.11.0 breaking changes
- Configuration changed
The package is now built with flit_core instead of setuptools.build_meta. Building through setup.py with setuptools is still supported for distributions that need it. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.