diff --git a/README.md b/README.md index e82e0a8ed..681c6ebb8 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Some modules and plugins require Docker CLI, or other external, programs. Some r Installing the Docker SDK for Python also installs the requirements for the modules and plugins that use `requests`. If you want to directly install the Python libraries instead of the SDK, you need the following ones: -- [requests](https://pypi.org/project/requests/); +- [requests](https://pypi.org/project/requests/) (versions before 2.29.0); - [pywin32](https://pypi.org/project/pywin32/) when using named pipes on Windows with the Windows 32 API; - [paramiko](https://pypi.org/project/paramiko/) when using SSH to connect to the Docker daemon with `use_ssh_client=false`; - [pyOpenSSL](https://pypi.org/project/pyOpenSSL/) when using TLS to connect to the Docker daemon; diff --git a/changelogs/fragments/612-requests-2.29.0.yml b/changelogs/fragments/612-requests-2.29.0.yml new file mode 100644 index 000000000..23c71ea0d --- /dev/null +++ b/changelogs/fragments/612-requests-2.29.0.yml @@ -0,0 +1,4 @@ +known_issues: + - "The modules and plugins using the vendored code from Docker SDK for Python currently do not work with requests 2.29.0. The same is currently true for the latest version of Docker SDK for Python itself (https://github.com/ansible-collections/community.docker/issues/611, https://github.com/ansible-collections/community.docker/pull/612)." +minor_changes: + - "Restrict requests to versions before 2.29.0, and urllib3 to versions before 2.0.0. This is necessary until the vendored code from Docker SDK for Python has been fully adjusted to work with a feature of urllib3 that is used since requests 2.29.0 (https://github.com/ansible-collections/community.docker/issues/611, https://github.com/ansible-collections/community.docker/pull/612)." diff --git a/meta/ee-requirements.txt b/meta/ee-requirements.txt index 101b74b5f..565b1113e 100644 --- a/meta/ee-requirements.txt +++ b/meta/ee-requirements.txt @@ -3,7 +3,8 @@ # SPDX-License-Identifier: GPL-3.0-or-later docker -requests +urllib3 < 2.0 # TODO see https://github.com/ansible-collections/community.docker/issues/611 +requests < 2.29 # TODO see https://github.com/ansible-collections/community.docker/issues/611 paramiko # We assume that EEs are not based on Windows, and have Python >= 3.5. diff --git a/plugins/doc_fragments/docker.py b/plugins/doc_fragments/docker.py index 4c537850e..71ed5807f 100644 --- a/plugins/doc_fragments/docker.py +++ b/plugins/doc_fragments/docker.py @@ -289,7 +289,7 @@ class ModuleDocFragment(object): communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection. requirements: - - requests + - requests < 2.29.0 (see U(https://github.com/ansible-collections/community.docker/issues/611)) - pywin32 (when using named pipes on Windows 32) - paramiko (when using SSH with I(use_ssh_client=false)) - pyOpenSSL (when using TLS) diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index d8fcb61d5..c8a2c39ed 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -10,11 +10,13 @@ coverage >= 4.5.4, < 5.0.0 ; python_version > '3.7' # coverage had a bug in < 4. cryptography >= 1.3.0, < 2.2 ; python_version < '2.7' # cryptography 2.2 drops support for python 2.6 cryptography >= 1.3.0, < 3.4 ; python_version < '3.6' # cryptography 3.4 drops support for python 2.7 urllib3 < 1.24 ; python_version < '2.7' # urllib3 1.24 and later require python 2.7 or later +urllib3 < 2.0.0 # TODO see https://github.com/ansible-collections/community.docker/issues/611 wheel < 0.30.0 ; python_version < '2.7' # wheel 0.30.0 and later require python 2.7 or later paramiko < 2.4.0 ; python_version < '2.7' # paramiko 2.4.0 drops support for python 2.6 paramiko < 3.0.0 ; python_version < '3.7' # paramiko 3.0.0 forces installation of a too new cryptography requests < 2.20.0 ; python_version < '2.7' # requests 2.20.0 drops support for python 2.6 requests < 2.28 ; python_version < '3.7' # requests 2.28.0 drops support for python < 3.7 +requests < 2.29 # TODO see https://github.com/ansible-collections/community.docker/issues/611 virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later pyopenssl < 18.0.0 ; python_version < '2.7' # pyOpenSSL 18.0.0 and later require python 2.7 or later setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later