Python3 migration

3,692 views
Skip to first unread message

Anand Chitipothu

unread,
Jun 10, 2013, 2:40:14 PM6/10/13
to webpy
Hello everyone,

I made some progress on migrating web.py to Python3. I'm able to run helloworld app both on Python2 and Python3 using the same codebase.



I've tried to be very systematic about the migration. The important steps are:

1. covert all imports to relative imports
2. replace print statement with print function
3. fix exceptions
4. fix unicode issues

One thing that'll be useful is to fix the test suite. Anyone interested to take it up? The plan is not to add new tests, but convert the existing test suite to work with Python3. It'll useful to follow the above listed things first before others.

Any takers?

Tomas Schertel

unread,
Jun 10, 2013, 9:35:21 PM6/10/13
to we...@googlegroups.com
I'm in.
What do I need to do? Fork web.py and ask for a merge?
Any hint I can use in migration process?

Anand Chitipothu

unread,
Jun 10, 2013, 11:00:12 PM6/10/13
to webpy
On Tue, Jun 11, 2013 at 7:05 AM, Tomas Schertel <tsch...@gmail.com> wrote:
On Monday, 10 June 2013 15:40:14 UTC-3, Anand wrote:
Hello everyone,

I made some progress on migrating web.py to Python3. I'm able to run helloworld app both on Python2 and Python3 using the same codebase.



I've tried to be very systematic about the migration. The important steps are:

1. covert all imports to relative imports
2. replace print statement with print function
3. fix exceptions
4. fix unicode issues

One thing that'll be useful is to fix the test suite. Anyone interested to take it up? The plan is not to add new tests, but convert the existing test suite to work with Python3. It'll useful to follow the above listed things first before others.

Any takers?
 
I'm in.

Thanks!
 
What do I need to do? Fork web.py and ask for a merge?

Yes. I pushed the python3 branch to webpy repo.


Fork that and start a branch python3-tests from python3 and send me a pull request.
 
Any hint I can use in migration process?

Already mentioned above. I would like first few commits to fix the obvious issues like fixing imports, print function, exceptions etc. It'll be useful to have each one as a separate commit.

Anand

Tomas Schertel

unread,
Jun 11, 2013, 7:58:42 AM6/11/13
to we...@googlegroups.com

Testsuit means just web.browser or something more?

Anand Chitipothu

unread,
Jun 11, 2013, 8:06:35 AM6/11/13
to webpy
No, see test directory.


Travis runs those tests whenever we make a push to github.


Currently tests are passing for 2.6 and 2.7, but failing for 3.3. We need to fix that eventually.

Anand



--
You received this message because you are subscribed to the Google Groups "web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webpy+un...@googlegroups.com.
To post to this group, send email to we...@googlegroups.com.
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Anand
http://anandology.com/

Tomas Schertel

unread,
Jun 11, 2013, 9:08:12 AM6/11/13
to we...@googlegroups.com
On Tuesday, 11 June 2013 09:06:35 UTC-3, Anand wrote:
No, see test directory.


Travis runs those tests whenever we make a push to github.


Currently tests are passing for 2.6 and 2.7, but failing for 3.3. We need to fix that eventually.

Anand

Roger that!

Tomas Schertel

unread,
Jun 15, 2013, 9:27:51 PM6/15/13
to we...@googlegroups.com
 
Anand, I've sent you an e-mail to gmail asking for instructions?
Did you received it?

Anand Chitipothu

unread,
Jun 15, 2013, 9:44:22 PM6/15/13
to webpy
No, can you please send it again?

Anand

Tomas Schertel

unread,
Jul 11, 2013, 11:04:36 AM7/11/13
to we...@googlegroups.com
Hi guys.
Is there someone who wanna help in this job?

Faustino Aguilar Quirós

unread,
Jul 19, 2013, 3:13:33 PM7/19/13
to we...@googlegroups.com
What i can do?

We should also be improved using a tool documentation

Tomas Schertel

unread,
Jul 22, 2013, 10:43:10 AM7/22/13
to we...@googlegroups.com
On Friday, 19 July 2013 16:13:33 UTC-3, Faustino Aguilar Quirós wrote:
What i can do?

