classification
Title: calling kevent repr raises a TypeError
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: out of date
Dependencies: Superseder: select module - kevent ident field 64 bit issue
View: 7211
Assigned To: Nosy List: berker.peksag, christian.heimes, jesstess, pitrou
Priority: normal Keywords: patch

Created on 2009-08-20 20:41 by jesstess, last changed 2012-12-02 18:18 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
kqueue-event-repr.patch jesstess, 2009-08-20 20:41 patch against py3k review
kevent-repr-test.py jesstess, 2009-08-25 00:21 tiny example to generate the error
Messages (4)
msg91782 - (view) Author: Jessica McKellar (jesstess) * (Python triager) Date: 2009-08-20 20:41
kqueue_event_repr uses PyBytes_FromString when every other repr uses
PyUnicode_FromString, and this gets you a "TypeError: __repr__ returned
non-string (type bytes)". The patch swaps in PyUnicode_FromString and
adds a very simple unittest to test_kqueue.
msg91948 - (view) Author: Jessica McKellar (jesstess) * (Python triager) Date: 2009-08-25 00:21
Added a tiny example to generate the error, repeated here. Just:

from select import kevent

if __name__ == '__main__':
    ev = kevent(1)
    print(repr(ev))
msg176369 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2012-11-25 16:16
The bug has been fixed in issue 7211.

Related changeset: http://hg.python.org/cpython/rev/f89a93a778a8#l4.63

See the output of kevent-repr-test.py(tested in 3.2.3 and 3.3.0):

    <select.kevent ident=1 filter=-1 flags=0x1 fflags=0x0 data=0x0 udata=0x0>

I think this can be closed as out of date.
msg176804 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-12-02 18:18
Thank you, Berker. I'm now closing the issue.
History
Date User Action Args
2012-12-02 18:18:42pitrousetstatus: open -> closed

superseder: select module - kevent ident field 64 bit issue
assignee: christian.heimes ->

nosy: + pitrou
messages: + msg176804
resolution: out of date
stage: resolved
2012-11-25 16:16:33berker.peksagsetnosy: + berker.peksag
messages: + msg176369
2009-08-25 10:49:23benjamin.petersonsetassignee: christian.heimes

nosy: + christian.heimes
2009-08-25 00:21:48jesstesssetfiles: + kevent-repr-test.py

messages: + msg91948
2009-08-20 20:41:28jesstesscreate