Opened 3 years ago

Last modified 2 years ago

#5455 new defect

Latest flup is not python3-compatible

Reported by: ayleph Owned by:
Priority: major Milestone:
Component: documentation Keywords: fcgi, flup, python3, medium
Cc: Parent Tickets:

Description

The flup maintainer has dropped the ball and release a version that isn't actually python3-compatible, while also breaking python2-compatibility (see #5373). When trying to run v0.9.0 with latest flup, users report the below error.

File "/path/to/mediagoblin/lib/python3.4/site-packages/flup-1.0.3.dev20151210-py3.4.egg/flup/server/paste_factory.py", line 7, in asbool
NameError: name 'unicode' is not defined

There are alternative flup packages, such as https://pypi.python.org/pypi/flup6. We should try to find one that actually works and update the documentation. Until then, users can't run fcgi with python3.

Subtickets

Change History (9)

comment:1 Changed 3 years ago by ayleph

breton reports the flup6 package suggested by me also contains the same defect in paste_factory.py.

comment:2 Changed 3 years ago by Boris Bobrov

yes, flup doesn't work for us at all now. And there is no way to even report a bug. We need to find a way to drop it.

comment:3 Changed 3 years ago by bnewbold

It seem like a lot of folks are using the flup6 package as a work around. This didn't work out of the box for me with mediagoblin though.

I'm a little confused by this bug because "MediaGoblin now officially supports Python 3", but there doesn't seem to be a way to actually run the software with Python3?

comment:4 Changed 3 years ago by Josh

I ran into to this issue after hearing that MediaGoblin is now Python 3 compatible. It was quite a bummer when I couldn't get it working.

If you ask me, it should be top priority to edit the release announcement and documentation to make this clear. Some folks may have been waiting for Py3 support and will end up in a dead end.

comment:5 Changed 3 years ago by ayleph

It's still possible to run mediagoblin with python3. You could run with (u)wsgi instead of fcgi, which seems to be the general trend these days for better performance. See https://wiki.mediagoblin.org/Deployment for some examples.

If you need to run with fcgi, you could try installing a different version of flup. Maybe there's one that works. I haven't tried personally.

comment:6 Changed 2 years ago by Ben Sturmfels

For a few years now I've been running MediaGoblin with python /usr/bin/paster serve paste.ini, which serves up plain HTTP, then putting this behind an Nginx proxy. Continues to work fine under Python 3.

uWSGI (with uWSGI Emperor) is my preferred approach for other web apps though so I just need to make some time to test and write this up for MediaGoblin. Once the docs are updated, I would think that we could drop Flup entirely?

comment:7 Changed 2 years ago by Ben Sturmfels

Component: programmingdocumentation
Keywords: medium added

Marking as "documentation" under the assumption that we probably don't need Flup at all if appropriate docs for Nginx with uWSGI or proxy_pass are provided. Marking as "medium" as a bit of deployment knowledge and testing are required.

comment:8 Changed 2 years ago by Ben Sturmfels

Priority: criticalmajor

comment:9 Changed 2 years ago by ayleph

This isn't just a documentation issue. It's a deployment issue. For people who can use uWSGI, switching to that should work. For people who don't/can't use uWSGI, then going from having a working fcgi method to not having a working fcgi method is a big issue. I dare say a critical issue. As someone who relies on fcgi due to other software which is incompatible with wsgi, I would be really annoyed if the solution were just "well, we updated the docs to say use uWSGI."

Note: See TracTickets for help on using tickets.