Re: Python 3 compatibility?

635 views
Skip to first unread message

Massimo Di Pierro

unread,
Apr 12, 2013, 11:43:11 PM4/12/13
to web...@googlegroups.com
Web2py will never be ported to Python 3 (this is a lie, it was ported twice but it will never be official because it would break our promise of backward compatibility).
We are working on web3py. It will work on Python 3 and Python 2. It will be different from web2py but, when on Python 2 it will run legacy web2py code.

Massimo

On Friday, 12 April 2013 19:51:23 UTC-5, twan...@gmail.com wrote:
Hi,
I'm interested (very interested) in a Python web framework that works with Python 3.x (3.3+, in particular). What is the status of web2py's py3 support? I found a late-2011 thread in this group where Massimo was betting that there would be a Python 2.8 and hence no pressing need to even care about 3.x. Me, I have no interest in 2.y, and if web2py doesn't support the current and in fact better version of Python then I will reluctantly have to look elsewhere.
Thanks in advance,
-- B

samuel bonilla

unread,
Apr 13, 2013, 10:20:48 AM4/13/13
to web...@googlegroups.com
I have a proposal called 'web2py +' which is to give support to python 3.x, is the same code but support is for python 3.x, 'web2py plus' is for developers who want to migrate to python 3.x

is only a proposal, I have not started work, I want to hear comments about it ....

thanks...

Massimo Di Pierro

unread,
Apr 13, 2013, 1:11:52 PM4/13/13
to web...@googlegroups.com
We will not do the mistake Python made: break backward compatibility and not make it worthwhile.

We are already working on web3py. It is on github. You can already help us port it to python 3.0. yet the which will be worthwile. better internal logic, better helpers, better forms, etc. Once that is done we can backport to web2py.

There is no point to port code before we improve it.

Massimo

Alec Taylor

unread,
Apr 13, 2013, 1:27:04 PM4/13/13
to web2py mailing-list
Looks like it hasn't been updated for 4 months…

I will bump up the feature thread of it.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Massimo Di Pierro

unread,
Apr 13, 2013, 1:48:17 PM4/13/13
to web...@googlegroups.com
Nobody helped with it. That shows how much interest there is here about Python 3.x.

Alan Etkin

unread,
Apr 13, 2013, 2:00:50 PM4/13/13
to web...@googlegroups.com
Nobody helped with it. That shows how much interest there is here about Python 3.x.

Is there any introductory documentation on the web3py project? It could help those wanting to collaborate with the development or other areas. For example, I'm interested in plans to support or development of migration tools for web2py apps.

samuel bonilla

unread,
Apr 13, 2013, 2:18:43 PM4/13/13
to web...@googlegroups.com
python3 runme.py

Traceback (most recent call last):
  File "runme.py", line 2, in <module>
    from web3py import run
  File "/home/python/Escritorio/todo/web3py-master/web3py/__init__.py", line 1, in <module>
    from .wsgi import run
  File "/home/python/Escritorio/todo/web3py-master/web3py/wsgi.py", line 10, in <module>
    from .fancy_pickle import dumps
  File "/home/python/Escritorio/todo/web3py-master/web3py/fancy_pickle.py", line 50, in <module>
    check()
  File "/home/python/Escritorio/todo/web3py-master/web3py/fancy_pickle.py", line 46, in check
    s = dumps(a)
  File "/home/python/Escritorio/todo/web3py-master/web3py/fancy_pickle.py", line 33, in dumps
    dump(data,stream)
  File "/home/python/Escritorio/todo/web3py-master/web3py/fancy_pickle.py", line 29, in dump
    p.dump(data)
TypeError: string argument expected, got 'bytes'



2013/4/13 Alan Etkin <spam...@gmail.com>
Nobody helped with it. That shows how much interest there is here about Python 3.x.

Is there any introductory documentation on the web3py project? It could help those wanting to collaborate with the development or other areas. For example, I'm interested in plans to support or development of migration tools for web2py apps.

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/xXDjA47a6nc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Massimo Di Pierro

unread,
Apr 13, 2013, 3:46:57 PM4/13/13
to web...@googlegroups.com
I did not say web3py runs on python 3. But we rewrote code to be python 3 friendly and it is a goal to make it work on python 3. Thanks for your offer  of helping.

Marin Pranjić

