-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_specifier() raises an exception when not passed as string #1932
Comments
2 tasks
jaraco
added a commit
that referenced
this issue
Feb 28, 2021
…rror Handle AttributeError by raising DistutilsSetupError in check_specifier. Fixes #1932
This was referenced Mar 8, 2021
This was referenced Mar 15, 2021
This was referenced Mar 15, 2021
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 becauseSpecifierSet
class.split()
assuming that the value is a string. This causes:In my case, it happened to be a list containing one valid specifier.
Instead of failing with this error,
check_specifier()
should raiseDistutilsSetupError
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.
The text was updated successfully, but these errors were encountered: