Permalink
Commits on Nov 17, 2009
  1. Update roadmap and other docs

    rtyler committed Nov 17, 2009
  2. Introduce the DirectiveAnalyzer for processing templates for directiv…

    …e usage
    
    Hoping to form this into a fully-fledged reporting tool so I can gauge
    usage of directives to start cutting some out.
    rtyler committed Nov 17, 2009
Commits on Nov 16, 2009
  1. Prevent Template.compile() from creating classnames with numerous lea…

    …ding underscores
    
    Issue originally reported by Kirill Uhanov <kirill.uhanov@intel.com> on the mailing
    list (see: "problem with include directive on cheetah 2.4.0")
    rtyler committed Nov 16, 2009
  2. Clean up a swath of fixes suggested by 2to3

    Fixes from 2to3 include: xrange, ws_comma, repr, reduce,
    raise, idioms, has_key, future, filter, exec, callable, apply
    rtyler committed Nov 16, 2009
  3. Refactor Cheetah.Parser.ArgList

    Added a test for ArgList as well; a large amount of code in
    Cheetah.Parser could do well to be cleaned up, but perhaps another
    day.
    rtyler committed Nov 16, 2009
  4. Refactor CheetahWrapper tests to locate my local cheetah/cheetah-comp…

    …ile in my PATH
    
    Adding the "buildandrun" shortcut script so to easily rerun the
    full test suite locally; usage: ./buildandrun cheetah/Tests/Test.py
    rtyler committed Nov 9, 2009
  5. Refactor usage of the "types" module out, per 2to3 -f types

    Left out cheetah/Template.py which will need to be refactored
    a bit more aggressively, particularly in Template.compile()
    rtyler committed Nov 9, 2009
  6. Refactor raw print statements in accordance with 2to3

    Removed prints in a couple places entirely, some of this
    code should likely use the `logging` module instead
    rtyler committed Nov 8, 2009
Commits on Oct 25, 2009
  1. Update manifest

    rtyler committed Oct 25, 2009
  2. tweak changes for release

    rtyler committed Oct 25, 2009
Commits on Oct 18, 2009
  1. remove unnecessary encoding in the default filters, now that everythi…

    …ng is a unicode object internally
    
    There is no longer any value in having the filters return encoded str objects,
    since they need to be decoded back to unicode before they can be combined with
    the rest of the template text (which is managed as a unicode object).  This
    patch maintains API compatibility but fundamentally changes the behavior of
    some of the filters.  RawOrEncodedUnicode and EncodeUnicode should be
    deprecated and removed from the API.
    
    Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
    mikebonnet committed with rtyler Oct 16, 2009
  2. Add Template.__unicode__() to return unicode() objects, while Templat…

    …e.__str__() returns encoded str() objects
    
    Per my discussion in #cheetah on IRC with mikeb@ regarding the following issue:
    	https://bugzilla.redhat.com/show_bug.cgi?id=529332
    
    This, in addition to recent patches to cheetah/DummyTransaction.py should alleviate
    migration issues for users still passing a mishmash of unicode()/str() objects into
    Templates. __str__() should return a str() object, whereas __unicode__() should
    return a unicode() object.
    
    No-op the EncodeUnicode filter when it encounters a unicode() object.
    rtyler committed Oct 16, 2009
Commits on Oct 15, 2009
  1. Merge branch 'next'

    Conflicts:
    	cheetah/Template.py
    	cheetah/Tests/Performance.py
    	cheetah/Version.py
    rtyler committed Oct 15, 2009
  2. Bump the version to Cheetah 2.4.0

    Starting the 2.4.xx series to denote base-compatibility with Python 2.4
    and up
    rtyler committed Oct 15, 2009
  3. Remove unnecessary dir()/set() calls in Template.__init__()

    When running cheetah.Tests.Performance.DynamicMethodCompilationTest
    with 100000 iterations set, Template.__init__() is the most performance
    sensitive call.
    
    Prior to this commit:
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        100000   12.558    0.000   15.274    0.000 Template.py:1025(__init__)
    
    After this commit:
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        100000    1.263    0.000    3.541    0.000 Template.py:1025(__init__)
    
    That code need not execute every time __init__ is called
    rtyler committed Oct 13, 2009
  4. Remove the encode/decode calls in DummyResponse.write()/getvalue() an…

    …d take a more optimistic approach
    
    Borrowing some concepts from the "slide-compat" branch that I maintain
    for Slide, Inc. for gracefully handling less-than-ideal string-encoding
    situations (as is the case for Slide).
    
    Making DummyResponse.getvalue() optimistic in trying to u''.join() a
    list of random string (unicode, str (various encodings)) objects
    and then only on a UnicodeDecodeError, run through the "safeConvert"
    function (blech) to handle encoded str() objects
    rtyler committed Oct 15, 2009
  5. Revert "Use cStringIO instead of array in DummyTransaction"

    This reverts commit 9ac5e4c.
    
    Left some of my previous changes in place; self._outputChunks
    will deal with only utf-8 encoded strings and then decode them all
    at the very end
    
    Conflicts:
    
    	cheetah/DummyTransaction.py
    rtyler committed Oct 15, 2009
  6. Correctly use cStringIO which only deals in bytestrings.

    I'm uncertain if there's any lossiness in encoding a unicode()
    object 'utf-8' prior to writing to the stream, but this does
    appear to inadvertantly fix another issue we had with mixing UTF-8
    encoded strings and unicode() objects when filling a template.
    rtyler committed Oct 15, 2009
  7. Use cStringIO instead of array in DummyTransaction

    Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
    arunk committed with rtyler Oct 14, 2009
Commits on Oct 13, 2009
  1. Push Reserved_SearchList onto the Template class object

    Suggested by: aahz@
    rtyler committed Oct 13, 2009
  2. Update the printing of the Performance tests

    I want to print out the directories to ensure that I'm actually
    testing the code I think I'm testing (*facepalm*)
    rtyler committed Oct 13, 2009
  3. Cleanup some of this "type()" muckery that's been bugging me.

    The amount of type-checking here is absurd for a duck-typed language
    rtyler committed Oct 13, 2009
  4. Remove unnecessary dir()/set() calls in Template.__init__()

    When running cheetah.Tests.Performance.DynamicMethodCompilationTest
    with 100000 iterations set, Template.__init__() is the most performance
    sensitive call.
    
    Prior to this commit:
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        100000   12.558    0.000   15.274    0.000 Template.py:1025(__init__)
    
    After this commit:
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        100000    1.263    0.000    3.541    0.000 Template.py:1025(__init__)
    
    That code need not execute every time __init__ is called
    rtyler committed Oct 13, 2009