Skip to content

Commit 7fee02c

Browse files
authored
Update pathspec to 1.0.0 (#20533)
https://github.com/cpburnz/python-pathspec/blob/v1.0.0/CHANGES.rst https://github.com/cpburnz/python-pathspec/blob/v1.0.0/UPGRADING.rst Pathspec `v1.0.0` was released a few hours ago. It included a few breaking changes. - `gitwildmatch` was renamed to `gitignore` - `GitWildMatchPatternError` is now an (temporary) alias for `GitIgnorePatternError` before it's removed completely
1 parent bec8cba commit 7fee02c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

mypy-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# and the pins in setup.py
33
typing_extensions>=4.6.0
44
mypy_extensions>=1.0.0
5-
pathspec>=0.9.0
5+
pathspec>=1.0.0
66
tomli>=1.1.0; python_version<'3.11'
77
librt>=0.6.2; platform_python_implementation != 'PyPy'

mypy/modulefinder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from typing import Final, TypeAlias as _TypeAlias
1717

1818
from pathspec import PathSpec
19-
from pathspec.patterns.gitwildmatch import GitWildMatchPatternError
19+
from pathspec.patterns.gitignore import GitIgnorePatternError
2020

2121
from mypy import pyinfo
2222
from mypy.errors import CompileError
@@ -736,8 +736,8 @@ def find_gitignores(dir: str) -> list[tuple[str, PathSpec]]:
736736
with open(gitignore) as f:
737737
lines = f.readlines()
738738
try:
739-
return parent_gitignores + [(dir, PathSpec.from_lines("gitwildmatch", lines))]
740-
except GitWildMatchPatternError:
739+
return parent_gitignores + [(dir, PathSpec.from_lines("gitignore", lines))]
740+
except GitIgnorePatternError:
741741
print(f"error: could not parse {gitignore}", file=sys.stderr)
742742
return parent_gitignores
743743
return parent_gitignores

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires = [
77
# the following is from mypy-requirements.txt/setup.py
88
"typing_extensions>=4.6.0",
99
"mypy_extensions>=1.0.0",
10-
"pathspec>=0.9.0",
10+
"pathspec>=1.0.0",
1111
"tomli>=1.1.0; python_version<'3.11'",
1212
"librt>=0.6.2; platform_python_implementation != 'PyPy'",
1313
# the following is from build-requirements.txt
@@ -51,7 +51,7 @@ dependencies = [
5151
# When changing this, also update build-system.requires and mypy-requirements.txt
5252
"typing_extensions>=4.6.0",
5353
"mypy_extensions>=1.0.0",
54-
"pathspec>=0.9.0",
54+
"pathspec>=1.0.0",
5555
"tomli>=1.1.0; python_version<'3.11'",
5656
"librt>=0.6.2; platform_python_implementation != 'PyPy'",
5757
]

test-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ identify==2.6.15
2222
# via pre-commit
2323
iniconfig==2.1.0
2424
# via pytest
25-
librt==0.7.3 ; platform_python_implementation != 'PyPy'
25+
librt==0.7.3 ; platform_python_implementation != "PyPy"
2626
# via -r mypy-requirements.txt
2727
lxml==6.0.2 ; python_version < "3.15"
2828
# via -r test-requirements.in
@@ -32,7 +32,7 @@ nodeenv==1.9.1
3232
# via pre-commit
3333
packaging==25.0
3434
# via pytest
35-
pathspec==0.12.1
35+
pathspec==1.0.0
3636
# via -r mypy-requirements.txt
3737
platformdirs==4.5.0
3838
# via virtualenv

0 commit comments

Comments
 (0)