-
Notifications
You must be signed in to change notification settings - Fork 122
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
Update vendored Docker SDK for Python code #694
Update vendored Docker SDK for Python code #694
Conversation
…ropagation https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation Cherry-picked from docker/docker-py@bea6322 Co-authored-by: Janne Jakob Fleischer <janne.fleischer@ils-forschung.de> Co-authored-by: Milas Bowman <milas.bowman@docker.com>
Check if poll attribute exists on select module instead of win32 platform check The implementation done in #2865 is breaking usage of docker-py library within eventlet. As per the Python `select.poll` documentation (https://docs.python.org/3/library/select.html#select.poll) and eventlet select removal advice (eventlet/eventlet#608 (comment)), it is preferable to use an implementation based on the availability of the `poll()` method that trying to check if the platform is `win32`. Fixes docker/docker-py#3131 Cherry-picked from docker/docker-py@78439eb Co-authored-by: Mathieu Virbel <mat@meltingrocks.com>
…ring rather than bytes Adjusted from docker/docker-py@0618951 Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> Co-authored-by: Milas Bowman <milas.bowman@docker.com>
Cherry-picked from docker/docker-py@0566f12 Co-authored-by: Aarni Koskela <akx@iki.fi>
@@ -43,7 +42,7 @@ def read(socket, n=4096): | |||
recoverable_errors = (errno.EINTR, errno.EDEADLK, errno.EWOULDBLOCK) | |||
|
|||
if PY3 and not isinstance(socket, NpipeSocket): | |||
if sys.platform == 'win32': | |||
if not hasattr(select, "poll"): |
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.
I don't really understand the specifics of what's going on here, but the conditional is quite different. Was the issue actually that select.poll
was not defined on Windows platforms? If the attribute exists on Windows but did not work (or didn't work correctly for this situation) then this test would cause failures.
I guess, this code being vendored, it never will run on Windows (unless I ever get around to trying to get Ansible Python modules to execute on Windows but alas....).
Still, what was the motivation for this change?
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.
This has been cherry-picked from docker/docker-py@78439eb to support eventlet. Our code neither supports Windows (outside WSL2) nor does it support eventlet, I'd still like the socket code to be as close as possible to Docker SDK for Python's code even for features we have no need for.
@briantist thanks a lot for reviewing this! |
SUMMARY
Vendor all relevant commits from docker/docker-py@bc4c0d7...c38656d.
ISSUE TYPE
COMPONENT NAME
vendored Docker SDK for Python code