Tuesday, July 22. 2008flup 1.0.1 releasedTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
First I'd like to say that flup is awesome! However, I'm having a little bit of trouble...
I can't seem to get flup.server.fcgi to work with a unix domain socket. After investigating the problem a bit, i found this file: flup/server/paste_factory.py which (for me, as a turbogears user) was actually controlling the creation of flup.server.fcgi I noticed that no matter what, bindAddress is set to a tuple (therefore eliminating the ability to run a server on a unix domain socket) The simple fix that I employed was to add a conditional to line 6 if not 'bindAddress' in local_config: which would make it so that the tuple is only created if bindAddress is empty. Alternatively, you could provide a config value "socket" and do something like if 'socket' in local_config: local_config['bindAddress'] = local_config['socket'] del local_config['socket'] #no sense storing it twice, plus socket could cause a name collision else: local_conf['bindAddress'] = (host, int(port)) **** I prefer this second method as it provides a more consistent configuration value to the user Also sorry, I would have posted a trac ticket, but I don't see a way to sign up to do so... Anyways great work! There's my two cents. cheers -Dan
Sorry, the comment system ate my leading spaces, but i'm pretty sure the meaning is obvious
Thanks for the suggestion. It looks like the original flup factories (bundled with Paste) supported the 'socket' option. I didn't realize that feature was lost.
I went ahead and committed your change, but I have no idea when I'll be making the next release (I knew I was a bit hasty with yesterday's release). But the latest is always available at http://hg.saddi.com/flup-server/ And as for trac, the username/password is trac/trac1234. I should make it more prominent. Thanks again.
Oh, I didn't realize there was a factory available with paste... Well at least there's now a version in trunk that works
Thanks for the speedy response
flup seems to depend on setuptools at http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c6-py2.6.egg
Now it is at http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg the c6 version doesn't exist, the c9 version is the only one there. Renaming the c9 version to c6 and placing it in the flup directory seems to work, but could confuse or delay people.
Another problem is that PasteScript is deprecating the use of this style of factory:
use = egg:PasteScript#flup_fcgi_thread However, if one does this: use = egg:flup#fcgi (or egg:flup#fcgi_thread, they are the same) PasteScript#flup_fcgi_thread accepts any of host, port, and socket (and a few others that aren't relevant here). If you don't specify them, then bindAddress=None is used. There is no way to replicate bindAddress=None (that I can see) using flup#fcgi, a problem for any app that relies on that behavior. Can you think of a reasonable fix? Also, when might the next flup release be?
I don't really remember the rationale for deprecating the factories in Paste. Though I guess it makes more sense if they were packaged with flup.
A problem is that flup's paste_factory is a one-size-fits-all deal. (And it doesn't really fit all...) I guess I might look into pulling Paste's factories into flup. This may cause some issues, mainly with regards to defaults.
I just saw in mercurial that you have done this.
Fantastic! I'll try to give this a test soon. I'm really looking forward to the next release! |
Calendar
QuicksearchCategoriesBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||