unread,
Apr 14, 2013, 10:30:55 AM4/14/13
to web2py-users
@Massimo,

 "I think it is too soon to start contributing to web3py because I am not sure where it is going."


I'm sure there are more of  us who would contribute more or less ;)

Massimo Di Pierro

unread,
Apr 14, 2013, 11:03:37 AM4/14/13
to web...@googlegroups.com
There is one specific thing I asked help with. Can we make the existing code there working with 2.x and 3.x? I am not asking for adding features.

Vinicius Assef

unread,
Apr 14, 2013, 7:30:54 PM4/14/13
to web2py
Do you mean work to make code in https://github.com/mdipierro/web3py
run in python 2.x and 3.x?

Would it be worth the effort? Codebase is 4 months old.

On Sun, Apr 14, 2013 at 12:03 PM, Massimo Di Pierro

Anthony

unread,
Jun 6, 2013, 6:12:43 PM6/6/13
to web...@googlegroups.com
Even for existing users, at some point sticking with Python 2 can start to become a liability as some new libraries are released in Python 3 only or existing libraries migrate to Python 3 only. I use rpy2, which is an interface between Python and R, and the latest development branch has dropped support for Python 2 altogether. At some point, we'll need Python 3 support in order to be able to continue to take advantage of the Python ecosystem. That time is still a ways off, and perhaps we'll have web3py by then, but something to consider.

Anthony

On Thursday, June 6, 2013 3:50:57 PM UTC-4, Michael Lutynski wrote:
That's not true for me. I have been fascinated with web2py for the longest time, and now I'm finally able to use it, I was sincerely hoping that there would be a Python 3 option. But since I do not know anything about web2py at all at this point, it makes it a daunting proposition to consider helping to port it.

It seems that for existing web2py users, there might not be the much incentive to help porting it because of the investment with Python 2.x, but that's not true for newcomers who will want Python 3, like me.

Derek

unread,
Jun 6, 2013, 6:16:13 PM6/6/13
to web...@googlegroups.com
Well, that's an issue with breaking compatibility. I've seen it happen several times with Python 2.x to 3.x, Zope 2.x to 3.x and the whole Zope Five fiasco. The problem is when you break compatibility you are essentially telling your developers that all that hard work they did will have to be done all over again. At that point, the developers say "you know, there were some warts that i just wasn't comfortable with, lets see what the other options are" and the community as a result gets forked. So, I'd love to see Web3Py, but just knowing that it's coming around the corner makes me pause if I think about releasing something on the 'antiquated' (its not, but that's the perception) Web2py...


On Thursday, June 6, 2013 12:50:57 PM UTC-7, Michael Lutynski wrote:
That's not true for me. I have been fascinated with web2py for the longest time, and now I'm finally able to use it, I was sincerely hoping that there would be a Python 3 option. But since I do not know anything about web2py at all at this point, it makes it a daunting proposition to consider helping to port it.

It seems that for existing web2py users, there might not be the much incentive to help porting it because of the investment with Python 2.x, but that's not true for newcomers who will want Python 3, like me.

On Saturday, 13 April 2013 10:48:17 UTC-7, Massimo Di Pierro wrote:

Tim Richardson

unread,
Jun 6, 2013, 7:08:32 PM6/6/13
to web...@googlegroups.com
Migrating to new platforms is easy. You just have to put back the Start button.

LightDot

unread,
Jun 6, 2013, 7:29:22 PM6/6/13
to web...@googlegroups.com
There is a lot of individual, anecdotal data in threads like this...

For example, I need web2py to provide python 2.6 compatibility for at least another 5 years. I'm going to need python 2.7 compatibility for at least another 10 years if not longer. And I couldn't care less for python 3 compatibility right now - although I could probably use it occasionally, it isn't essential for my needs. But someone else might disagree, Anthony provided a perfectly valid use case.

This just proves how anecdotal data (mine or someone else's) can be deceiving.

I see web2py as a great tool for the enterprise development, due to it's backwards compatibility. The term "antiquated" never even crossed my mind and it never even occurred to me that someone could perceive web2p as such. Again, anecdotal data...

If I try to look at the bigger picture (still without any real statistics or research, just common sense), I also think having "web3py" that offers python 2.7+ and 3+ compatibility is a perfect solution for the future. As the demand for python 3 rises, so will patches and contributions for web3py... ;) Right?? :)

Regards,
Ales

Anthony

