-
Notifications
You must be signed in to change notification settings - Fork 253
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
error "must be a string containing valid version specifiers" when providing a valid version specifier #107
Comments
Bug is still present in Python 3.6.8, setuptools 40.6.2. |
Bug is still present in Python 3.7.4, setuptools 41.0.1. |
Can someone come up with a test case using just 'packaging' so we know for a fact it's here and not in setuptools (Jason thinks it's "probably" here, but we should prove that first)? And have people tested with version 19.1 that went out yesterday? |
PEP 345 is quite old, it has been superseded by PEP 566, which updates the version specifier specification to be what's defined in PEP 440. This PEP has no mention of specifiers without operators, but also doesn't specifically mention deprecating this from PEP 345. In addition, "fixing" this has the effect of making the following a valid requirement:
(as opposed to It'd be possible to add an additional constraint that "specifiers in requirements must have operators" but given that:
it might make more sense to amend the PEP instead to be more explicit that this is not supported. @ncoghlan, @dstufft, as the original authors of PEP 440, any thoughts here? |
@brettcannon This is definitely happening in packaging/tests/test_specifiers.py Lines 47 to 54 in 36984ad
|
We didn't really consider the However, The examples in PEP 345 indicate that the implied PEP 440 operator for |
Relevant lines from PEP 345:
|
I disagree. The specifier for That is distinct from |
(for those following via email -- I've updated my comment above) |
Ah, you're right - I missed that the examples without the specifier were more restrictive than the compatible version operator. We could still decide to allow tools to apply the more permissive interpretation, but I agree that would be a spec change, whereas the restrictive interpretation would just be bringing forward the existing PEP 345 definition. |
hey guys, I am also facing a quit similar issue here and I don't understand what should i do?
|
Please see #530, which is what you're seeing this message because of. |
Hello, please excuse me barging in here, it was suggested in the issue I submitted in setuptools pypa/setuptools#1049 that I should go upstream (i.e. here) with this.
First of all, I'm using Python 3.6.0, setuptools 36.0.0.
In my
setup.py
I have the following:And when running
python3.6 setup.py sdist
(or other*dist*
) I get the following error:But
3.5
is valid according to: https://www.python.org/dev/peps/pep-0345/#requires-pythonWhen I specify
>=3.5
or>3.5
or==3.5
or<3.5
or<=3.5
setuptools don't complain. But they somehow can't tolerate plain version number. I also checked some other version numbers, like3
or3.6
. Getting same results.I'm not sure if the problem is limited to
python_requires
field, but that's the only place I've seen it so far.The text was updated successfully, but these errors were encountered: