[PATCH 0/3] Preliminary refactoring for Python 3.xx compat

"R. Tyler Ballance" <[email protected]> Mon, 9 Nov 2009 09:13:15 -0800
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
I started experimenting with Python 3.1 this weekend, primarily 
looking at how much work will be needed to get Cheetah running on 
Python 3 while maintaining 2.xx compat.

The unfortunate fact of the matter is that it will likely be 
impossible to run the same codebase on both Python 2.xx (our 
bread and butter) and Python 3.xx (the promised land). 

I plan on creating a "future" branch for Python 3.xx work, 
the idea being Cheetah 2.4.xx will still be where primary 
development work will be done, and features will be "forward-
ported" to the future branch for Cheetah 3000.

Currently, I am undertaking a general refactoring of as much of 
the codebase in a 2.xx/3.xx compatible fashion such that the
ultimate code fork will be minor and maintainable.

This patch series prunes some stale code (VerifyType, unittest_local)
as well as refactors some of the types abuse Cheetah currently
does.

I am also planning to make an API incompatibility change for 
Template.compile(), breaking it out into Template.compile_file() and
Template.compile_str(), that change is not covered in this series.


Comments and review welcome

Cheers


R. Tyler Ballance (3):
  Refactor raw print statements in accordance with 2to3
  Refactor usage of the "types" module out, per 2to3 -f types
  Refactor CheetahWrapper tests to locate my local
    cheetah/cheetah-compile in my PATH

 SetupConfig.py                       |    2 +-
 SetupTools.py                        |   24 +-
 buildandrun                          |   66 +++
 cheetah/CheetahWrapper.py            |    8 +-
 cheetah/DummyTransaction.py          |    2 +-
 cheetah/Filters.py                   |   24 +-
 cheetah/ImportManager.py             |    4 +-
 cheetah/NameMapper.py                |   14 +-
 cheetah/Parser.py                    |   15 +-
 cheetah/SettingsManager.py           |    8 +-
 cheetah/Template.py                  |    2 +-
 cheetah/TemplateCmdLineIface.py      |    8 +-
 cheetah/Templates/_SkeletonPage.py   |   10 +-
 cheetah/Tests/CheetahWrapper.py      |   31 +-
 cheetah/Tests/Filters.py             |    2 +-
 cheetah/Tests/Misc.py                |   20 +
 cheetah/Tests/Performance.py         |    8 +-
 cheetah/Tests/Regressions.py         |    2 +-
 cheetah/Tests/SyntaxAndOutput.py     |    4 +-
 cheetah/Tests/Template.py            |    4 +-
 cheetah/Tests/Test.py                |    2 +
 cheetah/Tests/VerifyType.py          |  158 ------
 cheetah/Tests/unittest_local_copy.py |  978 ----------------------------------
 cheetah/Tests/xmlrunner.py           |    4 +-
 cheetah/Tools/MondoReport.py         |    9 +-
 cheetah/Tools/SiteHierarchy.py       |   10 +-
 cheetah/Utils/Misc.py                |   22 +-
 cheetah/Utils/VerifyType.py          |   83 ---
 cheetah/Utils/memcache.py            |   50 +-
 cheetah/Utils/statprof.py            |   16 +-
 cheetah/Version.py                   |   10 +-
 cheetah/c/_verifytype.c              |  107 ----
 32 files changed, 225 insertions(+), 1482 deletions(-)
 create mode 100755 buildandrun
 create mode 100644 cheetah/Tests/Misc.py
 delete mode 100644 cheetah/Tests/VerifyType.py
 delete mode 100755 cheetah/Tests/unittest_local_copy.py
 delete mode 100644 cheetah/Utils/VerifyType.py
 delete mode 100644 cheetah/c/_verifytype.c


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july