Skip to content

🐛 fix(seed): skip --extra-search-dir entries that are files - #3587

Merged
gaborbernat merged 2 commits into
pypa:mainfrom
Pratik-Kumar-Dhakar:fix/extra-search-dir-file
Nov 20, 2026
Merged

gaborbernat merged 2 commits into
pypa:mainfrom
Pratik-Kumar-Dhakar:fix/extra-search-dir-file

Conversation

@Pratik-Kumar-Dhakar

@Pratik-Kumar-Dhakar Pratik-Kumar-Dhakar commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3582.

--extra-search-dir takes directories containing wheels. Passing a file previously reached wheel discovery, where iterdir() raised NotADirectoryError and seeding reported a download failure. File paths now get skipped, like missing paths.

The seeder filters non-directories before wheel lookup for both app-data and pip seeding. Valid directories remain in the configured search order.

Contributor checklist

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are tests validating the fix
  • added a docs/changelog/+short-description.<type>.rst fragment for the user-facing change
  • updated or extended the documentation
  • explained the outside input: a file path supplied to --extra-search-dir
  • ran affected tests on Python 3.9 and 3.15
  • linked upstream issues beside any temporary interpreter overrides
  • kept the PR in draft until CI passes

@Pratik-Kumar-Dhakar
Pratik-Kumar-Dhakar marked this pull request as ready for review November 19, 2026 16:58
Pratik-Kumar-Dhakar and others added 2 commits November 19, 2026 17:11
A file passed the existence check, then wheel discovery called iterdir()
and failed. Keep only directories so a file input is ignored like a
missing path.

Fixes pypa#3582
@gaborbernat
gaborbernat force-pushed the fix/extra-search-dir-file branch from 70db354 to c4e8d12 Compare November 20, 2026 01:12
@gaborbernat
gaborbernat merged commit ebe0611 into pypa:main Nov 20, 2026
154 of 156 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--extra-search-dir pointing at a file crashes seeding with a misleading download error

2 participants