Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88276 > unrolled thread

Python 3 lack of support for fcgi/wsgi.

Started byJohn Nagle <nagle@animats.com>
First post2015-03-29 11:57 -0700
Last post2015-03-30 17:21 +0000
Articles 11 on this page of 31 — 15 participants

Back to article view | Back to comp.lang.python


Contents

  Python 3 lack of support for fcgi/wsgi. John Nagle <nagle@animats.com> - 2015-03-29 11:57 -0700
    Re: Python 3 lack of support for fcgi/wsgi. Andrew Berg <aberg010@my.hennepintech.edu> - 2015-03-29 14:06 -0500
    Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-30 06:11 +1100
      Re: Python 3 lack of support for fcgi/wsgi. John Nagle <nagle@animats.com> - 2015-03-29 15:37 -0700
        Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-30 09:58 +1100
          Re: Python 3 lack of support for fcgi/wsgi. Paul Rubin <no.email@nospam.invalid> - 2015-03-29 18:03 -0700
            Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-30 12:22 +1100
              Re: Python 3 lack of support for fcgi/wsgi. Paul Rubin <no.email@nospam.invalid> - 2015-03-29 19:16 -0700
                Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-30 13:30 +1100
                  Re: Python 3 lack of support for fcgi/wsgi. Paul Rubin <no.email@nospam.invalid> - 2015-03-29 19:51 -0700
                    Re: Python 3 lack of support for fcgi/wsgi. Chris Angelico <rosuav@gmail.com> - 2015-03-30 14:06 +1100
                      Re: Python 3 lack of support for fcgi/wsgi. Rustom Mody <rustompmody@gmail.com> - 2015-03-29 20:20 -0700
                        Re: Python 3 lack of support for fcgi/wsgi. Paul Rubin <no.email@nospam.invalid> - 2015-03-29 21:35 -0700
                          Re: Python 3 lack of support for fcgi/wsgi. Chris Angelico <rosuav@gmail.com> - 2015-03-30 15:47 +1100
                            Re: Python 3 lack of support for fcgi/wsgi. Denis McMahon <denismfmcmahon@gmail.com> - 2015-03-30 18:15 +0000
                          Re: Python 3 lack of support for fcgi/wsgi. Rustom Mody <rustompmody@gmail.com> - 2015-03-29 22:03 -0700
                    Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-30 14:22 +1100
            Re: Python 3 lack of support for fcgi/wsgi. John Nagle <nagle@animats.com> - 2015-03-29 19:11 -0700
              Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-30 13:28 +1100
              Re: Python 3 lack of support for fcgi/wsgi. John Nagle <nagle@animats.com> - 2015-03-30 13:07 -0700
                Re: Python 3 lack of support for fcgi/wsgi. Terry Reedy <tjreedy@udel.edu> - 2015-03-30 19:02 -0400
                Re: Python 3 lack of support for fcgi/wsgi. Ben Finney <ben+python@benfinney.id.au> - 2015-03-31 10:30 +1100
            Re: Python 3 lack of support for fcgi/wsgi. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-30 11:29 +0100
        Re: Python 3 lack of support for fcgi/wsgi. Michael Torrie <torriem@gmail.com> - 2015-03-29 21:30 -0600
        Re: Python 3 lack of support for fcgi/wsgi. Carl Meyer <carl@oddbird.net> - 2015-03-29 21:50 -0600
        Re: Python 3 lack of support for fcgi/wsgi. INADA Naoki <songofacandy@gmail.com> - 2015-03-30 13:45 +0900
    Re: Python 3 lack of support for fcgi/wsgi. Marko Rauhamaa <marko@pacujo.net> - 2015-03-29 22:42 +0300
    Re: Python 3 lack of support for fcgi/wsgi. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-30 08:40 +1100
      Re: Python 3 lack of support for fcgi/wsgi. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-29 23:04 +0100
    Re: Python 3 lack of support for fcgi/wsgi. Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-03-30 00:56 +0000
    Re: Python 3 lack of support for fcgi/wsgi. Denis McMahon <denismfmcmahon@gmail.com> - 2015-03-30 17:21 +0000

