Permalink
Commits on Mar 27, 2009
  1. Bump Version.py

    R. Tyler Ballance committed Mar 27, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  2. Merge branch 'maint'

    R. Tyler Ballance committed Mar 27, 2009
  3. Update CHANGES and the webpages to denote the new subrelease

    R. Tyler Ballance committed Mar 27, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  4. Correct a bug introduced in v2.1.0 that affected odd inline imports

    R. Tyler Ballance committed Mar 27, 2009
    Added a regression test as well to prevent it from happening again, what basically
    was going on is that in v2.1.0 I introduced code to properly place inline imports, for
    syntax like the following:
    
    	#try
    		#import cjson
    	#except ImportError
    		#import simplejson
    	#end try
    
    The actual bug was with blocks of code like this:
    
    	#def function
    		#if $something
    			#from package import module
    			$module.do_thing()
    		#end if
    	#end def
    
    Which would result in:
    
    	def function(self):
    		if something:
    			import module
    			module.do_thing()
    
    Instead of the proper "from package import module" syntax.
    
    Sorted, all tests passing now.
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
    
    Conflicts:
    
    	src/Tests/Regressions.py
Commits on Mar 18, 2009
  1. Add the Cheetah TextMate bundle to the repository for convenience

    R. Tyler Ballance committed Mar 18, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  2. Take a snapshot of the old CheetahDocs module in CVS and dump it into…

    R. Tyler Ballance committed Mar 18, 2009
    … Git
    
    There's probably more elegant means of accomplishing this, but I'm strapped for time and motiviation to import doc history
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  3. Update the header image with terriblew Gimp text

    R. Tyler Ballance committed Mar 18, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  4. Embolden the 'Community Edition'

    R. Tyler Ballance committed Mar 18, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  5. Update the _SiteTemplate to reflect the recent Cheetah Community Edit…

    R. Tyler Ballance committed Mar 18, 2009
    …ion changes
    
    The documentation portion of the site is still not up to date, the generated HTML however will
    be dumped into the gh-pages branch for the GitHub site.
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
Commits on Mar 16, 2009
  1. Update CHANGES file with release date of v2.1.0

    rtyler committed Mar 16, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  2. Applying Satoru's patch the way he posted to the redhat bugzilla.

    R. Tyler Ballance committed Mar 16, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  3. Revert "Quite the deprecation warnings under Python 2.6 and upwards o…

    R. Tyler Ballance committed Mar 16, 2009
    …n the use of the md5 module"
    
    This is stupid, why not just apply Satoru's patch?
    
    This reverts commit ef3d0c7.
  4. Update changelog

    R. Tyler Ballance committed Mar 16, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  5. Quite the deprecation warnings under Python 2.6 and upwards on the us…

    R. Tyler Ballance committed Mar 16, 2009
    …e of the md5 module
    
    Patch suggested by Satoru SATOH <satoru.satoh@gmail.com> with minor tweaks in order to properly be backwards compatible to versions prior to Python 2.6
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
Commits on Mar 15, 2009
  1. Add the PyUnit XML Test Runner code for CI

    R. Tyler Ballance committed Mar 15, 2009
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  2. Fix a regression that I introduced into the dynamic compiler code

    R. Tyler Ballance committed Mar 15, 2009
    Basically in 9055e2c, in order to support
    syntax like the following:
            #try
                    #import cjson
            #except ImportError
                    #import simplejson
            #end try
    
    I had to modify Compiler.py:addImportedVarNames() in order to properly
    place the inline import statements at the right position in the method body.
    
    This however, breaks dynamic compilation, particularly when using chunks such as:
    	#from math import cos
    
    As a number of the dynamic compilation tests do, this causes an "import cos" statement
    to be inlined into source via Compiler.py:addImportStatement() which chops off the last
    part of the import statement and just passes "['cos']" into addImportedVarNames().
    
    Pretty gross.
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  3. Bump the Version.py to 2.1.0 in anticipation for a new release

    R. Tyler Ballance committed Mar 15, 2009
    Also updating the CHANGES with the most recent community patches applied into this branch
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  4. Apply the parallel compilation patch from Evan Klitzke (evan@eklitzke…

    rtyler committed Mar 15, 2009
    ….org)
    
    Now cheetah-compile can spawn off multiple subprocesses to compile temlpates in parallel much like `make -j 2` will.
    
    Example usage:
    	cheetah compile my-templates -R --parallel=2
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
Commits on Jan 31, 2009
  1. Propagate my changes over from the Python version of NameMapper into …

    rtyler committed Jan 31, 2009
    …the C version
    
    This should resolve the NameMapper.NotFound exception issue
    
    Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
  2. Fix the regression test I added in the previuos commit

    rtyler committed Jan 31, 2009
    The fix is currently only in the Python version, calling hasattr() will execute object.__getattr__() which in cases where it may raise an unrelated exception, hasattr() will return False and cause Cheetah to raise a NotFound exception
    
    	tyler@grapefruit:~/source/github/cheetah> python src/Tests/NameMapper.py
    	.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
    	----------------------------------------------------------------------
    	Ran 561 tests in 2.756s
    
    	OK
    
    	tyler@grapefruit:~/source/github/cheetah> python src/Tests/Regressions.py
    	..
    	----------------------------------------------------------------------
    	Ran 2 tests in 0.028s
    
    	OK
    	tyler@grapefruit:~/source/github/cheetah>
    
    Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
  3. Add the Regressions.py file for regression tests for tracking down bugs

    rtyler committed Jan 31, 2009
    The first issue I'm adding into here is an error where NameMapper will raise a Cheetah.NameMapper.NotFound exception when accessing an attribute that raises an exception (example class included)
    
    Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
