Edgewall Software
Modify

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)

wsgi.patch (49.0 KB ) - added by Matthew Good 20 years ago.
experimental WSGI implemenation
trac-wsgi.diff (55.8 KB ) - added by Titus Brown <titus@…> 19 years ago.
Updated patch to latest SVN (only 3 line change); added CGI and SCGI ←→ WSGI contrib & scripts.

Download all attachments as: .zip

Change History (11)

comment:1 by anonymous, 20 years ago

Resolution: wontfix
Status: newclosed

comment:2 by Christopher Lenz, 20 years ago

Resolution: wontfix
Status: closedreopened

I agree, basing the web layer on WSGI would probably be a good idea.

by Matthew Good, 20 years ago

Attachment: wsgi.patch added

experimental WSGI implemenation

comment:3 by Matthew Good, 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 Titus Brown <titus@…>, 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 Titus Brown <titus@…>, 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 Titus Brown <titus@…>, 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 Christopher Lenz, 19 years ago

Milestone: 2.01.0
Owner: changed from Matthew Good to Christopher Lenz
Priority: lowestlow
Status: reopenednew

Work on a migration of the Trac web layer to WSGI has started in sandbox/wsgi.

comment:7 by Christopher Lenz, 19 years ago

Status: newassigned

comment:8 by Matthew Good, 19 years ago

Milestone: 1.00.10

comment:9 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

WSGI branch has been merged in [2957].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.