Skip to content

Commit

Permalink
deps: test on Python 3.10 by default (#3010)
Browse files Browse the repository at this point in the history
* Upgrade to latest Sphinx / recommonmark
* Small CSS fix for issue in new version of Alabaster theme
* Fix `Makefile` target for macOS

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
  • Loading branch information
milas authored Jul 27, 2022
1 parent 0ee9f26 commit da62a28
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ version: 2
sphinx:
configuration: docs/conf.py

build:
os: ubuntu-20.04
tools:
python: '3.10'

python:
version: 3.6
install:
- requirements: docs-requirements.txt
- requirements: requirements.txt
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.7
ARG PYTHON_VERSION=3.10

FROM python:${PYTHON_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-docs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.7
ARG PYTHON_VERSION=3.10

FROM python:${PYTHON_VERSION}

Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def buildImages = { ->
imageDindSSH = "${imageNameBase}:sshdind-${gitCommit()}"
withDockerRegistry(credentialsId:'dockerbuildbot-index.docker.io') {
buildImage(imageDindSSH, "-f tests/Dockerfile-ssh-dind .", "")
buildImage(imageNamePy3, "-f tests/Dockerfile --build-arg PYTHON_VERSION=3.7 .", "py3.7")
buildImage(imageNamePy3, "-f tests/Dockerfile --build-arg PYTHON_VERSION=3.10 .", "py3.10")
}
}
}
Expand Down Expand Up @@ -70,7 +70,7 @@ def runTests = { Map settings ->
throw new Exception("Need Docker version to test, e.g.: `runTests(dockerVersion: '19.03.12')`")
}
if (!pythonVersion) {
throw new Exception("Need Python version being tested, e.g.: `runTests(pythonVersion: 'py3.7')`")
throw new Exception("Need Python version being tested, e.g.: `runTests(pythonVersion: 'py3.x')`")
}

{ ->
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
TEST_API_VERSION ?= 1.41
TEST_ENGINE_VERSION ?= 20.10

ifeq ($(OS),Windows_NT)
PLATFORM := Windows
else
PLATFORM := $(shell sh -c 'uname -s 2>/dev/null || echo Unknown')
endif

ifeq ($(PLATFORM),Linux)
uid_args := "--build-arg uid=$(shell id -u) --build-arg gid=$(shell id -g)"
endif

.PHONY: all
all: test

Expand All @@ -19,7 +29,7 @@ build-py3:

.PHONY: build-docs
build-docs:
docker build -t docker-sdk-python-docs -f Dockerfile-docs --build-arg uid=$(shell id -u) --build-arg gid=$(shell id -g) .
docker build -t docker-sdk-python-docs -f Dockerfile-docs $(uid_args) .

.PHONY: build-dind-certs
build-dind-certs:
Expand Down
4 changes: 2 additions & 2 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recommonmark==0.4.0
Sphinx==1.4.6
recommonmark==0.7.1
Sphinx==5.1.1
5 changes: 5 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
dl.hide-signature > dt {
display: none;
}

dl.field-list > dt {
/* prevent code blocks from forcing wrapping on the "Parameters" header */
word-break: initial;
}
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
install_requires=requirements,
tests_require=test_requirements,
extras_require=extras_require,
python_requires='>=3.6',
python_requires='>=3.7',
zip_safe=False,
test_suite='tests',
classifiers=[
Expand All @@ -72,7 +72,6 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.7
ARG PYTHON_VERSION=3.10

FROM python:${PYTHON_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile-dind-certs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.6
ARG PYTHON_VERSION=3.10

FROM python:${PYTHON_VERSION}
RUN mkdir /tmp/certs
Expand Down
4 changes: 2 additions & 2 deletions tests/Dockerfile-ssh-dind
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG API_VERSION=1.39
ARG ENGINE_VERSION=19.03.12
ARG API_VERSION=1.41
ARG ENGINE_VERSION=20.10.17

FROM docker:${ENGINE_VERSION}-dind

Expand Down

0 comments on commit da62a28

Please sign in to comment.