This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: docstring of select.epoll.register() is wrong
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gennad, orsenthil, python-dev, sandro.tosi, thekorn
Priority: normal Keywords: patch

Created on 2011-03-16 10:39 by thekorn, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
11568.patch gennad, 2011-03-17 11:03 Patch for 3.3 branch. Fixes the docstring review
Messages (7)
msg131100 - (view) Author: Markus Korn (thekorn) Date: 2011-03-16 10:39
select.epoll.register raises an IOError for already registered fds, however the docstring says the fd gets modified:


Python 2.7.1+ (r271:86832, Feb 24 2011, 15:00:15) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> print select.epoll.register.__doc__
register(fd[, eventmask]) -> None

Registers a new fd or modifies an already registered fd.
fd is the target file descriptor of the operation.
events is a bit set composed of the various EPOLL constants; the default
is EPOLL_IN | EPOLL_OUT | EPOLL_PRI.

The epoll interface supports all file descriptors that support poll.
>>>
msg131240 - (view) Author: Gennadiy Zlobin (gennad) * Date: 2011-03-17 11:03
The patch fixes the docstring
msg139188 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-06-26 15:12
The patch is fine: but would you be interested in trying to write a unittest for select.epoll.register ? it would be really nice to start having 'select' tested (oh no, don't ask me how to test select since I have no idea :)).
msg139235 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-27 06:50
New changeset 0610f70e6694 by Senthil Kumaran in branch '3.2':
Fix closes issue 11568 - update select.epoll.register docstring with mention of correct behavior.
http://hg.python.org/cpython/rev/0610f70e6694
msg139236 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-27 06:51
New changeset a6586cb660dc by Senthil Kumaran in branch '2.7':
Fix closes issue 11568 - update select.epoll.register docstring with mention of correct behavior.
http://hg.python.org/cpython/rev/a6586cb660dc
msg139237 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-06-27 06:54
On Sun, Jun 26, 2011 at 03:12:30PM +0000, Sandro Tosi wrote:
> The patch is fine: but would you be interested in trying to write a
> unittest for select.epoll.register ? it would be really nice to

This is covered in test_epoll.py
msg139238 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-06-27 07:14
Ah, I find the test file name a bit unhappy (why not test select.epoll in test_select? or add select in the filename?) but since it's covered - I'm fine! :) Next time I'll grep instead of simple file glob - thanks for your help, Senthil.
History
Date User Action Args
2022-04-11 14:57:14adminsetgithub: 55777
2011-06-27 07:14:33sandro.tosisetmessages: + msg139238
2011-06-27 06:54:04orsenthilsetnosy: + orsenthil
messages: + msg139237
2011-06-27 06:51:24python-devsetmessages: + msg139236
2011-06-27 06:50:02python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg139235

resolution: fixed
stage: patch review -> resolved
2011-06-26 15:12:30sandro.tosisetversions: + Python 2.7, Python 3.2, Python 3.3
nosy: + sandro.tosi

messages: + msg139188

stage: patch review
2011-03-17 11:03:58gennadsetfiles: + 11568.patch

nosy: + gennad
messages: + msg131240

keywords: + patch
2011-03-17 10:58:41gennadsetassignee: docs@python

type: behavior
components: + Documentation
nosy: + docs@python
2011-03-16 10:39:19thekorncreate