Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
9d1a81e0
Unverified
Commit
9d1a81e0
authored
May 29, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of in environment markers with commas
parent
0e0a2612
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
CHANGELOG.md
+7
-0
poetry/packages/__init__.py
+2
-2
tests/packages/test_main.py
+12
-0
No files found.
CHANGELOG.md
View file @
9d1a81e0
# Change Log
# Change Log
## [Unreleased]
### Fixed
-
Fixed handling of
`in`
environment markers with commas.
## [0.10.1] - 2018-05-28
## [0.10.1] - 2018-05-28
### Fixed
### Fixed
...
...
poetry/packages/__init__.py
View file @
9d1a81e0
...
@@ -111,7 +111,7 @@ def dependency_from_pep_508(name):
...
@@ -111,7 +111,7 @@ def dependency_from_pep_508(name):
version
+=
'.*'
version
+=
'.*'
elif
op
==
'in'
:
elif
op
==
'in'
:
versions
=
[]
versions
=
[]
for
v
in
version
.
split
(
' '
):
for
v
in
re
.
split
(
'[ ,]+'
,
version
):
split
=
v
.
split
(
'.'
)
split
=
v
.
split
(
'.'
)
if
len
(
split
)
in
[
1
,
2
]:
if
len
(
split
)
in
[
1
,
2
]:
split
.
append
(
'*'
)
split
.
append
(
'*'
)
...
@@ -141,7 +141,7 @@ def dependency_from_pep_508(name):
...
@@ -141,7 +141,7 @@ def dependency_from_pep_508(name):
op
=
''
op
=
''
elif
op
==
'in'
:
elif
op
==
'in'
:
platforms
=
[]
platforms
=
[]
for
v
in
platform
.
split
(
' '
):
for
v
in
re
.
split
(
'[ ,]+'
,
platform
):
platforms
.
append
(
v
)
platforms
.
append
(
v
)
if
platforms
:
if
platforms
:
...
...
tests/packages/test_main.py
View file @
9d1a81e0
...
@@ -110,6 +110,18 @@ def test_dependency_python_version_in():
...
@@ -110,6 +110,18 @@ def test_dependency_python_version_in():
assert
dep
.
python_versions
==
'3.3.* || 3.4.* || 3.5.*'
assert
dep
.
python_versions
==
'3.3.* || 3.4.* || 3.5.*'
def
test_dependency_python_version_in_comma
():
name
=
(
'requests (==2.18.0); '
'python_version in
\'
3.3, 3.4, 3.5
\'
'
)
dep
=
dependency_from_pep_508
(
name
)
assert
dep
.
name
==
'requests'
assert
str
(
dep
.
constraint
)
==
'2.18.0'
assert
dep
.
python_versions
==
'3.3.* || 3.4.* || 3.5.*'
def
test_dependency_platform_in
():
def
test_dependency_platform_in
():
name
=
(
name
=
(
'requests (==2.18.0); '
'requests (==2.18.0); '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment