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
64d172b8
Unverified
Commit
64d172b8
authored
Feb 27, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tilde operator parsing in semver package
parent
cdda1393
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
poetry/semver/version_parser.py
+1
-1
tests/mixology/fixtures/case/django.json
+1
-1
tests/semver/test_main.py
+4
-4
tests/semver/test_version_parser.py
+5
-4
No files found.
poetry/semver/version_parser.py
View file @
64d172b8
...
...
@@ -111,7 +111,7 @@ class VersionParser:
elif
m
.
group
(
3
):
position
=
2
elif
m
.
group
(
2
):
position
=
1
position
=
2
else
:
position
=
0
...
...
tests/mixology/fixtures/case/django.json
View file @
64d172b8
...
...
@@ -17,7 +17,7 @@
"dependencies"
:
[
{
"name"
:
"django"
,
"version"
:
"1.4.
1
"
,
"version"
:
"1.4.
3
"
,
"dependencies"
:
[
]
...
...
tests/semver/test_main.py
View file @
64d172b8
...
...
@@ -49,10 +49,10 @@ from poetry.semver import sort, rsort, statisfies, satisfied_by
(
'2.1.3'
,
'1.2.* || 2.*'
),
(
'1.2.3'
,
'1.2.* || 2.*'
),
(
'1.2.3'
,
'*'
),
(
'2.9.0'
,
'
~
2.4'
),
# >= 2.4.0 < 3.0.0
(
'2.9.0'
,
'
^
2.4'
),
# >= 2.4.0 < 3.0.0
(
'2.4.5'
,
'~2.4'
),
(
'1.2.3'
,
'~1'
),
# >= 1.0.0 < 2.0.0
(
'1.
4.7'
,
'~1.0'
),
# >= 1.0.0 < 2.0
.0
(
'1.
0.7'
,
'~1.0'
),
# >= 1.0.0 < 1.1
.0
(
'1.0.0'
,
'>=1'
),
(
'1.0.0'
,
'>= 1'
),
(
'1.2.8'
,
'>1.2'
),
# > 1.2.0
...
...
@@ -135,8 +135,8 @@ def test_statisfies_negative(version, constraint):
[
(
'~1.0'
,
[
'1.0'
,
'1.
2'
,
'1.9999.9999
'
,
'2.0'
,
'2.1'
,
'0.9999.9999'
],
[
'1.0'
,
'1.
2'
,
'1.9999.999
9'
],
[
'1.0'
,
'1.
0.9'
,
'1.2
'
,
'2.0'
,
'2.1'
,
'0.9999.9999'
],
[
'1.0'
,
'1.
0.
9'
],
),
(
'>1.0 <3.0 || >=4.0'
,
...
...
tests/semver/test_version_parser.py
View file @
64d172b8
...
...
@@ -64,13 +64,14 @@ def test_parse_constraints_wildcard(parser, input, min, max):
'input,min,max'
,
[
(
'~v1'
,
Constraint
(
'>='
,
'1.0.0.0'
),
Constraint
(
'<'
,
'2.0.0.0'
)),
(
'~1.0'
,
Constraint
(
'>='
,
'1.0.0.0'
),
Constraint
(
'<'
,
'
2.0
.0.0'
)),
(
'~1.0'
,
Constraint
(
'>='
,
'1.0.0.0'
),
Constraint
(
'<'
,
'
1.1
.0.0'
)),
(
'~1.0.0'
,
Constraint
(
'>='
,
'1.0.0.0'
),
Constraint
(
'<'
,
'1.1.0.0'
)),
(
'~1.2'
,
Constraint
(
'>='
,
'1.2.0.0'
),
Constraint
(
'<'
,
'
2.0
.0.0'
)),
(
'~1.2'
,
Constraint
(
'>='
,
'1.2.0.0'
),
Constraint
(
'<'
,
'
1.3
.0.0'
)),
(
'~1.2.3'
,
Constraint
(
'>='
,
'1.2.3.0'
),
Constraint
(
'<'
,
'1.3.0.0'
)),
(
'~1.2.3.4'
,
Constraint
(
'>='
,
'1.2.3.4'
),
Constraint
(
'<'
,
'1.2.4.0'
)),
(
'~1.2-beta'
,
Constraint
(
'>='
,
'1.2.0.0-beta'
),
Constraint
(
'<'
,
'2.0.0.0'
)),
(
'~1.2-b2'
,
Constraint
(
'>='
,
'1.2.0.0-beta.2'
),
Constraint
(
'<'
,
'2.0.0.0'
)),
(
'~1.2-beta'
,
Constraint
(
'>='
,
'1.2.0.0-beta'
),
Constraint
(
'<'
,
'1.3.0.0'
)),
(
'~1.2-b2'
,
Constraint
(
'>='
,
'1.2.0.0-beta.2'
),
Constraint
(
'<'
,
'1.3.0.0'
)),
(
'~0.3'
,
Constraint
(
'>='
,
'0.3.0.0'
),
Constraint
(
'<'
,
'0.4.0.0'
)),
]
)
def
test_parse_constraints_tilde
(
parser
,
input
,
min
,
max
):
...
...
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