changes in threading and SocketServer since Python 2.0?

Kelly DeMarco kellydemarco at
Thu Jul 12 06:54:06 EDT 2001

I used to use webdebug( on Python 1.6
without any problem, but I've been through some problem using it on Python
2.1 thesedays.

The source code is quite short and clear, so there doesn't seem to be any
good reason why it's failing on Python 2.1 -- maybe some changes in the
standard library?

What's more interesting is, when webdebug is run with singlethreaded mode,
there's no problem. Therefore, I guess it has something to do with
threading lib.

The platform is win32, and the error I get is:

Exception in thread Thread-13:
Traceback (most recent call last):
  File ".\", line 378, in __bootstrap
  File ".\", line 366, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "c:\python21\lib\", line 246, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "c:\python21\lib\", line 495, in __init__
  File "", line 116, in handle
    self.httpRequest = HTTPrequest.HTTPrequest(self.rfile,
  File "", line 73, in __init__
    self.raw_requestline = self.readLine(input)
  File "", line 69, in readLine
    str = input.readline()
  File "c:\python21\lib\", line 233, in readline
    new = self._sock.recv(self._rbufsize)
AttributeError: 'int' object has no attribute 'recv'
[as you see, the socket instance is erroneously an int object here -- and
it happens only when in threading mode using threadingmixins from

Can anyone help me out?  Thanks in advance.

More information about the Python-list mailing list