durusmail: quixote-users: Twisted server - depreciation warnings
Twisted server - depreciation warnings
2005-03-01
2005-03-07
2005-03-07
2005-03-07
Twisted server - depreciation warnings
Paul Moore
2005-03-01
When I run my Quixote application under the twisted server, I get
depreciation errors as follows:

C:\Apps\Python24\lib\site-packages\quixote\server\twisted_server.py:56:
DeprecationWarning: IPv4Address.__getitem__ is deprecated.  Use
attributes instead.
  env = {"SERVER_SOFTWARE":   server.version,
C:\Apps\Python24\lib\site-packages\twisted\protocols\http.py:888:
DeprecationWarning: IPv4Address.__getitem__ is deprecated.  Use
attributes instead.
  if self.client[0] not in ('INET', 'SSL'):
C:\Apps\Python24\lib\site-packages\twisted\protocols\http.py:890:
DeprecationWarning: IPv4Address.__getitem__ is deprecated.  Use
attributes instead.
  host = self.client[1]
C:\Apps\Python24\lib\site-packages\quixote\server\twisted_server.py:84:
DeprecationWarning: IPv4Address.__getitem__ is deprecated.  Use
attributes instead.
  _, _, remote_port = self.transport.getPeer()

I'm not at all sure where these warnings come from - Quixote, twisted,
or where. I know I can suppress or ignore the messages, but they
(mildly) annoy me, and I'd like to understand where they are from.

I'm using Quixote 2.0a4, Twisted 1.3.0 and Python 2.4.

FWIW my driver code is simply:

from quixote.server.twisted_server import run
from quixote.publish import Publisher
from demo import MyRoot

def create_publisher():
    return Publisher(MyRoot())

if __name__ == '__main__':
    run(create_publisher, port=4321)

Paul.

reply