Please, if you port to Python 3, port to 2&3

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
If we decide to port zope.org-based projects to Python 3, please
please please, port them to Python 2&3 rather than relying on 2to3 (or
3to2).  That is, update the code to work with both Python 2 and Python
3.  Relying on 2to3 (or 3to2) is a headache for anyone who uses a
"develop" installation of a package. (It's also rather annoying for
someone installing a 2to3-based project in Python 3.)

I often use develop installs of packages when debugging
interactions among packages and it's not practical to use 2to3
in that situation, especially if there's a chance you'll need to make
changes and check them in.

I found 2to3 somewhat helpful in beginning the process of getting
buildout working with Python 3, but then worked the source into a form
that works with both Python versions. The code is uglier, but not as
ugly as incporating 2to3 in the development workflow.

The six module:

  http://pypi.python.org/pypi/six

should help a lot. I didn't use it in buildout, because I didn't want
to add a dependency.  I did reuse some ideas.

Oh, BTW, for those who haven't noticed, buildout ios now available for
Python 3:

  http://pypi.python.org/pypi/zc.buildout/2.0.0a1

which means there's one less excuse not to start thinking about Python
3 ports. :)

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.