Sunday, November 15, 2009

Authorship of mod_wsgi and mod_python.

I wrote 100% of mod_wsgi for Apache, it does not borrow code from mod_python. I was not the author of mod_python for Apache although I did contribute to the 3.2.X and 3.3.X releases. I also was not the author of the confusingly named mod_wsgi for nginx although the author of that package did borrow some code from mod_wsgi for Apache.

Why I am saying this? Because I am getting a bit tired of the incorrect posts about this on various blogs, forums and IRC channels related to the major Python web frameworks and other Python topics. I really wish you guys would do your research properly before commenting on something you don't really know much about.

Especially those answering questions on the IRC channels, it would also be really good if you at least read the mod_wsgi documentation. It gets very frustrating to keep seeing posts in the IRC logs where you give out incorrect information about usage of mod_wsgi. As to people asking the questions, please go and read the documentation on the actual mod_wsgi web site, especially where someone does provide a link to some specific part of it by way of an answer, rather than just believing that someone else's one line answer is all there is to know or even correct. Why if you have a mod_wsgi question you can't just go to the mod_wsgi mailing list in the first place I have no idea.

And since I am having a rant, also stop using the term WSGI to generically refer to mod_wsgi running on Apache. WSGI is a specification of an API for Python web applications. The mod_wsgi module for Apache is just one implementation of the WSGI specification, and a lot more besides, for the Apache web server. The mod_wsgi module for Apache is not the only implementation of the WSGI specification in respect of providing a hosting solution, both generally and for Apache. It gets really confusing some times when you use the term WSGI in isolation when talking about a specific hosting mechanism as one doesn't know what hosting mechanism you are actually talking about even though most of the time it is mod_wsgi for Apache that you mean.


Graham Dumpleton said...

For the record, should be known that Phusion Passenger's WSGI support does not borrow code from mod_wsgi. This is another thing which has been incorrectly reported as well in some places.

Graham Dumpleton said...

Clarifying last comment, seems that people are saying that Phusion Passenger derives from nginx/mod_wsgi and not Apache/mod_wsgi. Comments I have seen do seem to acknowledge that Phusion Passenger does draw from nginx/mod_scgi, but this is more in terms of code structure which is going to be quite common to any nginx module. Thus it would be quite reasonable expectation to see an overlap with how code interacts with nginx for nginx versions of mod_wsgi, mod_scgi and perhaps even mod_fastcgi.

Graham Dumpleton said...

Filling out some more details about lineage, the uWSGI web site, another WSGI hosting system, says 'A bit of uWSGI code is based on mod_wsgi ideas'. I don't know what, but they at least acknowledge that they have learnt some stuff from Apache/mod_wsgi.