fix(finders): filter find_wheel glob to .whl files only#1088
fix(finders): filter find_wheel glob to .whl files only#1088mergify[bot] merged 1 commit intopython-wheel-build:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/fromager/finders.py`:
- Around line 141-143: The loop in src/fromager/finders.py that iterates over
downloads_dir.glob("*.whl") should skip non-file entries to avoid returning
directories named "*.whl"; update the loop in which "for filename in
downloads_dir.glob('*.whl')" is used to check filename.is_file() before doing
the startswith(base) match and only return filename when filename.is_file() and
str(filename.name).lower().startswith(base.lower()); this ensures only actual
wheel files are selected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6a554d1d-0c11-41d1-8720-6fdbe4dd0b47
📒 Files selected for processing (2)
src/fromager/finders.pytests/test_finders.py
|
@mergify rebase |
find_wheel() used glob("*") which could match non-wheel files like
.tar.gz or .metadata, causing InvalidWheelFilename crashes downstream
in extract_info_from_wheel_file. Narrow the glob to "*.whl" so only
wheel files are considered.
Closes: python-wheel-build#1067
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Justin Larkin <jlarkin@redhat.com>
Made-with: Cursor
|
Deprecation notice: This pull request comes from a fork and was rebased using |
✅ Branch has been successfully rebased |
0664900 to
8def63a
Compare
Filter
find_wheel()glob from*to*.whlso only actual wheel files are considered, and add tests verifying non-wheel files are ignored.Closes: #1067