From 7a58f6145548c21f37e31cb0e3eb94c97e1bc5cd Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Sep 04 2018 10:01:18 +0000 Subject: Fix Jython virtualenvs (temporaily disbale cache) --- diff --git a/jython-no-cache.patch b/jython-no-cache.patch new file mode 100644 index 0000000..b87eed9 --- /dev/null +++ b/jython-no-cache.patch @@ -0,0 +1,15 @@ +diff --git a/src/pip/_internal/download.py b/src/pip/_internal/download.py +index 96f3b65..a58771b 100644 +--- a/src/pip/_internal/download.py ++++ b/src/pip/_internal/download.py +@@ -363,7 +363,9 @@ class PipSession(requests.Session): + # this because we can't validate the response of an insecurely fetched + # origin, and we don't want someone to be able to poison the cache and + # require manual eviction from the cache to fix it. +- if cache: ++ # We also disable cache on Jython, as a temporary workaround of ++ # https://github.com/pypa/pip/issues/5296 ++ if cache and not sys.platform.startswith('java'): + secure_adapter = CacheControlAdapter( + cache=SafeFileCache(cache, use_dir_lock=True), + max_retries=retries, diff --git a/python-pip.spec b/python-pip.spec index 933810f..bddd2b4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 18.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -88,6 +88,10 @@ Patch1: emit-a-warning-when-running-with-root-privileges.patch # Add path to the doc themes to conf.py Patch2: html_theme_path.patch +# Make Jython based virtualenvs work again by disabling cache +# https://github.com/pypa/pip/issues/5296 +Patch3: jython-no-cache.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older versions. @@ -250,6 +254,7 @@ popd %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -447,6 +452,9 @@ export PYTHONPATH=src %endif %changelog +* Wed Aug 29 2018 Miro Hrončok - 18.0-4 +- Fix Jython virtualenvs (temporarily disable cache) + * Wed Aug 08 2018 Miro Hrončok - 18.0-3 - Create python-pip-wheel package with the wheel