---
title: "pathspec 1.1.1 Breaking Changes on PyPI | Since.dev"
description: "What each pathspec release removed, renamed or changed: 68 breaking changes in 5 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/pathspec
last_updated: 2026-12-04
---

# 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

Latest version `1.1.1`, released April 27, 2026. [Source repository](https://github.com/cpburnz/python-pathspec)

Its 1.0.0 release drops [Python 3.8](https://since.dev/calendar/python/3.8.md). [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.12.0](#v-0-12-0) to [1.1.1](#v-1-1-1): 55 breaking changes in 3 versions.
- From [0.11.0](#v-0-11-0) to [1.1.1](#v-1-1-1): 67 breaking changes in 4 versions.

## pathspec 1.1.1 breaking changes

pathspec 1.1.1, released April 27, 2026: 20 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](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.gitignore.GitIgnoreSpecPattern.pattern`  

Was pattern: Union\[AnyStr, re.Pattern, None\]; now pattern: Union\[str, bytes, re.Pattern, None\]. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.gitignore.override`  

Was def override(f: F) -> F; now def override(f: F, /) -> F. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.GitIgnoreSpec.patterns`  

Was patterns: Sequence\[TPattern\]; now patterns: Sequence\[TPattern_co\]. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.PathSpec`  

Was class PathSpec(Generic\[TPattern\]); now class PathSpec(Generic\[TPattern_co\]). [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.PathSpec.patterns`  

Was patterns: Sequence\[TPattern\]; now patterns: Sequence\[TPattern_co\]. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.pattern.override`  

Was def override(f: F) -> F; now def override(f: F, /) -> F. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.patterns.gitignore.basic.override`  

Was def override(f: F) -> F; now def override(f: F, /) -> F. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.patterns.gitignore.spec.override`  

Was def override(f: F) -> F; now def override(f: F, /) -> F. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.patterns.gitwildmatch.override`  

Was def override(f: F) -> F; now def override(f: F, /) -> F. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.RegexPattern.pattern`  

Was pattern: Union\[AnyStr, re.Pattern, None\]; now pattern: Union\[str, bytes, re.Pattern, None\]. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)
- **Signature changed** `pathspec.util.AlreadyRegisteredError.pattern_factory`  

Was pattern_factory: Callable\[\[AnyStr\], Pattern\]; now pattern_factory: Callable\[\[Union\[str, bytes\]\], Pattern\]. [pypi.org](https://pypi.org/project/pathspec/1.1.1/)
- **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](https://pypi.org/project/pathspec/1.1.1/)

## pathspec 1.1.0 breaking changes

pathspec 1.1.0, released April 23, 2026: 8 breaking changes.

- **Behavior changed** `escape`  

escape() now also escapes backslashes, so its output differs from earlier versions for inputs containing backslashes. [github.com](https://github.com/cpburnz/python-pathspec/blob/v1.1.0/CHANGES.rst)
- **Signature changed** `pathspec.gitignore.GitIgnoreBasicPattern.__eq__`  

Was def \_\_eq\_\_(self, other: RegexPattern) -> bool; now def \_\_eq\_\_(self, other: object) -> bool. [pypi.org](https://pypi.org/project/pathspec/1.1.0/)
- **Signature changed** `pathspec.gitignore.GitIgnoreSpecPattern.__eq__`  

Was def \_\_eq\_\_(self, other: RegexPattern) -> bool; now def \_\_eq\_\_(self, other: object) -> bool. [pypi.org](https://pypi.org/project/pathspec/1.1.0/)
- **Signature changed** `pathspec.GitIgnoreSpec`  

Was class GitIgnoreSpec(PathSpec); now class GitIgnoreSpec(PathSpec\[GitIgnoreSpecPattern\]). [pypi.org](https://pypi.org/project/pathspec/1.1.0/)
- **Signature changed** `pathspec.PathSpec`  

Was class PathSpec(object); now class PathSpec(Generic\[TPattern\]). [pypi.org](https://pypi.org/project/pathspec/1.1.0/)
- **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](https://pypi.org/project/pathspec/1.1.0/)
- **Signature changed** `pathspec.PathSpec.patterns`  

Was patterns: Sequence\[Pattern\]; now patterns: Sequence\[TPattern\]. [pypi.org](https://pypi.org/project/pathspec/1.1.0/)
- **Signature changed** `pathspec.RegexPattern.__eq__`  

Was def \_\_eq\_\_(self, other: RegexPattern) -> bool; now def \_\_eq\_\_(self, other: object) -> bool. [pypi.org](https://pypi.org/project/pathspec/1.1.0/)

## pathspec 1.0.0 breaking changes

pathspec 1.0.0, released January 6, 2026: 27 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](https://github.com/cpburnz/python-pathspec/blob/v1.0.0/CHANGES.rst)
- **Removed** `pathspec.gitignore.GitWildMatchPattern`  

pathspec.gitignore.GitWildMatchPattern was removed in pathspec 1.0.0 [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **Removed** `pathspec.gitignore.Self`  

pathspec.gitignore.Self was removed in pathspec 1.0.0 [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **Removed** `pathspec.iter_tree`  

pathspec.iter_tree was removed in pathspec 1.0.0 [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **Removed** `pathspec.match_files`  

Use pathspec.util.match_file instead. [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **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](https://github.com/cpburnz/python-pathspec/blob/v1.0.0/CHANGES.rst)
- **Removed** `pathspec.pathspec.Self`  

pathspec.pathspec.Self was removed in pathspec 1.0.0 [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **Removed** `pathspec.patterns.gitwildmatch.GitIgnorePattern`  

The class had been deprecated since v0.4 and has now been removed. [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **Renamed** `pathspec.patterns.gitwildmatch.RegexPattern`  

Use pathspec.patterns.gitignore.base.RegexPattern instead. [pypi.org](https://pypi.org/project/pathspec/1.0.0/)
- **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](https://pypi.org/project/pathspec/1.0.0/)

And 17 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## pathspec 0.12.0 breaking changes

pathspec 0.12.0, released December 9, 2023: 12 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](https://github.com/cpburnz/python-pathspec/blob/v0.12.0/CHANGES.rst)
- **Removed** `pathspec.gitignore.GitWildMatchPatternError`  

pathspec.gitignore.GitWildMatchPatternError was removed in pathspec 0.12.0 [pypi.org](https://pypi.org/project/pathspec/0.12.0/)
- **Removed** `pathspec.pathspec.match_file`  

pathspec.pathspec.match_file was removed in pathspec 0.12.0 [pypi.org](https://pypi.org/project/pathspec/0.12.0/)
- **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](https://pypi.org/project/pathspec/0.12.0/)
- **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](https://pypi.org/project/pathspec/0.12.0/)
- **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](https://github.com/cpburnz/python-pathspec/blob/v0.12.0/CHANGES.rst)
- **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](https://pypi.org/project/pathspec/0.12.0/)
- **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](https://pypi.org/project/pathspec/0.12.0/)
- **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](https://pypi.org/project/pathspec/0.12.0/)
- **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](https://pypi.org/project/pathspec/0.12.0/)

And 2 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## pathspec 0.11.0 breaking changes

pathspec 0.11.0, released January 25, 2023: 1 breaking change.

- **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](https://github.com/cpburnz/python-pathspec/blob/v0.11.0/CHANGES.rst)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
