1

I can't seem to get the wsgiref module to work at all under Python 3.0. It works fine under 2.5 for me, however. Even when I try the example in the docs, it fails. It fails so hard that even if I have a print function above where I do: "from wsgiref.simple_server import make_server", it never gets printed for some reason. It doesn't thow any errors when run, and it just displays a blank page in the browser and doesn't log any sort of request.

Does anybody know what the problem may be? Thanks!

Chris Upchurch
  • 15,297
  • 6
  • 51
  • 66
Evan Fosmark
  • 98,895
  • 36
  • 105
  • 117

2 Answers2

2

issue 4718:wsgiref package totally broken. sorry about that.

SilentGhost
  • 307,395
  • 66
  • 306
  • 293
  • Wow that is incredibly lame that they released Python 3.0 with a COMPLETELY broken package. Hell, they should have at least removed it until they could fix it. – Evan Fosmark Jan 31 '09 at 08:34
  • There's no point in removing a package to put in back in a x.x.1 release. Just wait until 2009-2-13. – Benjamin Peterson Jan 31 '09 at 16:53
0

You're in uncharted territory with WSGI on Python 3.0 I'm afraid.

WEB-SIG knew long ago that wsgiref was broken going into 3.0, but chose to do nothing about it. The spec hasn't been updated to cope with 3.0; pushing WSGI forwards even for the things everyone pretty-much agrees on is just agonisingly slow. It's depressing and senseless.

So yeah, it's easy to fix the obvious error with header unpacking in simple_server, but you'll still be running on a server that has been converted from Python 2-to-3 automatically and not really tested, with no de-jure standard to say exactly what it should do... never mind framework compatibility.

Python 3.0 for web scripting: needs some work.

bobince
  • 528,062
  • 107
  • 651
  • 834