-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
correct how to install Docker SDK for Python #74288
Conversation
@daeseokyoun The following file(s) in this pull request are bundled copies of modules used to support incidental tests and should not be updated:
Because the original module(s) have been migrated to collections, please re-submit this pull request in relevant collection repositories, typically under https://github.com/ansible-collections. If you need further assistence with identifying the correct repository, please stop by IRC or the mailing list:
|
The test
|
The test
|
cc @felixfontein not sure if you are still working on the Docker modules, if so are you able to look at the doc changes here. As for the modification of the help code I'm not 100% sure it's needed. If the module for Python 2.7 only supports up to a certain version then |
I still do.
I also said this before, but it looks like that doesn't really work. In community.docker's CI some jobs were failing when docker-py 5.0.0 was released (CentOS 7 and Ubuntu 16.04) - see the first commit in ansible-collections/community.docker#120. Maybe the pip versions in these images are too old to support that? |
@@ -334,11 +334,13 @@ def __init__(self, argument_spec=None, supports_check_mode=False, mutually_exclu | |||
|
|||
if not HAS_DOCKER_PY: | |||
if NEEDS_DOCKER_PY2: | |||
msg = missing_required_lib("Docker SDK for Python: docker") | |||
msg = msg + ", for example via `pip install docker`. The error was: %s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this file makes no sense, this is a copy that is only used in ansible/ansible's integration tests. You should modify https://github.com/ansible-collections/community.docker/blob/main/plugins/module_utils/common.py#L264 instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jinx 😉
Files in |
Thanks @felixfontein for confirming, disappointing that the metadata isn't present to have |
@jborean93 the setup.py included in https://files.pythonhosted.org/packages/fa/a2/e46d7c1b51394a09271a3b07c3a68deb3a669429beafd444d9553ed52868/docker-5.0.0.tar.gz does say |
Maybe it requires a |
@felixfontein @jborean93 Do I need to create new PR for this to community.docker repo? how about the docs/docsite/rst/scenario_guides/guide_docker.rst file? |
@daeseokyoun you still need to change docs/docsite/rst/scenario_guides/guide_docker.rst in this repo, but not the other file. For communit.docker you need to create a new PR. |
@felixfontein Thanks for your comment. I will update this PR to leave only the commit related to guide_docker.rst, and create a new PR for the common.py on community.docker repo. |
The latest version 5.0.0 do not support Python 2.7 anymore. It need to guide how to install docker / docker-py module for proper Python version.
7f3c9a9
to
30b204c
Compare
indicate available python version range with only text instead of using mathematical symbol. Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Thanks @daeseokyoun for this PR! |
* docs: correct guide for the latest Docker SDK for Python Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Sandra McCann <samccann@redhat.com> Co-authored-by: Daeseok Youn <daeseok.youn@navercorp.com> Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> (cherry picked from commit 9369bd6)
* Fix issue with version 3 in docs version list (#74089) Previously would subsitute the "3" in "s3" instead of the version location in the URL (cherry picked from commit 325ccf2) * corrected epmhasis line (#74254) need to be careful when adding lines as you create a different offset (cherry picked from commit 7b39ee3) * correct how to install Docker SDK for Python (#74288) * docs: correct guide for the latest Docker SDK for Python Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Sandra McCann <samccann@redhat.com> Co-authored-by: Daeseok Youn <daeseok.youn@navercorp.com> Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> (cherry picked from commit 9369bd6) * Provide results to examples (#73984) (cherry picked from commit 99a2b5f) * remove deprecated ansible.module_utils._text from documentation (#73211) According to comment in ansible.module_utils._text it is deprecated and should not be used. This is now reflected in the documentation. (cherry picked from commit 5e5bfa8) * Update playbooks_filters.rst (#74242) ##### SUMMARY Make the `random` filter description more clear. (cherry picked from commit 5f391a7) * Docs: Fix k8s_config_resource_name YAML example (#74129) The `name` key should be beneath `metadata`: (cherry picked from commit c9c8459) * Update lookup.rst (#73716) Document that users must pass `allow_unsafe=True` as an option in the lookup to allow templating, with a note about security implications. Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> Co-authored-by: Sandra McCann <samccann@redhat.com> (cherry picked from commit c0cc574) * vmware: Add a note about known issue (#73273) Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Co-authored-by: Sandra McCann <samccann@redhat.com> Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> (cherry picked from commit 6e56e72) Co-authored-by: Scott Sinclair <252082+pwae@users.noreply.github.com> Co-authored-by: Brian Coca <bcoca@users.noreply.github.com> Co-authored-by: daeseokyoun <daeseok.youn@gmail.com> Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com> Co-authored-by: schurzi <github@drachen-server.de> Co-authored-by: yuri <1969yuri1969@gmail.com> Co-authored-by: ml <6209465+ml-@users.noreply.github.com> Co-authored-by: sry9681 <sry9681@users.noreply.github.com> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
SUMMARY
The latest version 5.0.0 do not support Python 2.7 anymore.
Documents and error message to guide docker/docker-py module with pip corresponding Python version.
ISSUE TYPE
COMPONENT NAME
docker
ADDITIONAL INFORMATION
When install Docker SDK for Python 5.0.0 in system used Python 2.7, ansible failed to run related to docker module with following message.
But it is not correct, the 5.0.0 do not support Python 2.7. We should install docker sdk version before 5.0.0 or install Python 3.6 in target system. so correct message following below: