Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict requests to < 2.29.0 #612

Merged
merged 2 commits into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions changelogs/fragments/612-requests-2.29.0.yml
Original file line number Diff line number Diff line change
@@ -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)."
3 changes: 2 additions & 1 deletion meta/ee-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion plugins/doc_fragments/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tests/utils/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down