Skip to content

Support pathspec v1#10951

Merged
skshetry merged 3 commits intotreeverse:mainfrom
cpburnz:patch-1
Jan 31, 2026
Merged

Support pathspec v1#10951
skshetry merged 3 commits intotreeverse:mainfrom
cpburnz:patch-1

Conversation

@cpburnz
Copy link
Contributor

@cpburnz cpburnz commented Jan 6, 2026

Hi, I'm the author of pathspec and released v1 yesterday. It was reported to me in #99 that this broke dvc, and you pinned to pathspec<1 in #10948. The changes required to support v1 are minimal:

  • pathspec.patterns.GitWildMatchPattern is now a deprecated alias for pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern.
  • pathspec.patterns.gitwildmatch._DIR_MARK was moved to pathspec.patterns.gitignore.spec._DIR_MARK.

Here's the pytest summary:

============================================= short test summary info ==============================================
SKIPPED [2] tests/func/metrics/test_show.py:260: no longer raising graph errors
SKIPPED [1] tests/func/test_add.py:483: Windows specific
SKIPPED [4] tests/func/utils/test_hydra.py:103: TOML dumper breaks when overriding a list/dict with other type or when handling `null` values.
SKIPPED [1] tests/unit/utils/test_fs.py:74: Windows specific
SKIPPED [1] tests/unit/utils/test_fs.py:133: Windows specific
SKIPPED [1] tests/unit/utils/test_utils.py:43: Windows specific
XPASS tests/func/test_data_cloud.py::TestRemote::test_pull_00_prefix
XPASS tests/func/test_data_cloud.py::TestRemote::test_pull_no_00_prefix
====================== 3047 passed, 10 skipped, 2 xpassed, 899 warnings in 248.52s (0:04:08) =======================

Support pathspec v1
Support pathspec v1
@github-project-automation github-project-automation bot moved this to Backlog in DVC Jan 6, 2026
@CLAassistant
Copy link

CLAassistant commented Jan 6, 2026

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.98%. Comparing base (2431ec6) to head (af8e58c).
⚠️ Report is 191 commits behind head on main.

Files with missing lines Patch % Lines
dvc/ignore.py 55.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10951      +/-   ##
==========================================
+ Coverage   90.68%   90.98%   +0.29%     
==========================================
  Files         504      505       +1     
  Lines       39795    41103    +1308     
  Branches     3141     3258     +117     
==========================================
+ Hits        36087    37396    +1309     
- Misses       3042     3069      +27     
+ Partials      666      638      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skshetry
Copy link
Collaborator

skshetry commented Jan 6, 2026

@cpburnz, are there any behavior change in how the patterns are interpreted in v1?
By "substantial change" in #10948, I was worried more about behavioral differences than API changes. We likely don’t have enough tests in DVC to validate that.

@cpburnz
Copy link
Contributor Author

cpburnz commented Jan 6, 2026 via email

@cpburnz
Copy link
Contributor Author

cpburnz commented Jan 6, 2026

Additionally, the ending of regular paths changed:

  • dir results in ^(?:.+/)?dir(?:(?P<{_DIR_MARK}>/)|$) instead of ^(?:.+/)?dir(?:(?P<{_DIR_MARK}>/).*)?$.
  • dir/ results in ^(?:.+/)?dir(?P<{_DIR_MARK}>/) instead of (?:.+/)?dir(?P<{_DIR_MARK}>/).*$.

@skshetry skshetry merged commit c6c680d into treeverse:main Jan 31, 2026
46 of 48 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in DVC Jan 31, 2026
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.

3 participants