Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin urllib3 < 2.0.0 #322

Merged
merged 5 commits into from
Jun 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -11,10 +11,6 @@ jobs:
include:
- python: 3.x
toxenv: pep8
- python: 3.9
toxenv: placement
- python: 3.6
toxenv: py36
- python: 3.7
toxenv: py37
- python: 3.8
@@ -23,10 +19,10 @@ jobs:
toxenv: py39
- python: "3.10"
toxenv: py310
- python: pypy3
- python: "3.11"
toxenv: py311
- python: pypy-3.8
toxenv: pypy3
- python: 3.6
toxenv: py36-pytest
- python: 3.7
toxenv: py37-pytest
- python: 3.8
@@ -51,3 +47,5 @@ jobs:
- run: tox
env:
TOXENV: ${{ matrix.toxenv }}
# Skip network using tests as they are unreliable
GABBI_SKIP_NETWORK: true
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ pbr
pytest
six
PyYAML
urllib3>=1.26.9
urllib3>=1.26.9,<2.0.0
certifi
jsonpath-rw-ext>=1.0.0
wsgi-intercept>=1.9.3
9 changes: 3 additions & 6 deletions test-failskip.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
#!/bin/bash -e
#!/bin/bash -ex
# Run the tests and confirm that the stuff we expect to skip or fail
# does.

# this would be somewhat less complex in bash4..
shopt -s nocasematch
[[ "${GABBI_SKIP_NETWORK:-false}" == "true" ]] && SKIP=7 || SKIP=2
[[ "${GABBI_SKIP_NETWORK:-false}" == "true" ]] && SKIP=12 || SKIP=2
[[ "${GABBI_SKIP_NETWORK:-false}" == "true" ]] && FAILS=15 || FAILS=16
shopt -u nocasematch

FAILS=16

GREP_FAIL_MATCH="expected failures=$FAILS"
GREP_SKIP_MATCH="skipped=$SKIP,"
# This skip is always 2 because the pytest tests don't
# run the live tests.
PYTEST_MATCH="$SKIP skipped, $FAILS xfailed"

stestr run && \
31 changes: 9 additions & 22 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -6,13 +6,13 @@ envlist = pep8,py37,py38,py39,py310,pypy3,pep8,limit,failskip,docs,py39-prefix,p
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = rm
allowlist_externals = rm
usedevelop = True
install_command = pip install --no-cache -U {opts} {packages}
commands =
stestr run {posargs}
setenv = GABBI_PREFIX=
passenv = GABBI_* HOME
passenv = GABBI_*, HOME

[testenv:venv]
deps = -r{toxinidir}/requirements.txt
@@ -44,12 +44,15 @@ commands =
flake8

[testenv:py39-limit]
allowlist_externals = {toxinidir}/test-limit.sh
commands = {toxinidir}/test-limit.sh

[testenv:py39-verbosity]
allowlist_externals = {toxinidir}/test-verbosity.sh
commands = {toxinidir}/test-verbosity.sh

[testenv:py39-failskip]
allowlist_externals = {toxinidir}/test-failskip.sh
commands = {toxinidir}/test-failskip.sh

# Use pytest when in pypy3 because stestr fails on loading readline.
@@ -74,28 +77,12 @@ commands =
basepython = python3
commands = py.test --cov=gabbi gabbi/tests --cov-config .coveragerc --cov-report html

[testenv:placement]
basepython = python3.9
deps = tox
commands = -mkdir {envdir}/src
-rm -r {envdir}/src/*
bash -c "curl -L https://tarballs.opendev.org/openstack/placement/placement-master.tar.gz | tar -C {envdir}/src -zx --strip-components 1 -f - "
tox -c {envdir}/src -e functional-py39 --notest # ensure a virtualenv is built
# placement shares tox envs so use the named shared env
{envdir}/src/.tox/py39/bin/pip install -U {toxinidir} # install gabbi
tox -c {envdir}/src -e functional-py39 test_api
whitelist_externals =
mkdir
curl
tar
rm
bash

[testenv:docs]
commands =
rm -rf doc/build
python setup.py build_sphinx
whitelist_externals =
rm -rf docs/build
sphinx-build docs/source docs/build
deps = sphinx
allowlist_externals =
rm

[flake8]