We should also be improved using a tool documentation

Hi Faustino.

I'm having troubles on make python 3 port run its tests.
Actually tests run, but fails to pass all pf them.
I downloaded initial port from github, made by Anand, changed a few imports, and run tests.

Thanks for helping.

Faustino Aguilar Quirós

unread,
Jul 24, 2013, 5:42:28 AM7/24/13
to we...@googlegroups.com
I think I am a newbie in python yet for some things, but I think I can help with other programming stuff.

Nesecitamos also work on documentation and some other details

Have you seen the web microframework battle on the slide 28 explain that evaluated criteria, web.py only get 1 point, is that he is old but serves as a reference.

Tomas Schertel

unread,
Jul 30, 2013, 12:18:56 PM7/30/13
to we...@googlegroups.com
Come on guys... No volunteer to help?

Tomas Schertel

unread,
Aug 3, 2013, 7:57:45 PM8/3/13
to we...@googlegroups.com
On Tuesday, 30 July 2013 13:18:56 UTC-3, Tomas Schertel wrote:
Come on guys... No volunteer to help?

I got tests running...
Most of it fails, but it was expected since they were made for python 2.
Now, I'm doing some porting to python 3.
Hope someone helps.

Tomas Schertel

unread,
Aug 3, 2013, 10:46:04 PM8/3/13
to we...@googlegroups.com
I invite you guys to see my changes here: https://github.com/tschertel/webpy

David Kopec

unread,
Aug 24, 2013, 3:33:44 AM8/24/13
to we...@googlegroups.com
Hey everyone,

I want to thank Anand and the rest for the great work that you have put into web.py

There have been many emails on this list about the status and future of web.py, but I see there has been little activity the last month so I wanted to just check-in with another before I embark on a large project with the framework.  Anand, are you the current project leader?  Where do things stand as far as Python 3 compatibility and having a general team in place to continue this great framework?

Tomas Schertel

unread,
Aug 26, 2013, 9:57:26 AM8/26/13
to we...@googlegroups.com
I'm really sad with this lack of activity.
I tried to help before, but looks like a lonely ride. Maybe it's me, but I don't see people investing time and effort on web.py.
I always bring this subject to mail list, a lot of people agree and then: nothing. Every one disappears on a eye blink.

And yes, I could fork web.py and develop a new frame work, but I don't have enough knowledge. I can not assume a job this big if I can not keep it running.

I'll support any one who wanna have things running and I'll do my best to help.
So please, some one who embrace this, please, make contact, keep in touch with this list.

Joshua Higgins

unread,
Aug 26, 2013, 2:47:27 PM8/26/13
to we...@googlegroups.com
Hi everyone. Long time lurker on the web.py list. I use web.py in a lot of projects and Tomas is correct... It's sad to see the project stalling.

Over the next few days I will be working on Python 3 migration and porting the test units. I'm not quite sure who is leading the project but I can volunteer time and effort to push this forward.

Looking forward, the same code base cannot service both Python 2 and Python 3 development. So at some point the paths will diverge and we will need to maintain the old series and a new 3 series, with any important bugs backported. 

Josh

--
You received this message because you are subscribed to the Google Groups "web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webpy+un...@googlegroups.com.
To post to this group, send email to we...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
Josh Higgins
joshi...@gmail.com

Tomas Schertel

unread,
Aug 26, 2013, 3:27:07 PM8/26/13
to we...@googlegroups.com
Hi Josh,

As I said in other post, I did migrate tests to run with python 3. But tests fails because these tests runs against python 2.
But when I did this migration, I made it compatible with python 3 only. I forgot to make it run with both versions.
Maybe we can work together I head this porting.

If Anand read this, he could join us :)
He already replied another thread here today. Maybe he's around.
To unsubscribe from this group and stop receiving emails from it, send an email to webpy+unsubscribe@googlegroups.com.

To post to this group, send email to we...@googlegroups.com.
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.


--
Josh Higgins
joshi...@gmail.com

Anand Chitipothu

