Skip to content
Snippets Groups Projects
Commit 0eebde34 authored by Scott Kitterman's avatar Scott Kitterman
Browse files

Patch command/list.py to round trip versions through string and back to...

Patch command/list.py to round trip versions through string and back to versions to work around pip/setuptools incompatibility (Closes: #912379)

* Patch command/list.py to round trip versions through string and back to
  versions to work around pip/setuptools incompatibility (Closes: #912379)
  - Add debian/patches/commands_list_version_workaround.patch
parent d781c89a
No related branches found
No related tags found
No related merge requests found
Pipeline #121634 failed
python-pip (20.0.2-4) UNRELEASED; urgency=medium
* Patch command/list.py to round trip versions through string and back to
versions to work around pip/setuptools incompatibility (Closes: #912379)
- Add debian/patches/commands_list_version_workaround.patch
-- Scott Kitterman <scott@kitterman.com> Tue, 31 Mar 2020 23:36:55 -0400
python-pip (20.0.2-3) unstable; urgency=medium
* Add myself to uploaders
......
Description: Make sure pip's version parsing is always used
* Patch command/list.py to round trip versions through string and back to
versions to work around pip/setuptools incompatibility (Closes: #912379)
Author: Scott Kitterman <scott@kitterman.com>
Bug-Debian: https://bugs.debian.org/912379
Origin: vendor
Bug: https://github.com/pypa/setuptools/issues/2052
Forwarded: https://github.com/pypa/setuptools/issues/2052
Last-Update: 2020-04-01
--- python-pip-20.0.2.orig/src/pip/_internal/commands/list.py
+++ python-pip-20.0.2/src/pip/_internal/commands/list.py
@@ -22,6 +22,8 @@ from pip._internal.utils.misc import (
)
from pip._internal.utils.packaging import get_installer
+from pip._vendor.packaging.version import parse
+
logger = logging.getLogger(__name__)
@@ -164,13 +166,13 @@ class ListCommand(IndexGroupCommand):
def get_outdated(self, packages, options):
return [
dist for dist in self.iter_packages_latest_infos(packages, options)
- if dist.latest_version > dist.parsed_version
+ if parse(str(dist.latest_version)) > parse(str(dist.parsed_version))
]
def get_uptodate(self, packages, options):
return [
dist for dist in self.iter_packages_latest_infos(packages, options)
- if dist.latest_version == dist.parsed_version
+ if parse(str(dist.latest_version)) == parse(str(dist.parsed_version))
]
def get_not_required(self, packages, options):
......@@ -5,3 +5,4 @@ set_user_default.patch
disable-pip-version-check.patch
add_appdirs_to_vendored.patch
use_vendored_pep517.patch
commands_list_version_workaround.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment