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
bb32ad22
Unverified
Commit
bb32ad22
authored
May 17, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compatibility with Python <3.6
parent
2e70578d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
5 deletions
+14
-5
poetry/packages/dependency.py
+3
-0
poetry/pub/partial_solution.py
+5
-3
poetry/pub/term.py
+2
-1
poetry/pub/version_solver.py
+1
-1
poetry/semver/semver/version.py
+3
-0
No files found.
poetry/packages/dependency.py
View file @
bb32ad22
...
...
@@ -282,6 +282,9 @@ class Dependency(object):
return
self
.
_name
==
other
.
name
and
self
.
_constraint
==
other
.
constraint
def
__ne__
(
self
,
other
):
return
not
self
==
other
def
__hash__
(
self
):
return
hash
((
self
.
_name
,
self
.
_pretty_constraint
))
...
...
poetry/pub/partial_solution.py
View file @
bb32ad22
from
collections
import
OrderedDict
from
typing
import
Any
from
typing
import
Dict
from
typing
import
List
...
...
@@ -23,13 +25,13 @@ class PartialSolution:
self
.
_assignments
=
[]
# type: List[Assignment]
# The decisions made for each package.
self
.
_decisions
=
{}
# type: Dict[str, Any]
self
.
_decisions
=
OrderedDict
()
# type: Dict[str, Any]
# The intersection of all positive Assignments for each package, minus any
# negative Assignments that refer to that package.
#
# This is derived from self._assignments.
self
.
_positive
=
{}
# type: Dict[str, Term]
self
.
_positive
=
OrderedDict
()
# type: Dict[str, Term]
# The union of all negative [Assignment]s for each package.
#
...
...
@@ -37,7 +39,7 @@ class PartialSolution:
# map.
#
# This is derived from self._assignments.
self
.
_negative
=
{}
# type: Dict[str, Dict[str, Term]]
self
.
_negative
=
OrderedDict
()
# type: Dict[str, Dict[str, Term]]
self
.
_attempted_solutions
=
1
self
.
_backtracking
=
False
...
...
poetry/pub/term.py
View file @
bb32ad22
# -*- coding: utf-8 -*-
from
poetry.packages
import
Dependency
from
.set_relation
import
SetRelation
class
Term
:
class
Term
(
object
)
:
"""
A statement about a package which is true or false for a given selection of
package versions.
...
...
poetry/pub/version_solver.py
View file @
bb32ad22
# -*- coding: utf-8 -*-
import
time
from
typing
import
Dict
...
...
@@ -11,7 +12,6 @@ from poetry.semver.semver import VersionRange
from
.failure
import
SolveFailure
from
.incompatibility
import
Incompatibility
from
.incompatibility_cause
import
ConflictCause
from
.incompatibility_cause
import
DependencyCause
from
.incompatibility_cause
import
NoVersionsCause
from
.incompatibility_cause
import
PackageNotFoundCause
from
.incompatibility_cause
import
RootCause
...
...
poetry/semver/semver/version.py
View file @
bb32ad22
...
...
@@ -365,6 +365,9 @@ class Version(VersionRange):
and
self
.
_build
==
other
.
build
)
def
__ne__
(
self
,
other
):
return
not
self
==
other
def
__str__
(
self
):
return
self
.
_text
...
...
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