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
2949e15c
Unverified
Commit
2949e15c
authored
Jan 13, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
c640aaff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
poetry/puzzle/provider.py
+3
-5
poetry/utils/_compat.py
+6
-0
tests/mixology/version_solver/__init__.py
+4
-0
No files found.
poetry/puzzle/provider.py
View file @
2949e15c
...
@@ -3,7 +3,6 @@ import logging
...
@@ -3,7 +3,6 @@ import logging
import
os
import
os
import
pkginfo
import
pkginfo
import
re
import
re
import
shutil
import
time
import
time
from
cleo
import
ProgressIndicator
from
cleo
import
ProgressIndicator
...
@@ -11,8 +10,6 @@ from contextlib import contextmanager
...
@@ -11,8 +10,6 @@ from contextlib import contextmanager
from
tempfile
import
mkdtemp
from
tempfile
import
mkdtemp
from
typing
import
List
from
typing
import
List
from
poetry.io
import
NullIO
from
poetry.packages
import
Dependency
from
poetry.packages
import
Dependency
from
poetry.packages
import
DependencyPackage
from
poetry.packages
import
DependencyPackage
from
poetry.packages
import
DirectoryDependency
from
poetry.packages
import
DirectoryDependency
...
@@ -31,6 +28,7 @@ from poetry.repositories import Pool
...
@@ -31,6 +28,7 @@ from poetry.repositories import Pool
from
poetry.utils._compat
import
PY35
from
poetry.utils._compat
import
PY35
from
poetry.utils._compat
import
Path
from
poetry.utils._compat
import
Path
from
poetry.utils._compat
import
OrderedDict
from
poetry.utils.helpers
import
parse_requires
from
poetry.utils.helpers
import
parse_requires
from
poetry.utils.helpers
import
safe_rmtree
from
poetry.utils.helpers
import
safe_rmtree
from
poetry.utils.env
import
Env
from
poetry.utils.env
import
Env
...
@@ -491,7 +489,7 @@ class Provider:
...
@@ -491,7 +489,7 @@ class Provider:
# An example of this is:
# An example of this is:
# - pypiwin32 (220); sys_platform == "win32" and python_version >= "3.6"
# - pypiwin32 (220); sys_platform == "win32" and python_version >= "3.6"
# - pypiwin32 (219); sys_platform == "win32" and python_version < "3.6"
# - pypiwin32 (219); sys_platform == "win32" and python_version < "3.6"
duplicates
=
{}
duplicates
=
OrderedDict
()
for
dep
in
dependencies
:
for
dep
in
dependencies
:
if
dep
.
name
not
in
duplicates
:
if
dep
.
name
not
in
duplicates
:
duplicates
[
dep
.
name
]
=
[]
duplicates
[
dep
.
name
]
=
[]
...
@@ -507,7 +505,7 @@ class Provider:
...
@@ -507,7 +505,7 @@ class Provider:
self
.
debug
(
"<debug>Duplicate dependencies for {}</debug>"
.
format
(
dep_name
))
self
.
debug
(
"<debug>Duplicate dependencies for {}</debug>"
.
format
(
dep_name
))
# Regrouping by constraint
# Regrouping by constraint
by_constraint
=
{}
by_constraint
=
OrderedDict
()
for
dep
in
deps
:
for
dep
in
deps
:
if
dep
.
constraint
not
in
by_constraint
:
if
dep
.
constraint
not
in
by_constraint
:
by_constraint
[
dep
.
constraint
]
=
[]
by_constraint
[
dep
.
constraint
]
=
[]
...
...
poetry/utils/_compat.py
View file @
2949e15c
...
@@ -43,6 +43,12 @@ else:
...
@@ -43,6 +43,12 @@ else:
from
pathlib2
import
Path
from
pathlib2
import
Path
if
not
PY36
:
from
collections
import
OrderedDict
else
:
OrderedDict
=
dict
def
decode
(
string
,
encodings
=
None
):
def
decode
(
string
,
encodings
=
None
):
if
not
PY2
and
not
isinstance
(
string
,
bytes
):
if
not
PY2
and
not
isinstance
(
string
,
bytes
):
return
string
return
string
...
...
tests/mixology/version_solver/__init__.py
View file @
2949e15c
import
pytest
pytest
.
register_assert_rewrite
(
"tests.mixology.helpers"
)
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