-
- Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
dist.check_specifier() is used to validate that the given argument is valid. The documentation and the error message it produces clearly states the value should be a string. However, if the value is something other than a string, DistutilsSetupError is not raised. This is because SpecifierSet class .split() assuming that the value is a string. This causes:
AttributeError: 'lXXX' object has no attribute 'split' In my case, it happened to be a list containing one valid specifier.
Instead of failing with this error, check_specifier() should raise DistutilsSetupError to clearly indicate that it was given a value of the wrong type.
This is related to #1869 in that it is hitting the same error. But, I'm suggesting the type be properly checked instead of allowing other types.
Metadata
Metadata
Assignees
Labels
No labels