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
d78b57f2
Unverified
Commit
d78b57f2
authored
Jul 05, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve output of the debug resolve command
parent
4300d607
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
poetry/console/commands/debug/resolve.py
+13
-9
tests/console/commands/debug/test_resolve.py
+4
-4
No files found.
poetry/console/commands/debug/resolve.py
View file @
d78b57f2
...
@@ -94,6 +94,8 @@ class DebugResolveCommand(Command):
...
@@ -94,6 +94,8 @@ class DebugResolveCommand(Command):
current_python_version
=
parse_constraint
(
current_python_version
=
parse_constraint
(
"."
.
join
(
str
(
v
)
for
v
in
env
.
version_info
)
"."
.
join
(
str
(
v
)
for
v
in
env
.
version_info
)
)
)
table
=
self
.
table
([],
style
=
"borderless"
)
rows
=
[]
for
op
in
ops
:
for
op
in
ops
:
pkg
=
op
.
package
pkg
=
op
.
package
if
self
.
option
(
"install"
):
if
self
.
option
(
"install"
):
...
@@ -101,17 +103,19 @@ class DebugResolveCommand(Command):
...
@@ -101,17 +103,19 @@ class DebugResolveCommand(Command):
current_python_version
current_python_version
)
or
not
env
.
is_valid_for_marker
(
pkg
.
marker
):
)
or
not
env
.
is_valid_for_marker
(
pkg
.
marker
):
continue
continue
row
=
[
self
.
line
(
"<info>{}</info>"
.
format
(
pkg
.
name
),
" - <info>{}</info> (<comment>{}</comment>)"
.
format
(
"<b>{}</b>"
.
format
(
pkg
.
version
),
pkg
.
name
,
pkg
.
version
""
,
)
]
)
if
not
pkg
.
python_constraint
.
is_any
():
self
.
line
(
" - python: {}"
.
format
(
pkg
.
python_versions
))
if
not
pkg
.
marker
.
is_any
():
if
not
pkg
.
marker
.
is_any
():
self
.
line
(
" - marker: {}"
.
format
(
pkg
.
marker
))
row
[
2
]
=
str
(
pkg
.
marker
)
rows
.
append
(
row
)
table
.
set_rows
(
rows
)
table
.
render
(
self
.
io
)
def
_determine_requirements
(
self
,
requires
):
# type: (List[str]) -> List[str]
def
_determine_requirements
(
self
,
requires
):
# type: (List[str]) -> List[str]
from
poetry.semver
import
parse_constraint
from
poetry.semver
import
parse_constraint
...
...
tests/console/commands/debug/test_resolve.py
View file @
d78b57f2
...
@@ -21,8 +21,8 @@ Resolving dependencies...
...
@@ -21,8 +21,8 @@ Resolving dependencies...
Resolution results:
Resolution results:
- msgpack-python (0.5.3)
msgpack-python 0.5.3
- cachy (0.2.0)
cachy 0.2.0
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
expected
==
tester
.
io
.
fetch_output
()
...
@@ -67,8 +67,8 @@ Resolving dependencies...
...
@@ -67,8 +67,8 @@ Resolving dependencies...
Resolution results:
Resolution results:
- pendulum (2.0.3)
pendulum 2.0.3
- demo (0.1.2)
demo 0.1.2
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
expected
==
tester
.
io
.
fetch_output
()
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