GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use poll() instead of select(), unless Windows. by I-question-this · Pull Request #2865 · docker/docker-py

Conversation

@I-question-this

@I-question-this I-question-this commented Jul 22, 2021

Copy link
Copy Markdown
Contributor

Fixes #2278, which was originally addressed in #2279, but was not
properly merged. Additionally it did not address the problem
of poll not existing on Windows. This patch falls back on the
more limited select method if host system is Windows.

Signed-off-by: Tyler Westland [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@I-question-this
Use poll() instead of select(), unless Windows.
69742c4
Fixes docker#2278, which was originally addressed in docker#2279, but was not
properly merged. Additionally it did not address the problem
of poll not existing on Windows. This patch falls back on the
more limited select method if host system is Windows.

Signed-off-by: Tyler Westland <[email protected]>
@I-question-this
I-question-this requested review from aiordache and ulyssessouza as code owners July 22, 2021 20:20
@milas milas added the dco/no label Aug 12, 2022
@joaoleveiga

joaoleveiga commented Apr 21, 2023

Copy link
Copy Markdown

Hello there. Is there a chance that this PR can be picked up again? As it stands it looks like it's incorrectly signed off: https://github.com/docker/docker-py/pull/2865/checks?check_run_id=4356046759

Can you do this, @I-question-this or might someone else pick it up?

Thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@I-question-this
I-question-this force-pushed the master branch 2 times, most recently from e44521f to 69742c4 Compare April 21, 2023 13:39
@I-question-this

I-question-this commented Apr 21, 2023

Copy link
Copy Markdown
Contributor Author

Hello there. Is there a chance that this PR can be picked up again? As it stands it looks like it's incorrectly signed off: https://github.com/docker/docker-py/pull/2865/checks?check_run_id=4356046759

Can you do this, @I-question-this or might someone else pick it up?

Thanks

@jjoaoleveiga I have resolved this issue. I had not intended for that second commit to be a part of this but had not properly made a different branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@I-question-this
Merge branch 'main' into master
c049906
@milas
milas requested review from milas and removed request for aiordache and ulyssessouza April 21, 2023 21:12
@milas milas self-assigned this Apr 21, 2023
@milas milas added kind/bug group/windows and removed dco/no labels Apr 21, 2023
milas
milas approved these changes Apr 21, 2023
View reviewed changes

@milas milas left a comment

Copy link
Copy Markdown
Contributor

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.

Thanks for the PR! CI looks good on Linux, and I verified it hits the select path on Windows and poll on macOS.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@milas
milas merged commit a02ba74 into docker:main Apr 21, 2023
felixfontein added a commit to felixfontein/community.docker that referenced this pull request May 10, 2023
@felixfontein @I-question-this
socket: use poll() instead of select() except on Windows (docker/dock…
5a4b4d0
…er-py#2865)

Fixes docker/docker-py#2278, which was originally addressed in docker/docker-py#2279, but was not
properly merged. Additionally it did not address the problem
of poll not existing on Windows. This patch falls back on the
more limited select method if host system is Windows.

Cherry-picked from docker/docker-py@a02ba74

Co-authored-by: Tyler Westland <[email protected]>
@tito tito mentioned this pull request May 16, 2023
Cannot use docker with eventlet since #2865 #3131
Closed
tito added a commit to tito/docker-py that referenced this pull request May 16, 2023
@tito
Check if poll attribute exists on select module instead of win32 plat…
8a4c55f
…form check

The implementation done in docker#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#3131

Signed-off-by: Mathieu Virbel <[email protected]>
@tito tito mentioned this pull request May 16, 2023
fix: eventlet compatibility #3132
Merged
@mariolenz mariolenz mentioned this pull request May 20, 2023
vendored Docker SDK for Python code: update to latest version ansible-collections/community.docker#619
Merged
felixfontein added a commit to ansible-collections/community.docker that referenced this pull request May 20, 2023
@felixfontein @milas
@I-question-this @ImogenBits @loicleyendecker
vendored Docker SDK for Python code: update to latest version (#619)
1660bf4
* socket: fix for errors on pipe close in Windows (docker/docker-py#3099)

Need to return data, not size. By returning an empty
string, EOF will be detected properly since `len()`
will be `0`.

Fixes docker/docker-py#3098.

Cherry-picked from docker/docker-py@f846232

Co-authored-by: Milas Bowman <[email protected]>

* socket: use poll() instead of select() except on Windows (docker/docker-py#2865)

Fixes docker/docker-py#2278, which was originally addressed in docker/docker-py#2279, but was not
properly merged. Additionally it did not address the problem
of poll not existing on Windows. This patch falls back on the
more limited select method if host system is Windows.

Cherry-picked from docker/docker-py@a02ba74

Co-authored-by: Tyler Westland <[email protected]>

* api: respect timeouts on Windows named pipes (docker/docker-py#3112)

Cherry-picked from docker/docker-py@9cadad0

Co-authored-by: Imogen <[email protected]>

* Add URL to changelog.

* api: avoid socket timeouts when executing commands (docker/docker-py#3125)

Only listen to read events when polling a socket in order
to avoid incorrectly trying to read from a socket that is
not actually ready.

Cherry-picked from docker/docker-py@c5e582c

Co-authored-by: Loïc Leyendecker <[email protected]>

---------

Co-authored-by: Milas Bowman <[email protected]>
Co-authored-by: Tyler Westland <[email protected]>
Co-authored-by: Imogen <[email protected]>
Co-authored-by: Loïc Leyendecker <[email protected]>
milas pushed a commit that referenced this pull request Jun 1, 2023
@tito
fix: eventlet compatibility (#3132)
78439eb
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 #3131

Signed-off-by: Mathieu Virbel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@milas milas milas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@milas milas

Labels

group/windows kind/bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

exec_run: filedescriptor out of range in select() (python3)

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@I-question-this @joaoleveiga @milas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.