#14 [ON HOLD] Fix Jython virtualenvs
Closed 9 months ago by churchyard. Opened 11 months ago by churchyard.
rpms/ churchyard/python-pip jython  into  master

@@ -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,

file modified
+9 -1

@@ -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 @@ 

  # 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 @@ 

  %patch0 -p1

  %patch1 -p1

  %patch2 -p1

+ %patch3 -p1

  

  

  %build

@@ -447,6 +452,9 @@ 

  %endif

  

  %changelog

+ * Wed Aug 29 2018 Miro Hrončok <mhroncok@redhat.com> - 18.0-4

+ - Fix Jython virtualenvs (temporarily disable cache)

+ 

  * Wed Aug 08 2018 Miro Hrončok <mhroncok@redhat.com> - 18.0-3

  - Create python-pip-wheel package with the wheel

  

rebased onto c29f012c6b6a68965e388a1fac5410c55d6a9876

11 months ago

rebased onto 935d6779747aaf5e0eb6edc822a797bd2b87ec3b

11 months ago

Ready for review.

Reproducer:

$ virtualenv -pjython venv

I still have problems, particularly I never got past "Collecting pluggy>=0.7 (from pytest)", yet basic venv creation and some pip installs work, so this is an improvement.

Looks like a good workaround. +1 Koji build?

rebased onto 7a58f61

10 months ago

Rebased on master, no changes.

As for reproducing, I cannot reproduce the issue in the fedora:rawhide docker container. When I run the reproducer:

$ virtualenv -pjython venv

Everything goes fine. It only gets stuck when I run:

$ pip install ply pep8 mako pytest
....
Collecting pluggy>=0.7 (from pytest)

Here are the relevant package versions:

$ rpm -qv jython python3-virtualenv python3-pip
jython-2.7.1-7.fc30.noarch
python3-virtualenv-16.0.0-5.fc30.noarch
python3-pip-18.0-3.fc30.noarch

Well, this is weird. I cannot reproduce this either. What the damn. OK. Let's keep this on hold while we get Jython virtualenvs CI tested.

Pull-Request has been closed by churchyard

9 months ago