Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Author Topic: Python 3 port  (Read 4306 times)
Posts: 3

View Profile Email
« on: December 18, 2009, 04:16:05 »

Hi all,
I ported puremvc to python 3. There weren't too many things to change but it didn't work with the 2to3 script.

Here are the changes I had to make:
  * Classes don't inherit from object anymore.
  * One iterator has to be explicitly converted to a list.
  * I also implemented the classes in interface.py as abc classes. This is not strictly necessary but from now on it will raise errors if some class inherits an interface but doesn't implement it.

Maybe we also should make more use of decorators since we now don't have to be backward compatible with python <2.5, but I didn't want to change too much at once.

The changes can be found on github: http://github.com/bastikr/python-puremvc/commits/python3

 - Sebastian
« Last Edit: December 18, 2009, 04:25:21 by bastikr » Logged
Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: December 18, 2009, 10:25:58 »

Hey Toby,

Can you take a look at this and assess the implications? I think it might it be wise to branch before upgrading the port on the trunk. I'm sure everyone in the world won't or can't switch to Python 3. We'll still need to get Python 2 bugs fixed as they come in.

Pages: [1]