From nobody@www.freebsd.org  Fri Jun  7 13:58:16 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id EED7337B47D
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Jun 2002 13:57:58 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g57KvwhG069872
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 7 Jun 2002 13:57:58 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g57Kvw2Q069871;
	Fri, 7 Jun 2002 13:57:58 -0700 (PDT)
Message-Id: <200206072057.g57Kvw2Q069871@www.freebsd.org>
Date: Fri, 7 Jun 2002 13:57:58 -0700 (PDT)
From: Sam Tannous <stannous@employees.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: py-kqueue wrapper broken with python 2.2
X-Send-Pr-Version: www-1.0

>Number:         39008
>Category:       ports
>Synopsis:       py-kqueue wrapper broken with python 2.2
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 07 14:00:06 PDT 2002
>Closed-Date:    Sun Oct 19 01:41:48 PDT 2003
>Last-Modified:  Sun Oct 19 01:41:48 PDT 2003
>Originator:     Sam Tannous
>Release:        4.5 Release
>Organization:
None
>Environment:
> uname -a
FreeBSD xxxxxx.org 4.5-STABLE FreeBSD 4.5-STABLE #2: Wed Apr 17 21:23:10 EDT 2002     stannous@xxxx.org:/usr/obj/usr/src/sys/MYKERNEL  i386

>Description:
> pkg_info | egrep "kqueue|python"
py-kqueue-1.3_1     Python interface to kqueue(2) and kevent(2) system calls
python-2.2_1        An interpreted object-oriented programming language


>How-To-Repeat:
The package source file (PyKQueue-1.3.tar.gz) comes with a small test
python script.  First, you need to fix the obvious python 2.2 related
bugs (such as the call to bind()).  Then when you run the test 
script, you get the following error:

----------------------------------------------
> python test.py
KQueue_new: made it here
<KQueue.KQueue instance at 0x813df6c>
<KQueue object at 0x8156f70>
6
Traceback (most recent call last):
  File "test.py", line 23, in ?
    todo = kq.event(watch, 250, 30000)
  File "KQueue.py", line 83, in event
    events = kevent(int(self.kfd), kevs, int(wantEvents), int(timeout))
TypeError: object can't be converted to int
----------------------------------------------------

So it looks like the call to kevent in KQueue.py is wrong.
After changing it to "kevent(int(self.kfd.fd),....", we try 
again:

-------------------------
> python test.py
<KQueue.KQueue instance at 0x814d50c>
<KQueue object at 0x8156f70>
6
Traceback (most recent call last):
  File "test.py", line 23, in ?
    todo = kq.event(watch, 250, 30000)
  File "KQueue.py", line 83, in event
    events = kevent(int(self.kfd.fd), kevs, int(wantEvents), int(timeout))
TypeError: an integer is required
-------------------------



>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->dwhite 
Responsible-Changed-By: anders 
Responsible-Changed-When: Fri Jun 7 14:12:07 PDT 2002 
Responsible-Changed-Why:  
Over to maintainer & author. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39008 

From: Sam Tannous <stannous@employees.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/39008: py-kqueue wrapper broken with python 2.2
Date: Sat, 15 Feb 2003 19:35:54 -0800

 The easiest workaround for this is to simply use the
 kqueue wrapper from netbsd...it works very well
 (at least for sockets and event timers)...Get py-kqueue at 
 
    ftp://ftp.NetBSD.org/pub/NetBSD/misc/jdolecek/
 
 --Sam
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Oct 19 01:40:56 PDT 2003 
State-Changed-Why:  
dwhite reports that this PR is stale and can be closed. 


Responsible-Changed-From-To: dwhite->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Oct 19 01:40:56 PDT 2003 
Responsible-Changed-Why:  
dwhite reports that this PR is stale and can be closed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39008 
>Unformatted:
