Opened 20 years ago
Closed 19 years ago
#1582 closed enhancement (fixed)
WSGI Support
Reported by: | Matthew Good | Owned by: | Christopher Lenz |
---|---|---|---|
Priority: | low | Milestone: | 0.10 |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
WSGI is an interface between servers and web applications for Python. It defines a calling convention for web applications so that they can be written in a generic manner that is easily integrated with any server that has an available WSGI interface. This would help simplify Trac's web layer and make it easier to support other servers.
Attachments (2)
Change History (11)
comment:1 by , 20 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 20 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:3 by , 20 years ago
Well, I started looking to this, and realized that WSGI should only require a minor extension from the existing CGI frontend. I put together a basic implementation and a FastCGI script to call it. I've included the FastCGI WSGI implementation under the "contrib" folder in the patch.
I'm currently getting an intermittent error when loading some Wiki pages for the first time. It renders ~90% of the page, then displays an error at the end of the content and then the connection hangs briefly.
This also needs tested with other WSGI implementations, but I thought I'd post it for people to take a look.
by , 19 years ago
Attachment: | trac-wsgi.diff added |
---|
Updated patch to latest SVN (only 3 line change); added CGI and SCGI ←→ WSGI contrib & scripts.
comment:4 by , 19 years ago
Updated patch for latest SVN checkout, which just involved cleaning up minor inconsistencies.
I added contrib/scgiserver.py from Python Paste (which I wrote initially) and implemented two quick'n'dirty WSGI servers.
The first, trac-wsgi.cgi, is just a plain CGI server, implemented via the WSGI interface. It's a good test.
The second, trac-scgi-server, uses scgiserver.py to provide a full SCGI server. It should be production quality.
comment:5 by , 19 years ago
J've been using this patch for several months now, and it'd be great to see it dumped into the tree. It certainly doesn't break anything that's already there (heck, it doesn't *touch* existing code…)
Anyway, e-mail me for the latest patch when you're interested in adding it.
comment:6 by , 19 years ago
Milestone: | 2.0 → 1.0 |
---|---|
Owner: | changed from | to
Priority: | lowest → low |
Status: | reopened → new |
Work on a migration of the Trac web layer to WSGI has started in sandbox/wsgi.
comment:7 by , 19 years ago
Status: | new → assigned |
---|
comment:8 by , 19 years ago
Milestone: | 1.0 → 0.10 |
---|
comment:9 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
WSGI branch has been merged in [2957].
I agree, basing the web layer on WSGI would probably be a good idea.