-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pep508: ensure whitespace prefix for quoted marker
Prior to this fix, when formatting PEP 508 dependency specification for remote url references, the quoted marker was not prefixed with required whitespace. This change ensures that the format adheres to the specified grammar. Resolves: python-poetry/poetry#2326
- Loading branch information
Showing
8 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from poetry.core.utils.helpers import parse_requires | ||
|
||
|
||
def test_parse_requires(): | ||
requires = """\ | ||
jsonschema>=2.6.0.0,<3.0.0.0 | ||
lockfile>=0.12.0.0,<0.13.0.0 | ||
pip-tools>=1.11.0.0,<2.0.0.0 | ||
pkginfo>=1.4.0.0,<2.0.0.0 | ||
pyrsistent>=0.14.2.0,<0.15.0.0 | ||
toml>=0.9.0.0,<0.10.0.0 | ||
cleo>=0.6.0.0,<0.7.0.0 | ||
cachy>=0.1.1.0,<0.2.0.0 | ||
cachecontrol>=0.12.4.0,<0.13.0.0 | ||
requests>=2.18.0.0,<3.0.0.0 | ||
msgpack-python>=0.5.0.0,<0.6.0.0 | ||
pyparsing>=2.2.0.0,<3.0.0.0 | ||
requests-toolbelt>=0.8.0.0,<0.9.0.0 | ||
[:(python_version >= "2.7.0.0" and python_version < "2.8.0.0") or (python_version >= "3.4.0.0" and python_version < "3.5.0.0")] | ||
typing>=3.6.0.0,<4.0.0.0 | ||
[:python_version >= "2.7.0.0" and python_version < "2.8.0.0"] | ||
virtualenv>=15.2.0.0,<16.0.0.0 | ||
pathlib2>=2.3.0.0,<3.0.0.0 | ||
[:python_version >= "3.4.0.0" and python_version < "3.6.0.0"] | ||
zipfile36>=0.1.0.0,<0.2.0.0 | ||
[dev] | ||
isort@ git+git://github.com/timothycrosley/isort.git@e63ae06ec7d70b06df9e528357650281a3d3ec22#egg=isort | ||
""" | ||
result = parse_requires(requires) | ||
expected = [ | ||
"jsonschema>=2.6.0.0,<3.0.0.0", | ||
"lockfile>=0.12.0.0,<0.13.0.0", | ||
"pip-tools>=1.11.0.0,<2.0.0.0", | ||
"pkginfo>=1.4.0.0,<2.0.0.0", | ||
"pyrsistent>=0.14.2.0,<0.15.0.0", | ||
"toml>=0.9.0.0,<0.10.0.0", | ||
"cleo>=0.6.0.0,<0.7.0.0", | ||
"cachy>=0.1.1.0,<0.2.0.0", | ||
"cachecontrol>=0.12.4.0,<0.13.0.0", | ||
"requests>=2.18.0.0,<3.0.0.0", | ||
"msgpack-python>=0.5.0.0,<0.6.0.0", | ||
"pyparsing>=2.2.0.0,<3.0.0.0", | ||
"requests-toolbelt>=0.8.0.0,<0.9.0.0", | ||
'typing>=3.6.0.0,<4.0.0.0 ; (python_version >= "2.7.0.0" and python_version < "2.8.0.0") or (python_version >= "3.4.0.0" and python_version < "3.5.0.0")', | ||
'virtualenv>=15.2.0.0,<16.0.0.0 ; python_version >= "2.7.0.0" and python_version < "2.8.0.0"', | ||
'pathlib2>=2.3.0.0,<3.0.0.0 ; python_version >= "2.7.0.0" and python_version < "2.8.0.0"', | ||
'zipfile36>=0.1.0.0,<0.2.0.0 ; python_version >= "3.4.0.0" and python_version < "3.6.0.0"', | ||
'isort@ git+git://github.com/timothycrosley/isort.git@e63ae06ec7d70b06df9e528357650281a3d3ec22#egg=isort ; extra == "dev"', | ||
] | ||
assert result == expected |