Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 6, 2026

This PR contains the following updates:

Package Change Age Confidence
pathspec ==0.12.1==1.0.0 age confidence

Release Notes

cpburnz/python-pathspec (pathspec)

v1.0.0

Compare Source

Major changes:

  • Issue #​91_: Dropped support of EoL Python 3.8.
  • 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().
  • 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).

API changes:

  • 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>_.
  • Deprecated: "gitwildmatch" is now an alias for "gitignore".
  • Deprecated: pathspec.patterns.GitWildMatchPattern is now an alias for pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern.
  • Deprecated: pathspec.patterns.gitwildmatch module has been replaced by the pathspec.patterns.gitignore package.
  • Deprecated: pathspec.patterns.gitwildmatch.GitWildMatchPattern is now an alias for pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern.
  • Deprecated: pathspec.patterns.gitwildmatch.GitWildMatchPatternError is now an alias for pathspec.patterns.gitignore.GitIgnorePatternError.
  • Removed: pathspec.patterns.gitwildmatch.GitIgnorePattern has been deprecated since v0.4 (2016-07-15).
  • 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.
  • 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.

New features:

  • Added optional "hyperscan" backend using hyperscan_ library. It will automatically be used when installed. This dependency can be installed with pip install 'pathspec[hyperscan]'.
  • 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]'.
  • Added optional dependency on typing-extensions_ library to improve some type hints.

Bug fixes:

  • Issue #&#8203;93_: Do not remove leading spaces.
  • Issue #&#8203;95_: Matching for files inside folder does not seem to behave like .gitignore's.
  • Issue #&#8203;98_: UnboundLocalError in RegexPattern when initialized with pattern=None.
  • Type hint on return value of pathspec.pattern.RegexPattern.match_file() to match documentation.

Improvements:

  • Mark Python 3.13 and 3.14 as supported.
  • No-op patterns are now filtered out when matching files, slightly improving performance.
  • Fix performance regression in iter_tree_files() from v0.10.

.. _Issue #&#8203;38: #​38
.. _Issue #&#8203;91: #​91
.. _Issue #&#8203;93: #​93
.. _Issue #&#8203;95: #​95
.. _Issue #&#8203;98: #​98
.. _google-re2: https://pypi.org/project/google-re2/
.. _hyperscan: https://pypi.org/project/hyperscan/
.. _typing-extensions: https://pypi.org/project/typing-extensions/


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner January 6, 2026 04:55
@minottic minottic merged commit 71a9257 into main Jan 6, 2026
10 checks passed
@minottic minottic deleted the renovate/pathspec-1.x branch January 6, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants