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
5b3df562
Commit
5b3df562
authored
May 23, 2022
by
Randy Döring
Committed by
Arun Babu Neelicattu
May 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transaction: code documentation for special condition to decide if packages have to be updated
parent
03e9c2b0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/poetry/puzzle/transaction.py
+11
-0
No files found.
src/poetry/puzzle/transaction.py
View file @
5b3df562
...
@@ -42,8 +42,19 @@ class Transaction:
...
@@ -42,8 +42,19 @@ class Transaction:
if
result_package
.
name
==
installed_package
.
name
:
if
result_package
.
name
==
installed_package
.
name
:
installed
=
True
installed
=
True
# We have to perform an update if the version or another
# attribute of the package has changed (source type, url, ref, ...).
if
result_package
.
version
!=
installed_package
.
version
or
(
if
result_package
.
version
!=
installed_package
.
version
or
(
(
(
# This has to be done because installed packages cannot
# have type "legacy". If a package with type "legacy"
# is installed, the installed package has no source_type.
# Thus, if installed_package has no source_type and
# the result_package has source_type "legacy" (negation of
# the following condition), update must not be performed.
# This quirk has the side effect that when switching
# from PyPI to legacy (or vice versa),
# no update is performed.
installed_package
.
source_type
installed_package
.
source_type
or
result_package
.
source_type
!=
"legacy"
or
result_package
.
source_type
!=
"legacy"
)
)
...
...
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