unread,
Jun 6, 2013, 9:36:49 PM6/6/13
to web...@googlegroups.com
For example, I need web2py to provide python 2.6 compatibility for at least another 5 years. I'm going to need python 2.7 compatibility for at least another 10 years if not longer.

I don't know if your particular application(s) make use of many other Python libraries, but if they do, then you also need those libraries to maintain Python 2 compatibility for the next 10 years (or you have to fork and maintain them yourself, which may work for you). Of course this will vary by application, but in many cases, there will come a point at which it will be easier to port the app code to Python 3 than to try to keep hanging on to Python 2.

Also, breaking backward compatibility by merely switching to Python 3 isn't the same as breaking backward compatibility by changing the web2py API. There are tools to automate the process of converting application code from Python 2 to 3 that will get you most of the way. Most of the web2py-specific code would presumably remain unchanged.

Anyway, I agree that the ideal would be a web3py that works with both 2.7 and 3.x and that runs legacy web2py apps as well.

Anthony

LightDot

unread,
Jun 7, 2013, 7:36:01 AM6/7/13
to web...@googlegroups.com
On Friday, June 7, 2013 3:36:49 AM UTC+2, Anthony wrote:
For example, I need web2py to provide python 2.6 compatibility for at least another 5 years. I'm going to need python 2.7 compatibility for at least another 10 years if not longer.

I don't know if your particular application(s) make use of many other Python libraries, but if they do, then you also need those libraries to maintain Python 2 compatibility for the next 10 years (or you have to fork and maintain them yourself, which may work for you). Of course this will vary by application, but in many cases, there will come a point at which it will be easier to port the app code to Python 3 than to try to keep hanging on to Python 2.
 
I solve this by using distributions with long term support [1], respins of Red Hat. I have customers that opt for Red Hat itself when they don't want to let us handle the OS. Current RHEL 6 will be supported until 2023 and I'll have to support web2py applications with python 2.6 compatibility at least until 2017 if not longer. We guarantee this for our products.

It would be hard for me to justify the price of supporting forked libraries. I opt for EPEL [2] packages when I absolutely must and I fork something when I'm truly paid to support it, although I personally don't like doing it. It's a lot of work if one wants to do it properly.

I'm looking into Red Hat software collections [3] and how these will change the support options we could provide... But that's only 3 years of support as it stands now.

Also, breaking backward compatibility by merely switching to Python 3 isn't the same as breaking backward compatibility by changing the web2py API. There are tools to automate the process of converting application code from Python 2 to 3 that will get you most of the way. Most of the web2py-specific code would presumably remain unchanged.

This is a good point. When Massimo laid out plans for web3py, certain web2py compatibility at the app level reassured me that choosing web2py as our preferred tool of trade was a good choice.
 
Anyway, I agree that the ideal would be a web3py that works with both 2.7 and 3.x and that runs legacy web2py apps as well.

Yea, I imagine it would cover most of the users of web2py. As for me, I know RHEL 7 will carry python 2.7.x. It could carry python 3.x too and I assume it will, but that's just a guess.

When I started participating in the web2py community, I was pretty surprised to see how much Ubuntu gets used for the server/VPS OS of choice. I guess current trends demand for short lived app instances. Contemplating about using Fedora as deploy / destroy / deploy instance [4] is a good case for this trend.

But to be perfectly honest, I don't see how anyone could provide actual support in such a volatile environment. I imagine if Dante was writing today, there would be a circle in hell where sysadmins would need to support environments with forked ruby gems, python libs, etc. for the eternity. :)

Regards,
Ales

[1] https://access.redhat.com/support/policy/updates/errata/
[2] http://fedoraproject.org/wiki/EPEL
[3] http://www.redhat.com/about/news/archive/2013/6/red-hat-software-collections-1.0-beta-now-available
[4] http://lwn.net/Articles/552800/#Comments

Remco Boerma

unread,
Aug 9, 2013, 5:00:48 AM8/9/13
to web...@googlegroups.com
Hi,

Good thread all in all. I'm eager to start with python3 but if web2py isn't working with it, then why start with p3 in the first place?

Since most of my currently important python applications are web2py based. Many other scripts rely on MoinMoin (same story) and for other scripts many are ported to powershell. 
Think i'll step up on Dante's python2 circle. 

Regards,

Op zaterdag 13 april 2013 02:51:23 UTC+2 schreef twan...@gmail.com:
Reply all
Reply to author
Forward
0 new messages