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 <cboylan@sapwetik.org>
Change-Id: I69a7ba09f737130a403f0657708877ce986f751c
This commit is contained in:
Jeremy Stanley 2023-05-19 12:54:35 +00:00
parent 0c5c5871fe
commit 9ae9f7936e
4 changed files with 4 additions and 7 deletions

View File

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

View File

@ -21,8 +21,9 @@
# Run a gerrit
- name: Install docker-compose
package:
pip:
name:
- requests<2.30.0
- docker-compose
state: present
become: true

View File

@ -1,3 +1,2 @@
pbr>=0.11
paramiko>=2.0.0
six>=1.7.0

View File

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