1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 01:38:15 +00:00

Merge pull request #2566 from SchoNie/python3.12+

ci: python 3.12+ compatibility
This commit is contained in:
Nicolas Duchon 2024-12-18 17:29:28 +01:00 committed by GitHub
commit c60eff5d16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View File

@ -25,10 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- name: Install dependencies
run: |

View File

@ -13,7 +13,7 @@ import docker
import pytest
import requests
from _pytest._code.code import ReprExceptionInfo
from distutils.version import LooseVersion
from packaging.version import Version
from docker.models.containers import Container
from requests.packages.urllib3.util.connection import HAS_IPV6
@ -557,5 +557,5 @@ try:
except docker.errors.ImageNotFound:
pytest.exit("The docker image 'nginxproxy/nginx-proxy:test' is missing")
if LooseVersion(docker.__version__) < LooseVersion("5.0.0"):
pytest.exit("This test suite is meant to work with the python docker module v5.0.0 or later")
if Version(docker.__version__) < Version("7.0.0"):
pytest.exit("This test suite is meant to work with the python docker module v7.0.0 or later")

View File

@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.12
ENV PYTEST_RUNNING_IN_CONTAINER=1

View File

@ -1,11 +1,11 @@
import docker
import pytest
from distutils.version import LooseVersion
from packaging.version import Version
raw_version = docker.from_env().version()["Version"]
pytestmark = pytest.mark.skipif(
LooseVersion(raw_version) < LooseVersion("1.13"),
Version(raw_version) < Version("1.13"),
reason="Docker compose syntax v3 requires docker engine v1.13 or later (got {raw_version})"
)