unread,
Aug 26, 2013, 2:56:56 PM8/26/13
to webpy
On Tue, Aug 27, 2013 at 12:17 AM, Joshua Higgins <joshi...@gmail.com> wrote:
Hi everyone. Long time lurker on the web.py list. I use web.py in a lot of projects and Tomas is correct... It's sad to see the project stalling.

Over the next few days I will be working on Python 3 migration and porting the test units. I'm not quite sure who is leading the project but I can volunteer time and effort to push this forward.

I'm the current maintainer. Thanks for coming up for volunteering.

Looking forward, the same code base cannot service both Python 2 and Python 3 development. So at some point the paths will diverge and we will need to maintain the old series and a new 3 series, with any important bugs backported. 

Yes, python3 branch is going to the master once the code stabilizes. I'm looking for some help in porting the existing tests to python3. Please let me know if you would like to take it up.


Anand

Tomas Schertel

unread,
Aug 28, 2013, 8:59:57 AM8/28/13
to we...@googlegroups.com
Josh???
Message has been deleted
Message has been deleted

inginist

unread,
Nov 8, 2013, 3:36:23 AM11/8/13
to we...@googlegroups.com
Hi Tomas,

Do you have the port anywhere as a public repo? I can help with making tests compatible to both.

Thanks,
Pavan.

Anand Chitipothu

unread,
Nov 8, 2013, 3:56:30 AM11/8/13
to webpy

On Fri, Nov 8, 2013 at 2:06 PM, inginist <pavan...@gmail.com> wrote:
Hi Tomas,

Do you have the port anywhere as a public repo? I can help with making tests compatible to both.

Hi Pavan,

I've tried to port most of web.py to python3. Tests are not ported yet. Would you like to have a look at them?


Anand

inginist

unread,
Nov 11, 2013, 4:04:40 AM11/11/13
to we...@googlegroups.com
Hi Anand,

Will do that.

Cheers,
Pavan

inginist

unread,
Nov 17, 2013, 9:08:18 AM11/17/13
to we...@googlegroups.com
Created a pull request for branch python3. Used python compatibility library http://pythonhosted.org/six/ to make it work. Tested with sqlite version. Testing on other databases as well.

Ole Trenner

unread,
Nov 18, 2013, 9:11:51 AM11/18/13
to we...@googlegroups.com
Am 17.11.2013 um 15:08 schrieb inginist:
> Created a pull request for branch python3.


Thanks for your effort!


> Used python compatibility library http://pythonhosted.org/six/ to make it work. Tested with sqlite version. Testing on other databases as well.


Does this mean you have to ship this "six" library with web.py? I don't really like the idea of an external dependency. Are there licensing issues etc.?!

Cheers,
Ole.


--
Ole Trenner
<o...@jayotee.de>




jens.t...@gmail.com

unread,
Sep 25, 2014, 7:12:23 PM9/25/14
to we...@googlegroups.com
Has there been any progress on this?

W. Martin Borgert

unread,
Oct 9, 2014, 4:36:56 AM10/9/14
to we...@googlegroups.com
On 2014-09-25 16:12, jens.t...@gmail.com wrote:
> Has there been any progress on this?

AFAIK, nobody tackled the steps so far.
Maybe you could start with the test suite?

tensio

unread,
Oct 10, 2014, 7:29:22 AM10/10/14
to we...@googlegroups.com
I just started working on the test suite. I'll share my progress here.

Joe Knapka

unread,
Oct 20, 2014, 11:35:31 AM10/20/14
to we...@googlegroups.com
Hello, all,

I am interested in helping with the test suite (and other aspects of the port, if necessary). Has there been any progress? I wish to avoid duplicating effort.

Thanks,

- Joe

tensio

unread,
Oct 22, 2014, 4:50:53 AM10/22/14
to we...@googlegroups.com
Just go ahead, I just started studying CS and underestimated the amount of time have to put into it, so I was not able to reach any milestone.
I think it would be great if you could do it.

Jeff Silverman

unread,
Jun 22, 2016, 10:38:43 AM6/22/16
to web.py
I'd like to help out here.  Does somebody have a shopping list of what needs doing?

Jeff

Reply all
Reply to author
Forward
0 new messages