Skip to content

Commit

Permalink
Merge pull request #2898 from hugovk/add-3.10
Browse files Browse the repository at this point in the history
Add support for Python 3.10
  • Loading branch information
StefanScherer authored Oct 14, 2021
2 parents ac5f6ef + 4bb9931 commit a48a5a9
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enum34==1.1.6
idna==2.5
ipaddress==1.0.18
packaging==16.8
paramiko==2.4.2
paramiko==2.8.0
pycparser==2.17
pyOpenSSL==18.0.0
pyparsing==2.2.0
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[bdist_wheel]
universal = 1

[metadata]
description_file = README.rst
license = Apache License 2.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'tls': ['pyOpenSSL>=17.5.0', 'cryptography>=3.4.7', 'idna>=2.0.0'],

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

}

Expand Down Expand Up @@ -75,6 +75,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License',
Expand Down
13 changes: 6 additions & 7 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
setuptools==54.1.1
coverage==4.5.2
flake8==3.6.0
mock==1.0.1
pytest==4.3.1
pytest-cov==2.6.1
pytest-timeout==1.3.3
setuptools==58.2.0
coverage==6.0.1
flake8==4.0.1
pytest==6.2.5
pytest-cov==3.0.0
pytest-timeout==2.0.1
6 changes: 1 addition & 5 deletions tests/integration/credentials/utils_test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import os

from docker.credentials.utils import create_environment_dict

try:
from unittest import mock
except ImportError:
from unittest import mock
from unittest import mock


@mock.patch.dict(os.environ)
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/api_container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import docker
from docker.api import APIClient
from unittest import mock
import pytest

from . import fake_api
Expand All @@ -13,11 +14,6 @@
fake_inspect_container, url_base
)

try:
from unittest import mock
except ImportError:
from unittest import mock


def fake_inspect_container_tty(self, container):
return fake_inspect_container(self, container, tty=True)
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/api_image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@

from . import fake_api
from docker import auth
from unittest import mock
from .api_test import (
BaseAPIClientTest, fake_request, DEFAULT_TIMEOUT_SECONDS, url_prefix,
fake_resolve_authconfig
)

try:
from unittest import mock
except ImportError:
from unittest import mock


class ImageTest(BaseAPIClientTest):
def test_image_viz(self):
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/api_network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

from .api_test import BaseAPIClientTest, url_prefix, response
from docker.types import IPAMConfig, IPAMPool

try:
from unittest import mock
except ImportError:
from unittest import mock
from unittest import mock


class NetworkTest(BaseAPIClientTest):
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@
from docker.api import APIClient
from docker.constants import DEFAULT_DOCKER_API_VERSION
from requests.packages import urllib3
from unittest import mock

from . import fake_api

try:
from unittest import mock
except ImportError:
from unittest import mock


DEFAULT_TIMEOUT_SECONDS = docker.constants.DEFAULT_TIMEOUT_SECONDS

Expand Down
7 changes: 1 addition & 6 deletions tests/unit/auth_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@
import unittest

from docker import auth, credentials, errors
from unittest import mock
import pytest

try:
from unittest import mock
except ImportError:
from unittest import mock


class RegressionTest(unittest.TestCase):
def test_803_urlsafe_encode(self):
auth_data = {
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
DEFAULT_MAX_POOL_SIZE, IS_WINDOWS_PLATFORM
)
from docker.utils import kwargs_from_env
from unittest import mock

from . import fake_api

try:
from unittest import mock
except ImportError:
from unittest import mock

TEST_CERT_DIR = os.path.join(os.path.dirname(__file__), 'testdata/certs')
POOL_SIZE = 20

Expand Down
6 changes: 1 addition & 5 deletions tests/unit/dockertypes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
IPAMPool, LogConfig, Mount, ServiceMode, Ulimit,
)
from docker.types.services import convert_service_ports

try:
from unittest import mock
except: # noqa: E722
from unittest import mock
from unittest import mock


def create_host_config(*args, **kwargs):
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/fake_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

import docker
from docker.constants import DEFAULT_DOCKER_API_VERSION
from unittest import mock
from . import fake_api

try:
from unittest import mock
except ImportError:
from unittest import mock


class CopyReturnMagicMock(mock.MagicMock):
"""
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/utils_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
import json

from pytest import mark, fixture
from unittest import mock

from docker.utils import config

try:
from unittest import mock
except ImportError:
from unittest import mock


class FindConfigFileTest(unittest.TestCase):

Expand Down

0 comments on commit a48a5a9

Please sign in to comment.