Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

WSClient.update() fails on select.poll() when running in eventlet on Linux #281

Closed
@bobh66

Description

@bobh66

WSClient.update() was modified by PR #268 to use select.poll() instead of select.select, which breaks when running under eventlet on Linux:

  File "/usr/local/lib/python3.8/site-packages/kubernetes/stream/ws_client.py", line 182, in update
    poll = select.poll()
AttributeError: module 'select' has no attribute 'poll'
module 'select' has no attribute 'poll'

eventlet monkey_patches the select module and does not support the poll() method

Adding a check on getattr(select, "poll", None) is None to the if statement and reverting to select.select when there is no poll attribute will fix the problem.

I'll push a PR

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions