We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following are valid versions:
>>> packaging.version.Version('1.0.0b1') <Version('1.0.0b1')> >>> packaging.version.Version('1.0.0-b1') <Version('1.0.0b1')> >>> packaging.version.Version('1.0.0-beta1') <Version('1.0.0b1')> >>> packaging.version.Version('1.0.0-beta.1') <Version('1.0.0b1')>
The following are valid specifiers:
>>> packaging.specifiers.Specifier('>=1.0.0b1') <Specifier('>=1.0.0b1')> >>> packaging.specifiers.Specifier('>=1.0.0-b1') <Specifier('>=1.0.0-b1')> >>> packaging.specifiers.Specifier('>=1.0.0-beta1') <Specifier('>=1.0.0-beta1')> >>> packaging.specifiers.Specifier('>=1.0.0-beta.1') <Specifier('>=1.0.0-beta.1')>
The following requirements work:
>>> packaging.requirements.Requirement("eth-utils<2.0.0,>=1.0.0b1") <Requirement('eth-utils<2.0.0,>=1.0.0b1')> >>> packaging.requirements.Requirement("eth-utils<2.0.0,>=1.0.0-b1") <Requirement('eth-utils<2.0.0,>=1.0.0-b1')>
The following do not:
>>> packaging.requirements.Requirement("eth-utils<2.0.0,>=1.0.0-beta1") Traceback (most recent call last): File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/requirements.py", line 35, in __init__ parsed = parse_requirement(requirement_string) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 64, in parse_requirement return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 82, in _parse_requirement url, specifier, marker = _parse_requirement_details(tokenizer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 122, in _parse_requirement_details marker = _parse_requirement_marker( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 143, in _parse_requirement_marker tokenizer.raise_syntax_error( File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_tokenizer.py", line 161, in raise_syntax_error raise ParserSyntaxError( packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after version specifier) eth-utils<2.0.0,>=1.0.0-beta1 ~~~~~~~~~~~~~~~~^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/requirements.py", line 37, in __init__ raise InvalidRequirement(str(e)) from e packaging.requirements.InvalidRequirement: Expected end or semicolon (after version specifier) eth-utils<2.0.0,>=1.0.0-beta1 ~~~~~~~~~~~~~~~~^
>>> packaging.requirements.Requirement("eth-utils<2.0.0,>=1.0.0-beta.1") Traceback (most recent call last): File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/requirements.py", line 35, in __init__ parsed = parse_requirement(requirement_string) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 64, in parse_requirement return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 82, in _parse_requirement url, specifier, marker = _parse_requirement_details(tokenizer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 122, in _parse_requirement_details marker = _parse_requirement_marker( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_parser.py", line 143, in _parse_requirement_marker tokenizer.raise_syntax_error( File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/_tokenizer.py", line 161, in raise_syntax_error raise ParserSyntaxError( packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after version specifier) eth-utils<2.0.0,>=1.0.0-beta.1 ~~~~~~~~~~~~~~~~^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/di/.pyenv/versions/3.11.1/lib/python3.11/site-packages/packaging/requirements.py", line 37, in __init__ raise InvalidRequirement(str(e)) from e packaging.requirements.InvalidRequirement: Expected end or semicolon (after version specifier) eth-utils<2.0.0,>=1.0.0-beta.1 ~~~~~~~~~~~~~~~~^
This is true for alpha, beta, and preview but not other pre-release spellings specified in PEP 440.
alpha
beta
preview
The text was updated successfully, but these errors were encountered:
Duplicate of #629
Sorry, something went wrong.
Ah, thanks. I saw that had been merged but missed that it hadn't been released and hadn't looked closely enough.
No branches or pull requests
The following are valid versions:
The following are valid specifiers:
The following requirements work:
The following do not:
This is true for
alpha
,beta
, andpreview
but not other pre-release spellings specified in PEP 440.The text was updated successfully, but these errors were encountered: