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
ac73c538
Unverified
Commit
ac73c538
authored
Mar 27, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve dependency resolution speed
parent
6223d061
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
3 deletions
+11
-3
CHANGELOG.md
+1
-0
poetry/console/commands/debug/resolve.py
+1
-0
poetry/mixology/resolution.py
+0
-1
poetry/puzzle/provider.py
+9
-1
poetry/puzzle/ui.py
+0
-1
No files found.
CHANGELOG.md
View file @
ac73c538
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
### Changed
### Changed
-
Improved dependency resolution to avoid unnecessary operations.
-
Improved dependency resolution to avoid unnecessary operations.
-
Improved dependency resolution speed.
## [0.6.5] - 2018-03-22
## [0.6.5] - 2018-03-22
...
...
poetry/console/commands/debug/resolve.py
View file @
ac73c538
...
@@ -43,6 +43,7 @@ class DebugResolveCommand(Command):
...
@@ -43,6 +43,7 @@ class DebugResolveCommand(Command):
self
.
poetry
.
package
,
self
.
poetry
.
package
,
self
.
poetry
.
pool
,
self
.
poetry
.
pool
,
Repository
(),
Repository
(),
Repository
(),
self
.
output
self
.
output
)
)
...
...
poetry/mixology/resolution.py
View file @
ac73c538
...
@@ -16,7 +16,6 @@ from .dependency_graph import DependencyGraph
...
@@ -16,7 +16,6 @@ from .dependency_graph import DependencyGraph
from
.helpers
import
flat_map
from
.helpers
import
flat_map
from
.possibility_set
import
PossibilitySet
from
.possibility_set
import
PossibilitySet
from
.state
import
DependencyState
from
.state
import
DependencyState
from
.state
import
ResolutionState
from
.unwind_details
import
UnwindDetails
from
.unwind_details
import
UnwindDetails
from
.utils
import
unique
from
.utils
import
unique
...
...
poetry/puzzle/provider.py
View file @
ac73c538
...
@@ -33,6 +33,8 @@ class Provider(SpecificationProvider):
...
@@ -33,6 +33,8 @@ class Provider(SpecificationProvider):
self
.
_package
=
package
self
.
_package
=
package
self
.
_pool
=
pool
self
.
_pool
=
pool
self
.
_python_constraint
=
package
.
python_constraint
self
.
_python_constraint
=
package
.
python_constraint
self
.
_base_dg
=
DependencyGraph
()
self
.
_search_for
=
{}
@property
@property
def
pool
(
self
)
->
Pool
:
def
pool
(
self
)
->
Pool
:
...
@@ -59,6 +61,9 @@ class Provider(SpecificationProvider):
...
@@ -59,6 +61,9 @@ class Provider(SpecificationProvider):
The specifications in the returned list will be considered in reverse
The specifications in the returned list will be considered in reverse
order, so the latest version ought to be last.
order, so the latest version ought to be last.
"""
"""
if
dependency
in
self
.
_search_for
:
return
self
.
_search_for
[
dependency
]
if
dependency
.
is_vcs
():
if
dependency
.
is_vcs
():
return
self
.
search_for_vcs
(
dependency
)
return
self
.
search_for_vcs
(
dependency
)
...
@@ -76,7 +81,9 @@ class Provider(SpecificationProvider):
...
@@ -76,7 +81,9 @@ class Provider(SpecificationProvider):
)
)
)
)
return
packages
self
.
_search_for
[
dependency
]
=
packages
return
self
.
_search_for
[
dependency
]
def
search_for_vcs
(
self
,
dependency
:
VCSDependency
)
->
List
[
Package
]:
def
search_for_vcs
(
self
,
dependency
:
VCSDependency
)
->
List
[
Package
]:
"""
"""
...
@@ -190,6 +197,7 @@ class Provider(SpecificationProvider):
...
@@ -190,6 +197,7 @@ class Provider(SpecificationProvider):
conflicts
:
Dict
[
str
,
List
[
Conflict
]]):
conflicts
:
Dict
[
str
,
List
[
Conflict
]]):
return
sorted
(
dependencies
,
key
=
lambda
d
:
[
return
sorted
(
dependencies
,
key
=
lambda
d
:
[
0
if
activated
.
vertex_named
(
d
.
name
)
.
payload
else
1
,
0
if
activated
.
vertex_named
(
d
.
name
)
.
payload
else
1
,
0
if
activated
.
vertex_named
(
d
.
name
)
.
root
else
1
,
0
if
d
.
allows_prereleases
()
else
1
,
0
if
d
.
allows_prereleases
()
else
1
,
0
if
d
.
name
in
conflicts
else
1
,
0
if
d
.
name
in
conflicts
else
1
,
0
if
activated
.
vertex_named
(
d
.
name
)
.
payload
else
len
(
self
.
search_for
(
d
))
0
if
activated
.
vertex_named
(
d
.
name
)
.
payload
else
len
(
self
.
search_for
(
d
))
...
...
poetry/puzzle/ui.py
View file @
ac73c538
from
cleo.styles
import
CleoStyle
from
cleo.styles
import
CleoStyle
from
cleo.helpers
import
ProgressIndicator
from
poetry.mixology.contracts
import
UI
as
BaseUI
from
poetry.mixology.contracts
import
UI
as
BaseUI
...
...
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