-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
select.devpoll objects have no close() method #62994
Comments
See also issue bpo-16853 "add a Selector to the select module". |
This all sounds fine to fix without waiting for anything else -- can you attach a patch here? |
Just to be explicit (there are typos in Victor's original messages): it's about select.devpoll, for Solaris-derivatives with /dev/poll, and not for select.poll, based on poll() syscall. |
"Just to be explicit (there are typos in Victor's original messages): it's about select.devpoll, for Solaris-derivatives with /dev/poll, and not for select.poll, based on poll() syscall." Oops sorry, yes, I'm talking about select.devpoll, its structure has a "int fd_devpoll;" field: typedef struct {
PyObject_HEAD
int fd_devpoll;
int max_n_fds;
int n_fds;
struct pollfd *fds;
} devpollObject; |
"This all sounds fine to fix without waiting for anything else -- can you attach a patch here?" I opened the issue as a reminder for me. Here is a patch.
select.poll is still not tested. We should add much more tests, especially tests checking than a fd becomes ready for each implementation. We may develop these tests using bpo-16853 ? I ran test_select on Linux, so I only checked the epoll unit test. The "closed" attribute of epoll and kqueue objects should also be documented in Python 2.7 and 3.3. |
poll, devpoll, epoll and kqueue are tested in test_poll.py, test_devpoll.py, test_epoll.py and test_kqueue.py test files. |
Updated patch: move tests to the right test files and test that close() can be called more than once. |
New changeset ccbe2132392b by Victor Stinner in branch 'default': |
Charles-François Natali and Guido van Rossum: thanks for your reviews ;-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: