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

Use select.poll instead of select.select to support fds higher than 1024 #668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nivye
Copy link

@nivye nivye commented Apr 5, 2020

select.select has a known issue in which it throws a ValueError exception for file descriptors higher than 1024 (similar issue at https://bugs.python.org/issue31610)

This change does not introduce any API changes and does not introduce any new behavior.
It solely replaces select.select by select.poll to be able to support file descriptors larger than 1024.

Also added a test to demonstrate the fix - replacing the new select.poll code portion by the previous select.select line, would raise a ValueError when handling the OperationalError.

@nivye nivye force-pushed the replace-select-by-poll branch 2 times, most recently from 8f597ab to caff13b Compare April 5, 2020 19:59
@codecov
Copy link

codecov bot commented Apr 5, 2020

Codecov Report

Merging #668 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #668   +/-   ##
=======================================
  Coverage   92.18%   92.18%           
=======================================
  Files          10       10           
  Lines        1037     1037           
  Branches      121      121           
=======================================
  Hits          956      956           
  Misses         65       65           
  Partials       16       16           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fb3256...c7536f8. Read the comment docs.

@nivye nivye force-pushed the replace-select-by-poll branch from caff13b to 2b91d4e Compare April 5, 2020 20:08
@nivye nivye force-pushed the replace-select-by-poll branch from 2b91d4e to c7536f8 Compare April 5, 2020 20:09
@aio-libs aio-libs deleted a comment from CLAassistant Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant