[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Charles-François Natali

Charles-François Natali added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor

STINNER Victor added the comment:

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;

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +serhiy.storchaka
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor

STINNER Victor added the comment:

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.

 * Add close() and fileno() methods and a closed attribute (property) to 
devpoll object
 * Document closed attribute of epoll and kqueue objects
 * Add tests on closed object for devpoll, epoll and kqueue. There was no test 
for devpoll, epoll nor kqueue :-(

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 #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.

--
keywords: +patch
Added file: http://bugs.python.org/file31397/devpoll_close.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

poll, devpoll, epoll and kqueue are tested in test_poll.py, test_devpoll.py, 
test_epoll.py and test_kqueue.py test files.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch: move tests to the right test files and test that close() can be 
called more than once.

--
Added file: http://bugs.python.org/file31404/devpoll_close-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy:  -gvanrossum

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ccbe2132392b by Victor Stinner in branch 'default':
Close #18794: Add a fileno() method and a closed attribute to select.devpoll
http://hg.python.org/cpython/rev/ccbe2132392b

--
nosy: +python-dev
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor

STINNER Victor added the comment:

Charles-François Natali and Guido van Rossum: thanks for your reviews ;-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-20 Thread STINNER Victor

New submission from STINNER Victor:

select.epoll and select.kqueue objects have a close() method, but not 
select.poll objects, whereas all these objects store internally a file 
descriptor.

select.poll lacks also a fileno() method.

I added the fileno() method in my implementation of the PEP 446 (see issue 
#18571).

--
messages: 195721
nosy: gvanrossum, haypo, neologix
priority: normal
severity: normal
status: open
title: select.devpoll objects have no close() method
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-20 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #16853 add a Selector to the select module.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-20 Thread Guido van Rossum

Guido van Rossum added the comment:

This all sounds fine to fix without waiting for anything else -- can you attach 
a patch here?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18794] select.devpoll objects have no close() method

2013-08-20 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com