Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#5373 closed defect (fixed)

Latest flup removes Python 2 compatibility

Reported by: ayleph Owned by:
Priority: minor Milestone: 0.9.0
Component: infrastructure Keywords: upstream, flup, python2
Cc: Parent Tickets:

Description

We recommend installing flup [1] for fcgi deployments. The latest version of flup on PyPI [2] claims to be a "Python 3.x-only version." Two people have reported issues with this version of flup in a Python 2 installation. One person shared the following log on IRC.

  File "build/bdist.linux-x86_64/egg/flup/server/paste_factory.py", line 125, in run_fcgi_fork
  File "build/bdist.linux-x86_64/egg/flup/server/fcgi_fork.py", line 60, in <module>
  File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 45, in <module>
ImportError: No module named _dummy_thread

I don't know if flup has abandoned Python 2 or if this is just a mistake, but it causes issues for people deploying fresh MediaGoblin installs. We could amend the documentation to suggest installing a specific version of flup, or perhaps we could just go ahead and add flup to setup.py, pinned to a specific version.

[1] https://mediagoblin.readthedocs.org/en/latest/siteadmin/deploying.html?highlight=flup#install-mediagoblin-and-virtualenv
[2] https://pypi.python.org/pypi/flup/1.0.3.dev20151210

Change History (4)

comment:1 by Dirk-Jan, 9 years ago

I'm one of the IRC guys who was struck by this issue. I managed to apply a workaround by installing a previous version of flup, by using: './bin/easy_install flup==1.0.3.dev-20110405'

comment:2 by Christopher Allan Webber, 9 years ago

Milestone: 0.8.1
Resolution: fixed
Status: newclosed

Thanks... I added some kludgey wording to our docs while for while we're still recommending Python 2. It's not great, but it'll do the job for the moment.

comment:3 by Christopher Allan Webber, 9 years ago

Milestone: 0.8.20.9.0

All 0.8.2 tickets are being rolled over to 0.9.0

comment:4 by John, 8 years ago

I'm having this exact problem with version 1.0.3-dev20151210. Does this mean that the python 2.7 problem resurfaced again now? Here's the output:

  File "./web2py.fcgi", line 3, in <module>
    from flup.server.fcgi_fork import WSGIServer
  File "build/bdist.linux-x86_64/egg/flup/server/fcgi_fork.py", line 60, in <module>
  File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 45, in <module>
ImportError: No module named _dummy_thread

I'm no expert here... I just tried to execute the web2py.fcgi script manually because I'm getting error messages like this:

[Sat Aug 13 22:38:27 2016] [error] [client xx.xx.xx.xx] Premature end of script headers: web2py.fcgi

Note: See TracTickets for help on using tickets.