Item 878 of 881 Previous | Next

6
Vote

implement select module

description

<Thanks>Tomer Filiba</Thanks><OpenBuild>1.0 Beta 6</OpenBuild>
<Test>(CPy)test_select.py</Test>


4/26/2006 10:37 AM Opened by dinov
Implement the select module for supporting polling and waiting for async I/Os to complete.
6/9/2006 10:30 AM Edited by sborde
This is currently planned to be fixed shortly after 1.0. We need to prioritize bugs for the 1.0 release. If this seems to be an important issue that you would like to see fixed in 1.0, please let us know.

No files are attached

comments

dfugate wrote Mar 18 2008 at 7:25 PM

This isn't implemented correctly. For example, bad parameters passed to select.select should throw a select.error:
E:\External\Languages\IronPython20\25>C:\Python25\python.exe
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> select.select([],[],[])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
select.error: (10093, 'Either the application has not called WSAStartup, or WSAStartup failed')
>>> ^Z


E:\External\Languages\IronPython20\25>ipy
IronPython 2.0 Beta (2.0.0.1000) on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import select
>>> select.select([],[],[])
Traceback (most recent call last):
File , line unknown, in Initialize##11
error: (10022, 'An invalid argument was supplied')

>>> try: select.select([],[],[])
... except Exception, e: pass
...
>>> e
error((10022, 'An invalid argument was supplied'),)
>>> dir(e)
['DeleteCustomMember', 'GetBoundMember', 'InitializeFromClr', 'SetMemberAfter', 'ToString', '__class__', '__delattr__',
'__doc__', '__getattr__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__iter__', '__new__', '__reduce__'
, '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'args', 'get_Item', 'get_args', 'get_clsException', 'get_messag
e', 'message', 'set_args', 'set_message']
>>> type(e)
<type 'exceptions.error'>


Please make sure IronPython's implementation can pass CPython's test_select.py before resolving as fixed.

dfugate wrote Mar 11 2008 at 10:16 PM

Reassigning to dfugate.

wrote Aug 10 2006 at 5:05 PM

We have an implementation of this now that will be added post-1.0.