Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add dedicated error classes for the different ways filenames can be invalid #8

Open
jwodder opened this issue Nov 5, 2023 · 0 comments
Labels
enhancement New feature or request therefor

Comments

@jwodder
Copy link
Collaborator

jwodder commented Nov 5, 2023

The exceptions raised by parse_wheel_filename() should form a class hierarchy with InvalidFilenameError at the top and with child classes for the following conditions:

  • Filename does not end in ".whl"
  • Filename does not have the right number of hyphen-separated components
  • Project name is invalid
  • Version contains invalid characters
  • Build tag is invalid
  • Python/ABI/platform tag contains invalid characters

If multiple error conditions apply to a single filename, which error is raised is unspecified.

@jwodder jwodder added the enhancement New feature or request therefor label Nov 5, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request therefor
Projects
None yet
Development

No branches or pull requests

1 participant