Skip to content

Commit a48a5a9

Browse files
Merge pull request docker#2898 from hugovk/add-3.10
Add support for Python 3.10
2 parents ac5f6ef + 4bb9931 commit a48a5a9

File tree

15 files changed

+20
-64
lines changed

15 files changed

+20
-64
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
max-parallel: 1
1010
matrix:
11-
python-version: [3.6, 3.7, 3.8, 3.9]
11+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
1212

1313
steps:
1414
- uses: actions/checkout@v2

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ enum34==1.1.6
77
idna==2.5
88
ipaddress==1.0.18
99
packaging==16.8
10-
paramiko==2.4.2
10+
paramiko==2.8.0
1111
pycparser==2.17
1212
pyOpenSSL==18.0.0
1313
pyparsing==2.2.0

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[bdist_wheel]
2-
universal = 1
3-
41
[metadata]
52
description_file = README.rst
63
license = Apache License 2.0

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
'tls': ['pyOpenSSL>=17.5.0', 'cryptography>=3.4.7', 'idna>=2.0.0'],
3030

3131
# Only required when connecting using the ssh:// protocol
32-
'ssh': ['paramiko>=2.4.2'],
32+
'ssh': ['paramiko>=2.4.3'],
3333

3434
}
3535

@@ -75,6 +75,7 @@
7575
'Programming Language :: Python :: 3.7',
7676
'Programming Language :: Python :: 3.8',
7777
'Programming Language :: Python :: 3.9',
78+
'Programming Language :: Python :: 3.10',
7879
'Topic :: Software Development',
7980
'Topic :: Utilities',
8081
'License :: OSI Approved :: Apache Software License',

test-requirements.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
setuptools==54.1.1
2-
coverage==4.5.2
3-
flake8==3.6.0
4-
mock==1.0.1
5-
pytest==4.3.1
6-
pytest-cov==2.6.1
7-
pytest-timeout==1.3.3
1+
setuptools==58.2.0
2+
coverage==6.0.1
3+
flake8==4.0.1
4+
pytest==6.2.5
5+
pytest-cov==3.0.0
6+
pytest-timeout==2.0.1

tests/integration/credentials/utils_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import os
22

33
from docker.credentials.utils import create_environment_dict
4-
5-
try:
6-
from unittest import mock
7-
except ImportError:
8-
from unittest import mock
4+
from unittest import mock
95

106

117
@mock.patch.dict(os.environ)

tests/unit/api_container_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import docker
66
from docker.api import APIClient
7+
from unittest import mock
78
import pytest
89

910
from . import fake_api
@@ -13,11 +14,6 @@
1314
fake_inspect_container, url_base
1415
)
1516

16-
try:
17-
from unittest import mock
18-
except ImportError:
19-
from unittest import mock
20-
2117

2218
def fake_inspect_container_tty(self, container):
2319
return fake_inspect_container(self, container, tty=True)

tests/unit/api_image_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
from . import fake_api
55
from docker import auth
6+
from unittest import mock
67
from .api_test import (
78
BaseAPIClientTest, fake_request, DEFAULT_TIMEOUT_SECONDS, url_prefix,
89
fake_resolve_authconfig
910
)
1011

11-
try:
12-
from unittest import mock
13-
except ImportError:
14-
from unittest import mock
15-
1612

1713
class ImageTest(BaseAPIClientTest):
1814
def test_image_viz(self):

tests/unit/api_network_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
from .api_test import BaseAPIClientTest, url_prefix, response
44
from docker.types import IPAMConfig, IPAMPool
5-
6-
try:
7-
from unittest import mock
8-
except ImportError:
9-
from unittest import mock
5+
from unittest import mock
106

117

128
class NetworkTest(BaseAPIClientTest):

tests/unit/api_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@
1919
from docker.api import APIClient
2020
from docker.constants import DEFAULT_DOCKER_API_VERSION
2121
from requests.packages import urllib3
22+
from unittest import mock
2223

2324
from . import fake_api
2425

25-
try:
26-
from unittest import mock
27-
except ImportError:
28-
from unittest import mock
29-
3026

3127
DEFAULT_TIMEOUT_SECONDS = docker.constants.DEFAULT_TIMEOUT_SECONDS
3228

0 commit comments

Comments
 (0)