Page 2 of 2 — ← Prev page 1 [2]


#88351

FromTerry Reedy <tjreedy@udel.edu>
Date2015-03-30 19:02 -0400
Message-ID<mailman.351.1427756573.10327.python-list@python.org>
In reply to#88343
On 3/30/2015 4:07 PM, John Nagle wrote:

> After all this, the production system is now running entirely
> on Python 3.

I am really glad to read this.  Aside from a bit of hyperbole, I 
appreciate the report of successes and difficulties.  I also understand 
better that 'Python 3' means something different (more) to a 
user-developer than to CPython core developers, and that the boundary 
between stdlib modules and 3-rd party modules is much less important to 
you than to us.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#88354

FromBen Finney <ben+python@benfinney.id.au>
Date2015-03-31 10:30 +1100
Message-ID<mailman.354.1427758218.10327.python-list@python.org>
In reply to#88343
John Nagle <nagle@animats.com> writes:

> That's part of the problem of having all those forks - now
> each bug has to be fixed in each fork.

Agreed, there is too much focus on developing everything in isolation,
too little focus on getting different libraries working together.

> After all this, the production system is now running entirely
> on Python 3.

Hey, that's great! Congratulations on making it through to the
actively-developed world of Python 3 :-)

-- 
 \        “When in doubt tell the truth. It will confound your enemies |
  `\   and astound your friends.” —Mark Twain, _Following the Equator_ |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#88331

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-03-30 11:29 +0100
Message-ID<mailman.343.1427711417.10327.python-list@python.org>
In reply to#88298
On 30/03/2015 02:22, Ben Finney wrote:
> Paul Rubin <no.email@nospam.invalid> writes:
>
>> He reported hitting more snags than some of us might expect purely
>> from the Python 3 propaganda ("oh, just run the 2to3 utility and it
>> does everything for you").
>
> Propaganda?
>
> Are you referring to the official guidelines for migrating from Python 2
> to Python 3? The official guide at
> <URL:https://docs.python.org/3/howto/pyporting.html> doesn't support
> that assertion.
>
> The ‘2to3’ program is presented as a tool to assist. I don't know of
> anything official saying “it does everything for you”. Even when it was
> first introduced it was only ever presented as a *start* to the porting
> effort.
>

Not much of a tool if the 47 outstanding issues on the bug tracker are 
anything to go by.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#88311

FromMichael Torrie <torriem@gmail.com>
Date2015-03-29 21:30 -0600
Message-ID<mailman.328.1427686216.10327.python-list@python.org>
In reply to#88291
On 03/29/2015 04:58 PM, Ben Finney wrote:
> You have provided none for your assertion that an unmaintained
> third-party library is somehow a special failure of Python 3.

A language is only as good as its libraries, either the standard library
that ships with the language, or third-party libraries.  It is true that
third-party library has nothing to do with Python 3's technical
completeness as a language, the lack of third party libraries does make
Python 3 "not ready for the prime time" for certain tasks.  It certainly
sounds like Python 3 has turned out to not be a good fit for John's
project, and maybe that has nothing to do with Python 3 itself as a
language, but more as an ecosystem.

What does this have to do with Python itself?  I'm not completely sure,
but maybe it's about the Python community.  What's the way forward?  I
have no idea.  At the very least John is frustrated by the community's
lack of apparent interest in fixing problems in the greater python
ecosystem when it comes to Python 3.

[toc] | [prev] | [next] | [standalone]


#88312

FromCarl Meyer <carl@oddbird.net>
Date2015-03-29 21:50 -0600
Message-ID<mailman.329.1427687476.10327.python-list@python.org>
In reply to#88291

[Multipart message — attachments visible in raw view] — view raw

On 03/29/2015 09:30 PM, Michael Torrie wrote:
> What does this have to do with Python itself?  I'm not completely sure,
> but maybe it's about the Python community.  What's the way forward?  I
> have no idea.  At the very least John is frustrated by the community's
> lack of apparent interest in fixing problems in the greater python
> ecosystem when it comes to Python 3.

I think one could easily draw far too broad a conclusion from John's
report here. The title of the thread says "lack of support for
fcgi/wsgi", but AFAICT the content of the report, and the thread, is
entirely about FCGI. In my experience, WSGI under Python 3 works very
well these days, and all of the popular WSGI servers (gunicorn,
mod_wsgi, uwsgi, waitress, ...) run just fine under Python 3. I've
deployed several Django applications into production on Python 3 (using
WSGI) with no issues.

FastCGI is a different story. I do some Django support on #django and on
django-users, and I see very few people deploying with FastCGI anymore;
almost everyone uses WSGI (and when we see someone using FastCGI, we
encourage them to switch to WSGI). In fact, the FastCGI support in
Django itself is deprecated and will be removed in Django 1.9. So I am
not at all surprised to hear that the Python FastCGI libraries are
relatively poorly maintained.

And it is true and unsurprising that when a particular library is no
longer maintained, it will probably be in better shape on Python 2 than
on Python 3, because Python 2 is older.

So when it comes to "the community's interest in fixing problems" or
John's assertion that "nobody uses this stuff," in both cases I think
it's far more about FastCGI vs WSGI than it's about Python 2 vs 3.

Carl

[toc] | [prev] | [next] | [standalone]


#88314

FromINADA Naoki <songofacandy@gmail.com>
Date2015-03-30 13:45 +0900
Message-ID<mailman.330.1427690751.10327.python-list@python.org>
In reply to#88291
I agree with you.

Web programmers should use maintained libraries.
In web world, most common libraries maintained are support Python 3.

I (maintainer of PyMySQL and mysqlclient) uses Python 3 for daily job,
and use Python 2 only for test my libraries.


On Mon, Mar 30, 2015 at 12:50 PM, Carl Meyer <carl@oddbird.net> wrote:
> On 03/29/2015 09:30 PM, Michael Torrie wrote:
>> What does this have to do with Python itself?  I'm not completely sure,
>> but maybe it's about the Python community.  What's the way forward?  I
>> have no idea.  At the very least John is frustrated by the community's
>> lack of apparent interest in fixing problems in the greater python
>> ecosystem when it comes to Python 3.
>
> I think one could easily draw far too broad a conclusion from John's
> report here. The title of the thread says "lack of support for
> fcgi/wsgi", but AFAICT the content of the report, and the thread, is
> entirely about FCGI. In my experience, WSGI under Python 3 works very
> well these days, and all of the popular WSGI servers (gunicorn,
> mod_wsgi, uwsgi, waitress, ...) run just fine under Python 3. I've
> deployed several Django applications into production on Python 3 (using
> WSGI) with no issues.
>
> FastCGI is a different story. I do some Django support on #django and on
> django-users, and I see very few people deploying with FastCGI anymore;
> almost everyone uses WSGI (and when we see someone using FastCGI, we
> encourage them to switch to WSGI). In fact, the FastCGI support in
> Django itself is deprecated and will be removed in Django 1.9. So I am
> not at all surprised to hear that the Python FastCGI libraries are
> relatively poorly maintained.
>
> And it is true and unsurprising that when a particular library is no
> longer maintained, it will probably be in better shape on Python 2 than
> on Python 3, because Python 2 is older.
>
> So when it comes to "the community's interest in fixing problems" or
> John's assertion that "nobody uses this stuff," in both cases I think
> it's far more about FastCGI vs WSGI than it's about Python 2 vs 3.
>
> Carl
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
INADA Naoki  <songofacandy@gmail.com>

[toc] | [prev] | [next] | [standalone]


#88279

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-03-29 22:42 +0300
Message-ID<87vbhj615q.fsf@elektro.pacujo.net>
In reply to#88276
John Nagle <nagle@animats.com>:

> There's "wsgiref", which looks more promising, but has a different
> interface. That's not what the Python documentation recommends as the
> first choice, but it's a standard module.
>
> I keep thinking I'm almost done with Python 3 hell, but then I get
> screwed by Python 3 again.

I sympathize but Python 3 is the victim here, wsgi is the culprit.

Some years ago I had to write wsgi client code. I found it easiest to
write the XML messages by hand and have a tiny Python script ("lather")
supply the SOAP envelope handle the message interchange. I found the
support libraries didn't really add any value on top of raw XML (in my
case, anyway).


Marko

[toc] | [prev] | [next] | [standalone]


#88286

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-03-30 08:40 +1100
Message-ID<5518714d$0$12985$c3e8da3$5496439d@news.astraweb.com>
In reply to#88276
On Mon, 30 Mar 2015 05:57 am, John Nagle wrote:

> https://pypi.python.org/pypi/flup/1.0
> 
> That hasn't been updated since 2007, and the SVN repository linked there
> is gone.  The recommended version is abandoned. 

Welcome to the Internet. Links die and documentation gets outdated. If only
things stayed like the Good Old Days when documentation was always 100%
accurate and up to date, before Python 3 ruined it for everybody!



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#88288

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-03-29 23:04 +0100
Message-ID<mailman.317.1427666692.10327.python-list@python.org>
In reply to#88286
On 29/03/2015 22:40, Steven D'Aprano wrote:
> On Mon, 30 Mar 2015 05:57 am, John Nagle wrote:
>
>> https://pypi.python.org/pypi/flup/1.0
>>
>> That hasn't been updated since 2007, and the SVN repository linked there
>> is gone.  The recommended version is abandoned.
>
> Welcome to the Internet. Links die and documentation gets outdated. If only
> things stayed like the Good Old Days when documentation was always 100%
> accurate and up to date, before Python 3 ruined it for everybody!
>

I have to agree, Python 3 has caused no end of problems, with 
documentation being no exception.  The issue was made worse by the 
unicode FSR, which was released in, I think, 3.3.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#88297

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2015-03-30 00:56 +0000
Message-ID<slrnmhh7sc.5se.jon+usenet@frosty.unequivocal.co.uk>
In reply to#88276
On 2015-03-29, John Nagle <nagle@animats.com> wrote:
> The Python 2 module "fcgi" is gone in Python 3.
> The Python 3 documentation at
>
> https://docs.python.org/3/howto/webservers.html
>
> recommends "flup" and links here:
>
> https://pypi.python.org/pypi/flup/1.0
>
> That hasn't been updated since 2007, and the SVN repository linked there
> is gone.  The recommended version is abandoned. pip3
> tries to install version 1.0.2, from 2009.  That's here:
> https://pypi.python.org/pypi/flup/1.0.2 That version is supported
> only for Python 2.5 and 2.6.

jonpy supports fastcgi and wsgi. I'm not sure if it supports
Python 3 but I'm prepared to check and make it so, if anyone
wants me to.

[toc] | [prev] | [next] | [standalone]


#88335

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2015-03-30 17:21 +0000
Message-ID<mfc0lu$puj$2@dont-email.me>
In reply to#88276
On Sun, 29 Mar 2015 11:57:54 -0700, John Nagle wrote:

> The Python 2 module "fcgi" is gone in Python 3.

Was this part of the python standard library, or was it a third party 
library? I can only find cgi documentation <https://docs.python.org/2/
library/cgi.html> in the python 2 core documentation, not fcgi 
documentation. Documentation for cgi is also present in the python 3 core 
documentation: <https://docs.python.org/3.4/library/cgi.html>

Perhaps the issue is that your python 2 web application was built using 
3rd party implementations of cgi interfaces which have not kept up with 
the development of python 3. The only core module I can find in python 
that appears relevant is the cgi module, and that exists both in python 2 
and python 3.

> The Python 3 documentation at
> 
> https://docs.python.org/3/howto/webservers.html

That appears to be a copy of the Python 2 Howto. It should probably make 
that clearer! It contains the following caveat:

"See also: While this HOWTO tries to give an overview of Python in the 
web, it cannot always be as up to date as desired. Web development in 
Python is rapidly moving forward, so the wiki page on Web Programming 
<https://wiki.python.org/moin/WebProgramming> may be more in sync with 
recent development."

-- 
Denis McMahon, denismfmcmahon@gmail.com

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.python


csiph-web