python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

René Dudfield
On Fri, Sep 18, 2009 at 12:03 PM, Armin Ronacher
<[hidden email]> wrote:
>> It looks like python3 issues are being addressed in your changes anyway.
> But it should be discussed separately and then be integrated.  The
> changes in the PEP currently reflect #1 of Graham's proposal.
>

yeah cool.  Here's a new thread for the python3 related changes...

Perhaps a good way to test that, is to make a smallish example wsgi
program to port to python3, using the various proposals... or the
proposal most liked.

Then we could see how easy it would be to port to a given
implementation that supports that proposal.  I'm not sure which of the
proposals Grahams mod_wsgi branch is for... or for the cherrypy
branch... but those ones would be easier to test since they're already
done.

So is there a smallish tested wsgi example around to port?  Maybe some
of the cherrypy example programs would be a good one to do... if they
aren't ported already (if they are ported already... great!)


cheers,
_______________________________________________
Web-SIG mailing list
[hidden email]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/lists%40nabble.com
Reply | Threaded
Open this post in threaded view
|

Re: python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

Armin Ronacher
Hi,

René Dudfield schrieb:
> Perhaps a good way to test that, is to make a smallish example wsgi
> program to port to python3, using the various proposals... or the
> proposal most liked.
Not a good idea.  Because a small WSGI application directly on top of
WSGI behaves completely different than a big WSGI application on top of
an existing system.  The interfaces the implementations (WebOb,
Werkzeug, Django) expose would not change either way because they are
already unicode aware.

2to3 would go the unicode way because that's what it was written for.
But that is also the one that causes the most problems.

> Then we could see how easy it would be to port to a given
> implementation that supports that proposal.  I'm not sure which of the
> proposals Grahams mod_wsgi branch is for... or for the cherrypy
> branch... but those ones would be easier to test since they're already
> done.
A WSGI Server that is byte only based on a simple one like wsgiref can
be written in a couple of minutes.  You just have to take the existing
sources and make sure a b is in front of all strings that should be byte
strings.


Regards,
Armin
_______________________________________________
Web-SIG mailing list
[hidden email]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/lists%40nabble.com
Reply | Threaded
Open this post in threaded view
|

Re: python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

mdipierro
In reply to this post by René Dudfield
I liked your idea very much Rene' , so I made this:

     http://web2py.com/examples/static/sneaky.py

and a Python 3.0 version:

     http://web2py.com/examples/static/sneaky3.py

They both may need some testing more testing but I tried the former  
with web2py and it works well, including streaming.

Massimo

On Sep 18, 2009, at 1:44 PM, René Dudfield wrote:

> On Fri, Sep 18, 2009 at 12:03 PM, Armin Ronacher
> <[hidden email]> wrote:
>>> It looks like python3 issues are being addressed in your changes  
>>> anyway.
>> But it should be discussed separately and then be integrated.  The
>> changes in the PEP currently reflect #1 of Graham's proposal.
>>
>
> yeah cool.  Here's a new thread for the python3 related changes...
>
> Perhaps a good way to test that, is to make a smallish example wsgi
> program to port to python3, using the various proposals... or the
> proposal most liked.
>
> Then we could see how easy it would be to port to a given
> implementation that supports that proposal.  I'm not sure which of the
> proposals Grahams mod_wsgi branch is for... or for the cherrypy
> branch... but those ones would be easier to test since they're already
> done.
>
> So is there a smallish tested wsgi example around to port?  Maybe some
> of the cherrypy example programs would be a good one to do... if they
> aren't ported already (if they are ported already... great!)
>
>
> cheers,
> _______________________________________________
> Web-SIG mailing list
> [hidden email]
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe: http://mail.python.org/mailman/options/web-sig/mdipierro%40cti.depaul.edu

_______________________________________________
Web-SIG mailing list
[hidden email]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/lists%40nabble.com
Reply | Threaded
Open this post in threaded view
|

Re: python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

Armin Ronacher
Hi,

Massimo Di Pierro schrieb:
> I liked your idea very much Rene' , so I made this
Can you please stop that before you do any more damage?  Your code is
not even anywhere close to what was discussed and has tons of errors and
ugly bits and pieces in there.

Again.  An example does not bring us anything because we already know
the implications of each proposal.


Regards,
Armin
_______________________________________________
Web-SIG mailing list
[hidden email]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/lists%40nabble.com
Reply | Threaded
Open this post in threaded view
|

Re: python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

René Dudfield
On Sat, Sep 19, 2009 at 9:55 AM, Armin Ronacher
<[hidden email]> wrote:

> Hi,
>
> Massimo Di Pierro schrieb:
>> I liked your idea very much Rene' , so I made this
> Can you please stop that before you do any more damage?  Your code is
> not even anywhere close to what was discussed and has tons of errors and
> ugly bits and pieces in there.
>
> Again.  An example does not bring us anything because we already know
> the implications of each proposal.
>

Hi,

I'm not sure 'we' in this case is correct.  Not everyone understands
*all* the implications of *all* the proposals... otherwise we would
have already decided what to do.  Well, at least I don't understand
things yet... and am interested in knowing more, if you'd indulge.
Concrete examples let people understand things more easily, and let us
talk about specific things rather than abstractly.  I think P.J Ebys
sketch in the other thread is a good example of showing how things
could work.


cheers,
_______________________________________________
Web-SIG mailing list
[hidden email]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/lists%40nabble.com
Reply | Threaded
Open this post in threaded view
|

Re: python3 wsgi. Re: WSGI 1 Changes [ianb's and my changes]

mdipierro
In reply to this post by Armin Ronacher
Charming as ever. ;-)

the code had a typo , sorry, I fixed it.
http://web2py.com/examples/static/sneaky.py
http://web2py.com/examples/static/sneaky3.py

I am not making a statement about any of the proposals. I am just  
saying: here is a multithreaded web server that works with python 3.0  
in less than 300 lines of code. it can be used for testing ideas. I  
acknowledge you are the wsgi experts, that is why I sent it t you.
If you have any specific critique that will make it better, please let  
me know, or just ignore me.
It is a work in progress (its features and speed and discussed in the  
doc string) and I hope it can be useful.

Massimo



On Sep 19, 2009, at 3:55 AM, Armin Ronacher wrote:

> Hi,
>
> Massimo Di Pierro schrieb:
>> I liked your idea very much Rene' , so I made this
> Can you please stop that before you do any more damage?  Your code is
> not even anywhere close to what was discussed and has tons of errors  
> and
> ugly bits and pieces in there.
>
> Again.  An example does not bring us anything because we already know
> the implications of each proposal.
>
>
> Regards,
> Armin

_______________________________________________
Web-SIG mailing list
[hidden email]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/lists%40nabble.com