Commits on Jan 5, 2009
  1. Fix test, and correct the error cast in the compiler

    R. Tyler Ballance committed Jan 5, 2009
    Cheetah markup like this:
    	#try
    		#import cjson
    	#except ImportError
    		#import simplejson
    	#end try
    
    Will now appropriately generate this code:
    	try:
    		import cjson
    	except ImportError:
    		import simplejson
    
    Instead of what it previously generated:
    	import cjson
    	import simplejson
    
    	try:
    	except ImportError
    
    Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  2. Add a test to verify the failure we're seeing with regards to nesting…

    R. Tyler Ballance committed Jan 5, 2009
    … import statements inside of #try/#end try blocks
    
    	tyler@grapefruit:~/source/github/cheetah/src> python Tests/Template.py TryExceptImportTest
    	/home/tyler/source/github/cheetah/build/lib.linux-x86_64-2.6/Cheetah/CacheRegion.py:30: DeprecationWarning: the md5 module is deprecated; use hashlib instead
    	  import md5
    	E
    	**********************************************************************
    	ERROR __main__.TryExceptImportTest.test_FailCase ()
    	----------------------------------------------------------------------
    	Traceback (most recent call last):
    	  File "Tests/Template.py", line 321, in test_FailCase
    		klass = Template.compile(source=source)
    	  File "/home/tyler/source/github/cheetah/build/lib.linux-x86_64-2.6/Cheetah/Template.py", line 779, in compile
    		raise parseError
    	ParseError:
    
    	Error in the Python code which Cheetah generated for this template:
    	================================================================================
    
    	expected an indented block (DynamicallyCompiledCheetahTemplate.py, line 91)
    
    	Line|Python Code
    	----|-------------------------------------------------------------
    	89  |''')
    	90  |        try: # generated from line 5, col 17
    	91  |        except ImportError: # generated from line 7, col 17
    					 ^
    	92  |            _v = VFFSL(SL,"print",True) # '$print' on line 8, col 21
    	93  |            if _v is not None: write(_filter(_v, rawExpr='$print')) # from line 8, col 21.
    	94  |            write(''' "This will never happen!"
    
    	================================================================================
    
    	Here is the corresponding Cheetah code:
    
    	Line 7, column 17
    
    	Line|Cheetah Code
    	----|-------------------------------------------------------------
    	4   |                Ahoy!
    	5   |                #try
    	6   |                    #import sys
    	7   |                #except ImportError
    						 ^
    	8   |                    $print "This will never happen!"
    	9   |                #end try
    	10  |            #end def
    
    	----------------------------------------------------------------------
    	Ran 1 tests in 0.031s
    
    	FAILED (errors=1)
    	tyler@grapefruit:~/source/github/cheetah/src>
  3. Add a basic .gitignore for sanity's sake

    R. Tyler Ballance committed Jan 5, 2009
Commits on Mar 10, 2008
  1. update

    tavis_rudd committed Mar 10, 2008
  2. 2 new tests contributed by Graham Dennis

    tavis_rudd committed Mar 10, 2008
  3. second part of the multiple-decorators patch

    tavis_rudd committed Mar 10, 2008
  4. added support for multiple decorators per method (suggested by Graham…

    tavis_rudd committed Mar 10, 2008
    … Dennis)
  5. Fixed bug where the module name ends up being a unicode string. It ne…

    tavis_rudd committed Mar 10, 2008
    …eds to be
    
    an instance of str.
Commits on Feb 14, 2008
  1. strip out unused crap that Cheetah doesn't need

    tavis_rudd committed Feb 14, 2008
Commits on Dec 29, 2007
  1. cosmetic cleanup

    tavis_rudd committed Dec 29, 2007
Commits on Dec 10, 2007
  1. new

    tavis_rudd committed Dec 10, 2007
  2. rm debug code

    tavis_rudd committed Dec 10, 2007
  3. make autocalling in valueForName correctly ignore newstyle classes an…

    tavis_rudd committed Dec 10, 2007
    …d instances
    
    that are callable, as it does for oldstyle classes and instances.