From 9ae9f7936ecd443048cc629e208d217492dcf790 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 19 May 2023 12:54:35 +0000 Subject: [PATCH] Pin python requests when installing docker-compose New urllib3 and python requests break python docker-compose. Pin requests back which should use an older urllib3. Hopefully this fixes docker-compose. Note this should probably only be used as a temporary workaround. A more permanent fix should change the way we install docker-compose. Also stop relying on six since it's no longer available and we dropped Python 2.7 support quite some time back anyway. Clean up some things in tox.ini which regressed in Tox v4. Co-Authored-By: Clark Boylan Change-Id: I69a7ba09f737130a403f0657708877ce986f751c --- gerritlib/gerrit.py | 4 ++-- playbooks/jeepyb-integration/run.yaml | 3 ++- requirements.txt | 1 - tox.ini | 3 --- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gerritlib/gerrit.py b/gerritlib/gerrit.py index 965b55b..1a4e853 100644 --- a/gerritlib/gerrit.py +++ b/gerritlib/gerrit.py @@ -17,8 +17,8 @@ import json import logging import platform import pprint +import queue import select -import six.moves import threading import time @@ -236,7 +236,7 @@ class Gerrit(object): def startWatching( self, connection_attempts=-1, retry_delay=5, ignore_events=None): - self.event_queue = six.moves.queue.Queue() + self.event_queue = queue.Queue() watcher = GerritWatcher(self, connection_attempts=connection_attempts, retry_delay=retry_delay, diff --git a/playbooks/jeepyb-integration/run.yaml b/playbooks/jeepyb-integration/run.yaml index 1efea3e..fa9dc43 100644 --- a/playbooks/jeepyb-integration/run.yaml +++ b/playbooks/jeepyb-integration/run.yaml @@ -21,8 +21,9 @@ # Run a gerrit - name: Install docker-compose - package: + pip: name: + - requests<2.30.0 - docker-compose state: present become: true diff --git a/requirements.txt b/requirements.txt index 9a7fcbf..31e2ab8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ pbr>=0.11 paramiko>=2.0.0 -six>=1.7.0 diff --git a/tox.ini b/tox.ini index 9653942..9ab2e34 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,11 @@ [tox] minversion = 1.6 -skipsdist = True skip_missing_interpreters = false # https://docs.python.org/devguide/#status-of-python-branches envlist = pep8, py{310,39,38,py} [testenv] setenv = VIRTUAL_ENV={envdir} -usedevelop = True -install_command = pip install {opts} {packages} deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs}