Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

cheetah-archive · Cheetah Template System Archive

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 3
  • Category: Web Design
  • Founded: Jul 18, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 4262 - 4291 of 5012   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4262 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Jan 5, 2009 4:24 pm
Subject: Re: [Cheetahtemplate-discuss] [PATCH] Fix test, and correct the error cast in the compiler
tyler@...
Send Email Send Email
 
Looks like my cover letter got gobbled up in transit, here it is anyways
--------------------------------------------------------------------------


From R. Tyler Ballance <tyler@...>
Subject: Patch to fix broken #import behavior

Files changed:
     M       src/Compiler.py
     M       src/Tests/Template.py

The following two patches are meant to fix broken behavior with #import
particularly when wrapped within #try/#except/#end try blocks in Cheetah
templates.

Take the following markup for example:
     #try
             #import cjson
     #except ImportError
             #import simplejson
     #end try

Before the addition of the patch, this is what would be generated:
     import cjson
     import simplejson

     try:
     except ImportError

Cheetah will now generate this code instead:
     try:
             import cjson
     except ImportError:
             import simplejson

I generated the series of patches against my Git clone of the Cheetah
CVS tree (https://github.com/rtyler/cheetah/tree) in case anybody is
interesting in working with Cheetah in Git :)

I'd appreciate any comments, testing and/or code review any of you
seasoned Cheetah developers have to offer, as this is clearly my first
Cheetah patch ;)


--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4263 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Jan 5, 2009 4:19 pm
Subject: [Cheetahtemplate-discuss] [PATCH] Fix test, and correct the error cast in the compiler
tyler@...
Send Email Send Email
 
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@...>
---
  src/Compiler.py       |    2 +-
  src/Tests/Template.py |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Compiler.py b/src/Compiler.py
index a2fc7e5..cc1c94e 100644
--- a/src/Compiler.py
+++ b/src/Compiler.py
@@ -1712,7 +1712,7 @@ class ModuleCompiler(SettingsManager, GenUtils):
          return self._importedVarNames

      def addImportedVarNames(self, varNames):
-        self._importedVarNames.extend(varNames)
+        self.addChunk('import %s' % ', '.join(varNames))

      ## methods for adding stuff to the module and class definitions

diff --git a/src/Tests/Template.py b/src/Tests/Template.py
index d95b507..c8b6ee8 100644
--- a/src/Tests/Template.py
+++ b/src/Tests/Template.py
@@ -307,8 +307,8 @@ class Preprocessors(TemplateTest):

  class TryExceptImportTest(TemplateTest):
      def test_FailCase(self):
+        ''' Test situation where an inline #import statement will get relocated
'''
          source = '''
-
              #def myFunction()
                  Ahoy!
                  #try
@@ -318,8 +318,8 @@ class TryExceptImportTest(TemplateTest):
                  #end try
              #end def
              '''
+        # This should raise an IndentationError (if the bug exists)
          klass = Template.compile(source=source)
-        print klass
          t = klass(namespaces={'foo' : 1234})


--
1.6.0.2


------------------------------------------------------------------------------
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4264 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Jan 5, 2009 4:19 pm
Subject: [Cheetahtemplate-discuss] Patch to fix broken #import behavior
tyler@...
Send Email Send Email
 
Files changed:
	 M       src/Compiler.py
	 M       src/Tests/Template.py

The following two patches are meant to fix broken behavior with #import
particularly when wrapped within #try/#except/#end try blocks in Cheetah
templates.

Take the following markup for example:
	 #try
			 #import cjson
	 #except ImportError
			 #import simplejson
	 #end try

Before the addition of the patch, this is what would be generated:
	 import cjson
	 import simplejson

	 try:
	 except ImportError

Cheetah will now generate this code instead:
	 try:
			 import cjson
	 except ImportError:
			 import simplejson

I generated the series of patches against my Git clone of the Cheetah
CVS tree (https://github.com/rtyler/cheetah/tree) in case anybody is
interesting in working with Cheetah in Git :)

I'd appreciate any comments, testing and/or code review any of you
seasoned Cheetah developers have to offer, as this is clearly my first
Cheetah patch ;)


Cheers,
-R. Tyler Ballance

------------------------------------------------------------------------------
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4265 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Jan 5, 2009 4:19 pm
Subject: [Cheetahtemplate-discuss] [PATCH] Add a test to verify the failure we're seeing with regards to nesting import statements inside of #try/#end try blocks
tyler@...
Send Email Send Email
 
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.p\
y", 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>
---
  src/Tests/Template.py |   20 ++++++++++++++++++++
  1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/Tests/Template.py b/src/Tests/Template.py
index b97cf5d..d95b507 100644
--- a/src/Tests/Template.py
+++ b/src/Tests/Template.py
@@ -305,6 +305,26 @@ class Preprocessors(TemplateTest):
          assert str(t)==('This is a bit of text that needs
translation\n'*2)[:-1]


+class TryExceptImportTest(TemplateTest):
+    def test_FailCase(self):
+        source = '''
+
+            #def myFunction()
+                Ahoy!
+                #try
+                    #import sys
+                #except ImportError
+                    $print "This will never happen!"
+                #end try
+            #end def
+            '''
+        klass = Template.compile(source=source)
+        print klass
+        t = klass(namespaces={'foo' : 1234})
+
+
+
+
  ##################################################
  ## if run from the command line ##

--
1.6.0.2


------------------------------------------------------------------------------
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4266 From: "Jean-Baptiste Quenot" <jbq@...>
Date: Mon Jan 12, 2009 9:07 pm
Subject: [Cheetahtemplate-discuss] Unicode woes
jbq@...
Send Email Send Email
 
Dear all,

I'm using Cheetah 2.0.1 with Python 2.5.2. In my Python code I use to
set template variables that reference other template instances.  And
when the nested template contains Unicode strings, Cheetah complains.

Here is a detailed example with a set of three files: testFailing.py
contains the Python code, main.tmpl is the main template, and
other.tmpl is the nested template:

-------------------------------------------------------------------------
testFailing.py
-----------------------------------------------------------------------
# -*- coding: utf8 -*-

"""
This Python snippet shows that Cheetah calls str(t) even when t is a
Cheetah Template containing unicode chunks
"""

from Cheetah.Template import Template

t = Template.compile(file="main.tmpl")
otherT = Template.compile(file="other.tmpl")
other = otherT()
t.other = other

print "------------------------------------------------------------------------"
t.v = u'Unicode String'
t.other.v = u'Unicode String'
print unicode(t())

print "------------------------------------------------------------------------"
t.v = u'Unicode String with eacute é'
t.other.v = u'Unicode String'
print unicode(t())

print "------------------------------------------------------------------------"
t.v = u'Unicode String with eacute é'
t.other.v = u'Unicode String with eacute é'
print unicode(t())


-------------------------------------------------------------------------
main.tmpl
-----------------------------------------------------------------------
Main file with $v

$other


-------------------------------------------------------------------------
other.tmpl
-----------------------------------------------------------------------
Other file with $v



Here is the execution output:

$ python testFailing.py
------------------------------------------------------------------------
Main file with Unicode String

Other file with Unicode String


------------------------------------------------------------------------
Main file with Unicode String with eacute é

Other file with Unicode String


------------------------------------------------------------------------
Traceback (most recent call last):
  File "testFailing.py", line 27, in <module>
    print unicode(t())
  File "/var/lib/python-support/python2.5/Cheetah/Template.py", line
981, in __str__
    def __str__(self): return getattr(self, mainMethName)()
  File "main_tmpl.py", line 93, in respond
  File "/var/lib/python-support/python2.5/Cheetah/Filters.py", line
51, in filter
    filtered = str(val)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 43: ordinal not in range(128)


As you can see, Cheetah.Filters.Filter is trying to cast the template
instance of "other.tmpl" which has Unicode content to a String.  If I
cast the template beforehand to Unicode it works:

-------------------------------------------------------------------------
testWorking.py
-----------------------------------------------------------------------
# -*- coding: utf8 -*-

from Cheetah.Template import Template

t = Template.compile(file="main.tmpl")
otherT = Template.compile(file="other.tmpl")
other = otherT()

print "------------------------------------------------------------------------"
t.v = u'Unicode String'
other.v = u'Unicode String'
t.other = unicode(other)
print unicode(t())

print "------------------------------------------------------------------------"
t.v = u'Unicode String with eacute é'
other.v = u'Unicode String'
t.other = unicode(other)
print unicode(t())

print "------------------------------------------------------------------------"
t.v = u'Unicode String with eacute é'
other.v = u'Unicode String with eacute é'
t.other = unicode(other)
print unicode(t())


Execution output:

$ python testWorking.py
------------------------------------------------------------------------
Main file with Unicode String

Other file with Unicode String


------------------------------------------------------------------------
Main file with Unicode String with eacute é

Other file with Unicode String


------------------------------------------------------------------------
Main file with Unicode String with eacute é

Other file with Unicode String with eacute é


However if I add a Unicode char in main.tmpl, there is another failure:


------------------------------------------------------------------------
main.tmpl
------------------------------------------------------------------------
Main file with $v and another eacute é

$other


Execution output:

$ python testWorking.py
------------------------------------------------------------------------
Traceback (most recent call last):
   File "testWorking.py", line 13, in <module>
     print unicode(t())
   File "/var/lib/python-support/python2.5/Cheetah/Template.py", line
981, in __str__
     def __str__(self): return getattr(self, mainMethName)()
   File "main_tmpl.py", line 100, in respond
   File "/var/lib/python-support/python2.5/Cheetah/DummyTransaction.py",
line 31, in getvalue
     return ''.join(outputChunks)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
20: ordinal not in range(128)


Maybe something more elaborate could be done in Filter to avoid this
nasty side effect.

If possible I'd like to avoid hardcoding UTF-8 in sitecustomize.py,
this is an ugly hack!

Thanks in advance for your help!
--
Jean-Baptiste Quenot
http://jbq.caraldi.com/

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4267 From: "Alan Formstone" <mail@...>
Date: Wed Jan 14, 2009 3:56 pm
Subject: [Cheetahtemplate-discuss] py2exe problem
mail@...
Send Email Send Email
 

Hi,

 

I would appreciate if somebody could help me with a little problem I have.

 

I have a small app working perfectly with Cheetah, but get the following error after running it through py2exe

 

Traceback (most recent call last):

  File "aftgui.pyc", line 252, in OnLaunchTool

  File "Cheetah\Template.pyc", line 1204, in __init__

  File "Cheetah\Template.pyc", line 1492, in _compile

  File "Cheetah\Template.pyc", line 780, in compile

  File "DynamicallyCompiledCheetahTemplate.py", line 18, in <module>

ImportError: No module named DummyTransaction

 

 

The program was packaged with py2exe using :

 

from distutils.core import setup

from Ft.Lib.DistExt import Py2Exe

 

setup(windows=[{"script":"D:/cygwin/home/Lhs/aftools/src/aft.py"}],

            options = {"py2exe": {"dist_dir": "D:/Program Files/aft/bin"}})

 

The Py2Exe import from Ft.Lib.DistExt is due to another py2exe problem I had with 4Suite/Amara

 

 

I spent the last hour googling with no luck and would search this archive but can’t find a way.

 

 

Cheers,

Alan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4268 From: "Evan Klitzke" <evan@...>
Date: Thu Jan 15, 2009 6:38 pm
Subject: [Cheetahtemplate-discuss] Parallel compilation (patch)
evan@...
Send Email Send Email
 
I wrote a small patch to Cheetah that allows you to use a process pool
to compile templates in parallel. Example usage:

cheetah compile -R templates --parallel 4

This will compile all of the Cheetah templates in the `templates'
directory four ways. A separate process is forked for each
compilation.

The use case behind this is that I work at a company that uses Cheetah
heavily (more than 600 templates checked into our source repository).
When issuing make from a clean checkout it takes a long time to
compile all of the templates. This makes that go a lot faster. It's
also a lot faster than telling make that each template is a separate
rule, and having make -j4 invoke a new instance of cheetah compile for
each template.

Is there any interest in incorporating this patch in a future upstream
Cheetah release?

--
Evan Klitzke <evan@...> :wq
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4269 From: "R. Tyler Ballance" <tyler@...>
Date: Sat Jan 31, 2009 11:53 pm
Subject: [Cheetahtemplate-discuss] [PATCH] Prevent NameMapper from gobbling up exceptions
tyler@...
Send Email Send Email
 
Howdy all, I figured I'd notify the list, I discovered another bug when
hunting down one of our own issues.

There was/is an error in the NameMapper code that causes objects that
override __getattr__() (and potentially raise exceptions) to get
swallowed up inside of NameMapper.py:_valueForName()

Basically the use of hasattr(obj, key) causes getattr() to break
prematurely and return False, swallowing an exception in the process.

Attached is a patch that fixes this in the C version of the NameMapper
module as well as the Python version. I've included a regression test
written against the stock PyUnit to both exhibit the behavior and
correct it.

(If you're curious as to how anybody might have this error, we're using
__getattr__() in some instances to provide transparent distributed cache
access on objects passed in on the searchList, and there are rare
occassions when cache.read() might raise, and Cheetah swallows the cache
read exception)

As my previous patches, I've pushed this one up into my GitHub
repository of Cheetah (https://github.com/rtyler/cheetah/tree), these
changes in particualr have been committed to the "next" branch if you're
interested.
--
Cheers,
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4270 From: mobiledreamers@...
Date: Fri Feb 6, 2009 10:11 am
Subject: [Cheetahtemplate-discuss] Cheetah Textmate bundle
mobiledreamers@...
Send Email Send Email
 
Does any of you have a Cheetah Textmate bundle

Can you please share
thanks

--
Gpirate the top torrent search engine
http://gpirate.com
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4271 From: "Dirk van Oosterbosch, IR labs" <labs@...>
Date: Sun Feb 8, 2009 6:29 pm
Subject: [Cheetahtemplate-discuss] Python 2.6 migration path?
labs@...
Send Email Send Email
 
Hi,

I'm trying to update my system to python 2.6.1

Installing from easy_install works, but 'cheetah test' fails with 30
failures.
I'm reading about some bugs online:
https://bugzilla.redhat.com/show_bug.cgi?id=480945
https://bugzilla.redhat.com/show_bug.cgi?id=474090

Can we expect a patch to solve all these problems?
Or can we expect a new version of Cheetah for python 2.6 soon?

best
dirk





--
-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands

http://labs.ixopusada.com
-----------------------------
--





------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4272 From: "Dirk van Oosterbosch, IR labs" <labs@...>
Date: Sun Feb 8, 2009 6:13 pm
Subject: Re: [Cheetahtemplate-discuss] Cheetah Textmate bundle
labs@...
Send Email Send Email
 
yep,

I'm using this one, but it is far from complete.

(Of course the biggest problem with a Textmate bundle for a language like Cheetah, is that you can output any language with your templates, and you would also like these embedded languages to look and behave nice within Textmate. So until Textmate 2.0 sees daylight, I guess, we'll have to include the used language as well.
I included html, because that was what I was generating at the time I made this bundle.
There are two language files to toggle between: source.cheetah and text.html.cheetah)

hope it is any useful
dirk



On 6 feb 2009, at 11:11, mobiledreamers@... wrote:

Does any of you have a Cheetah Textmate bundle

Can you please share
thanks

--
Gpirate the top torrent search engine
http://gpirate.com
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



-- 
-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands

-----------------------------
--


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4273 From: mobiledreamers@...
Date: Mon Feb 9, 2009 6:53 pm
Subject: Re: [Cheetahtemplate-discuss] Cheetah Textmate bundle
mobiledreamers@...
Send Email Send Email
 
i m unable to unzip this file
can you please resend it thanks

On 2/8/09, Dirk van Oosterbosch, IR labs <labs@...> wrote:
yep,

I'm using this one, but it is far from complete.


(Of course the biggest problem with a Textmate bundle for a language like Cheetah, is that you can output any language with your templates, and you would also like these embedded languages to look and behave nice within Textmate. So until Textmate 2.0 sees daylight, I guess, we'll have to include the used language as well.
I included html, because that was what I was generating at the time I made this bundle.
There are two language files to toggle between: source.cheetah and text.html.cheetah)

hope it is any useful
dirk



On 6 feb 2009, at 11:11, mobiledreamers@... wrote:

Does any of you have a Cheetah Textmate bundle

Can you please share
thanks

--
Gpirate the top torrent search engine
http://gpirate.com
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



-- 
-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands

-----------------------------
--



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss





--
Gpirate the top torrent search engine
http://gpirate.com
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4274 From: Peter Warasin <peter@...>
Date: Mon Feb 16, 2009 5:00 pm
Subject: [Cheetahtemplate-discuss] RecursiveNull class is not comparable
peter@...
Send Email Send Email
 
Hi list

I use the RecursiveNull class in order to fill variables with '' when
they are not in the search list.

An expression of the following form however always will be False:

#if $INEXISTENVAR != 'on'
Not on
#end if

$INEXISTENTVAR in this expression is RecursiveNull, which should return
'', but it does not compare to 'on', since RecursiveNull has no __eq__()
   method.

A patch is attached to this mail, which solves the problem for me.
I don't know if there is maybe a better solution for this problem,
without patching the code.. (?)


peter

--
:: e n d i a n
:: open source - open minds

:: peter warasin
:: http://www.endian.com   :: peter@...
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4275 From: mobiledreamers@...
Date: Mon Mar 2, 2009 5:04 pm
Subject: [Cheetahtemplate-discuss] Is this a good way to cache cheetah templates?
mobiledreamers@...
Send Email Send Email
 
This is my first attempt at memcaching html page using cheetah 
since cheetah render needs locals() i use getCallerInfo() to get the locals() and send to memcached
let me know if it is possible to better do this
notice getCallerInfo

utils.py
@log_time_func
def renderpage(key, htmlfile, deleteafter=3600):
    from globaldb import mc
    try:page = mc.get(key)
    except:
        page=None
        clogger.info('except error mc.get '+ key)
    if not page:
        clogger.info(key+ ' rendering cheetah page')
        terms = getCallerInfo(1)
        #print terms
        page = str(web.render(htmlfile, asTemplate=True, terms=terms))
        try:mc.set(key, page, deleteafter)
        except:
            clogger.info('except error mc.set '+ key)
    return page

@log_time_func
@memcachethis
def mcrenderpage(key, htmlfile, deleteafter=3600):
    terms = getCallerInfo(2)
    #print terms
    return str(web.render(htmlfile, asTemplate=True, terms=terms))

def getCallerInfo(decorators=0):
    '''returns locals of caller using frame.optional pass number of decorators\nFrom Dig deep into python internals http://www.devx.com/opensource/Article/31593/1954'''
    f = sys._getframe(2+decorators)
    args = inspect.getargvalues(f)
    return args[3]

Usage
        key=facebookstuff.APP_NAME+'newstart'+str(uid)
        return utils.renderpage(key, 'pick.html')

--
Bidegg worlds best auction site
http://bidegg.com
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4276 From: Satoru SATOH <satoru.satoh@...>
Date: Fri Mar 13, 2009 2:06 pm
Subject: Re: [Cheetahtemplate-discuss] [PATCH] Stop annoying "DeprecationWarning; the md5 ..." messages
satoru.satoh@...
Send Email Send Email
 
Hi,

It seems the mail was blocked and not reached to the list.
So I sent this again.

Could you please someone take a look at it?
The patch is also available from Red Hat Bugzilla #480945:

   https://bugzilla.redhat.com/show_bug.cgi?id=480945
  (patch itself:  https://bugzilla.redhat.com/attachment.cgi?id=330020)


Thanks,
Satoru SATOH

2009/1/27 Satoru SATOH <satoru.satoh@...>:
> Hi,
>
> I found Cheetah/CacheRegion.py uses old md5 module deprecated in
> recent python versions (> 2.5?).
> Thus, "DeprecationWarning: the md5 module is deprecated; use hashlib
> instead" messages are out.
>
> Here is an example log of cobbler which uses Cheetah internally.
>
> root@localhost site-packages]# cobbler sync
> /usr/lib/python2.6/site-packages/Cheetah/CacheRegion.py:30:
> DeprecationWarning: the md5 module is deprecated; use hashlib instead
>  import md5
> /usr/lib/python2.6/site-packages/Cheetah/CacheRegion.py:30:
> DeprecationWarning: the md5 module is deprecated; use hashlib instead
>  import md5
> (snip)
>
>  OS: Fedora rawhide
>  Python: python-2.6-4.fc11.i386
> Cheetah: python-cheetah-2.0.1-4.fc11.i386 (I confirmed same issue
> remains in cvs HEAD also.)
>
>
> I attached an experimental patch fixing this issue.
>
> I guess it works for older python versions but not tested.
> I confirmed it works for me at least.
>
> Thanks,
> Satoru SATOH

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4277 From: mobiledreamers@...
Date: Sat Mar 14, 2009 10:14 am
Subject: Re: [Cheetahtemplate-discuss] Parallel compilation (patch)
mobiledreamers@...
Send Email Send Email
 
is this patch applied

On 1/15/09, Evan Klitzke <evan@...> wrote:
I wrote a small patch to Cheetah that allows you to use a process pool
to compile templates in parallel. Example usage:

cheetah compile -R templates --parallel 4

This will compile all of the Cheetah templates in the `templates'
directory four ways. A separate process is forked for each
compilation.

The use case behind this is that I work at a company that uses Cheetah
heavily (more than 600 templates checked into our source repository).
When issuing make from a clean checkout it takes a long time to
compile all of the templates. This makes that go a lot faster. It's
also a lot faster than telling make that each template is a separate
rule, and having make -j4 invoke a new instance of cheetah compile for
each template.

Is there any interest in incorporating this patch in a future upstream
Cheetah release?

--
Evan Klitzke <evan@...> :wq

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss





--
Bidegg worlds best auction site
http://bidegg.com
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4278 From: mobiledreamers@...
Date: Sat Mar 14, 2009 10:15 am
Subject: Re: [Cheetahtemplate-discuss] Patch to fix broken #import behavior
mobiledreamers@...
Send Email Send Email
 
is this patch applied

On 1/5/09, R. Tyler Ballance <tyler@...> wrote:

Files changed:
       M       src/Compiler.py
       M       src/Tests/Template.py

The following two patches are meant to fix broken behavior with #import
particularly when wrapped within #try/#except/#end try blocks in Cheetah
templates.

Take the following markup for example:
       #try
                       #import cjson
       #except ImportError
                       #import simplejson
       #end try

Before the addition of the patch, this is what would be generated:
       import cjson
       import simplejson

       try:
       except ImportError

Cheetah will now generate this code instead:
       try:
                       import cjson
       except ImportError:
                       import simplejson

I generated the series of patches against my Git clone of the Cheetah
CVS tree (https://github.com/rtyler/cheetah/tree) in case anybody is
interesting in working with Cheetah in Git :)

I'd appreciate any comments, testing and/or code review any of you
seasoned Cheetah developers have to offer, as this is clearly my first
Cheetah patch ;)


Cheers,
-R. Tyler Ballance

------------------------------------------------------------------------------
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



--
Bidegg worlds best auction site
http://bidegg.com
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4279 From: "R. Tyler Ballance" <tyler@...>
Date: Sun Mar 15, 2009 8:33 am
Subject: [Cheetahtemplate-discuss] Preparing a Community Cheetah 2.1.0 release
tyler@...
Send Email Send Email
 
On Sat, Mar 14, 2009 at 03:14:03AM -0700, mobiledreamers@... wrote:
>    is this patch applied

I have applied this patch, including the another couple that I have had
lying around into the "next" branch of my Git repository for Cheetah
(http://github.com/rtyler/cheetah/tree/next)

It appears that this project is either in severe hibernation or just
about dead, as a response, I'm preparing a Community Cheetah release
2.1.0 which contains a number of fixes and will hopefully breath some
new life into the project.

If anybody is interested let me know, I'll be preparing some release
tarballs and such later this weekend.


Cheers

>
>    On 1/15/09, Evan Klitzke <evan@...> wrote:
>
>      I wrote a small patch to Cheetah that allows you to use a process pool
>      to compile templates in parallel. Example usage:
>
>      cheetah compile -R templates --parallel 4
>
>      This will compile all of the Cheetah templates in the `templates'
>      directory four ways. A separate process is forked for each
>      compilation.
>
>      The use case behind this is that I work at a company that uses Cheetah
>      heavily (more than 600 templates checked into our source repository).
>      When issuing make from a clean checkout it takes a long time to
>      compile all of the templates. This makes that go a lot faster. It's
>      also a lot faster than telling make that each template is a separate
>      rule, and having make -j4 invoke a new instance of cheetah compile for
>      each template.
>
>      Is there any interest in incorporating this patch in a future upstream
>      Cheetah release?


--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4280 From: mobiledreamers@...
Date: Sun Mar 15, 2009 7:27 pm
Subject: Re: [Cheetahtemplate-discuss] Preparing a Community Cheetah 2.1.0 release
mobiledreamers@...
Send Email Send Email
 
Please do that would be awesome
Cheetah is like da best templating language
thanks

On Sun, Mar 15, 2009 at 1:33 AM, R. Tyler Ballance <tyler@...> wrote:
On Sat, Mar 14, 2009 at 03:14:03AM -0700, mobiledreamers@... wrote:
>    is this patch applied

I have applied this patch, including the another couple that I have had
lying around into the "next" branch of my Git repository for Cheetah
(http://github.com/rtyler/cheetah/tree/next)

It appears that this project is either in severe hibernation or just
about dead, as a response, I'm preparing a Community Cheetah release
2.1.0 which contains a number of fixes and will hopefully breath some
new life into the project.

If anybody is interested let me know, I'll be preparing some release
tarballs and such later this weekend.


Cheers

>
>    On 1/15/09, Evan Klitzke <evan@...> wrote:
>
>      I wrote a small patch to Cheetah that allows you to use a process pool
>      to compile templates in parallel. Example usage:
>
>      cheetah compile -R templates --parallel 4
>
>      This will compile all of the Cheetah templates in the `templates'
>      directory four ways. A separate process is forked for each
>      compilation.
>
>      The use case behind this is that I work at a company that uses Cheetah
>      heavily (more than 600 templates checked into our source repository).
>      When issuing make from a clean checkout it takes a long time to
>      compile all of the templates. This makes that go a lot faster. It's
>      also a lot faster than telling make that each template is a separate
>      rule, and having make -j4 invoke a new instance of cheetah compile for
>      each template.
>
>      Is there any interest in incorporating this patch in a future upstream
>      Cheetah release?


--
-R. Tyler Ballance
Slide, Inc.



--
Bidegg worlds best auction site
http://bidegg.com
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4281 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Mar 16, 2009 6:35 am
Subject: Re: [Cheetahtemplate-discuss] [PATCH] Stop annoying "DeprecationWarning; the md5 ..." messages
tyler@...
Send Email Send Email
 
On Fri, Mar 13, 2009 at 11:06:57PM +0900, Satoru SATOH wrote:
> Hi,
>
> It seems the mail was blocked and not reached to the list.
> So I sent this again.
>
> Could you please someone take a look at it?
> The patch is also available from Red Hat Bugzilla #480945:
>
>   https://bugzilla.redhat.com/show_bug.cgi?id=480945
>  (patch itself:  https://bugzilla.redhat.com/attachment.cgi?id=330020)

The patch looks fine and works correctly (i.e. tests are passing) on
both Python 2.6 and Python 2.5.1.

I've applied this patch to the "next" branch of my Git repository
(http://github.com/rtyler/cheetah/tree/next) and I will be including it
in the Cheetah CE 2.1.0 release I'm tidying up right now.

Cheers

> 2009/1/27 Satoru SATOH <satoru.satoh@...>:
> > Hi,
> >
> > I found Cheetah/CacheRegion.py uses old md5 module deprecated in
> > recent python versions (> 2.5?).
> > Thus, "DeprecationWarning: the md5 module is deprecated; use hashlib
> > instead" messages are out.
> >
> > Here is an example log of cobbler which uses Cheetah internally.
> >
> > root@localhost site-packages]# cobbler sync
> > /usr/lib/python2.6/site-packages/Cheetah/CacheRegion.py:30:
> > DeprecationWarning: the md5 module is deprecated; use hashlib instead
> > ?import md5
> > /usr/lib/python2.6/site-packages/Cheetah/CacheRegion.py:30:
> > DeprecationWarning: the md5 module is deprecated; use hashlib instead
> > ?import md5
> > (snip)
> >
> > ?OS: Fedora rawhide
> > ?Python: python-2.6-4.fc11.i386
> > Cheetah: python-cheetah-2.0.1-4.fc11.i386 (I confirmed same issue
> > remains in cvs HEAD also.)
> >
> >
> > I attached an experimental patch fixing this issue.
> >
> > I guess it works for older python versions but not tested.
> > I confirmed it works for me at least.
> >
> > Thanks,
> > Satoru SATOH
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Cheetahtemplate-discuss mailing list
> Cheetahtemplate-discuss@...
> https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4282 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Mar 16, 2009 7:08 am
Subject: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
tyler@...
Send Email Send Email
 
I've had a fork of the Cheetah CVS for some time, but this weekend I got
fed up with a number of outstanding patches not being released into the
mainline release of Cheetah, so I went ahead and forked it :)

Anyways, I give you "Cheetah Community Edition" v2.1.0, it has the
following changes incorporated:
   - Quiet DeprecationWarnings being printed to stderr when using Cheetah on
Python 2.6 and up. Patch suggested by Satoru SATOH <satoru.satoh@...>
   - Apply patch to support parallel compilation of templates courtesy of Evan
Klitzke <evan@...>
   - Corrected issue when __getattr__ calls on searchList objects raise
exceptions (tyler@...)
   - make autocalling in valueForName correctly ignore newstyle classes and
instances
     that are callable, as it does for oldstyle classes and instances.  Patch
from lucas@...
   - made it possible to chain multiple decorators to a method #def [TR with
     patch from Graham Dennis]
   - fixed a bug in _eatMultiLineDef that Graham Dennis reported. [TR]
   - fixed 'module.__init__() argument 1 must be string, not unicode' bug in
     Template.py reported by Erwin Ambrosch [TR]


This is the first real "release" of Cheetah since Nov 2007. I don't
intend to do a fork of Cheetah, I merely intend on picking up where
Tavis left off (where is that guy?).

I've gone ahead and setup a little GitHub page (playing with github
features) here: http://rtyler.github.com/cheetah/

A twitter account (why not?): http://twitter.com/cheetahtemplate

You can find the project in my GitHub repository here:
http://github.com/rtyler/cheetah/tree/master and the v2.1.0 released
code is tagged under the "v2.1.0" tag if you want a pristine checkout ov
v2.1.0.


I welcome further patches, I'd like to keep the Cheetah community alive
because it's such a solid templating system that has served us well over
the years. I'm not entirely certain what to do with the "mainline"
version of Cheetah on SourceForge just yet, I don't want to fracture
what is left of the Cheetah community, but I can't stand by and let the
Cheetah project die.

Feel free to ping me on or off list with any
questions/patches/limericks.

Cheers
--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4283 From: Mike Bonnet <mikeb@...>
Date: Mon Mar 16, 2009 2:55 pm
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
mikeb@...
Send Email Send Email
 
R. Tyler Ballance wrote:
> I've had a fork of the Cheetah CVS for some time, but this weekend I got
> fed up with a number of outstanding patches not being released into the
> mainline release of Cheetah, so I went ahead and forked it :)
>
> Anyways, I give you "Cheetah Community Edition" v2.1.0, it has the
> following changes incorporated:
>   - Quiet DeprecationWarnings being printed to stderr when using Cheetah on
Python 2.6 and up. Patch suggested by Satoru SATOH <satoru.satoh@...>
>   - Apply patch to support parallel compilation of templates courtesy of Evan
Klitzke <evan@...>
>   - Corrected issue when __getattr__ calls on searchList objects raise
exceptions (tyler@...)
>   - make autocalling in valueForName correctly ignore newstyle classes and
instances
>     that are callable, as it does for oldstyle classes and instances.  Patch
from lucas@...
>   - made it possible to chain multiple decorators to a method #def [TR with
>     patch from Graham Dennis]
>   - fixed a bug in _eatMultiLineDef that Graham Dennis reported. [TR]
>   - fixed 'module.__init__() argument 1 must be string, not unicode' bug in
>     Template.py reported by Erwin Ambrosch [TR]
>
>
> This is the first real "release" of Cheetah since Nov 2007. I don't
> intend to do a fork of Cheetah, I merely intend on picking up where
> Tavis left off (where is that guy?).
>
> I've gone ahead and setup a little GitHub page (playing with github
> features) here: http://rtyler.github.com/cheetah/
>
> A twitter account (why not?): http://twitter.com/cheetahtemplate
>
> You can find the project in my GitHub repository here:
> http://github.com/rtyler/cheetah/tree/master and the v2.1.0 released
> code is tagged under the "v2.1.0" tag if you want a pristine checkout ov
> v2.1.0.
>
>
> I welcome further patches, I'd like to keep the Cheetah community alive
> because it's such a solid templating system that has served us well over
> the years. I'm not entirely certain what to do with the "mainline"
> version of Cheetah on SourceForge just yet, I don't want to fracture
> what is left of the Cheetah community, but I can't stand by and let the
> Cheetah project die.
>
> Feel free to ping me on or off list with any
> questions/patches/limericks.

Have you tried contacting Tavis directly, perhaps requesting commit
access to CVS?  I'd hate to see the project get unnecessarily forked.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4284 From: "R. Tyler Ballance" <tyler@...>
Date: Mon Mar 16, 2009 3:09 pm
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
tyler@...
Send Email Send Email
 
On Mon, Mar 16, 2009 at 10:55:03AM -0400, Mike Bonnet wrote:
> R. Tyler Ballance wrote:
>> I've had a fork of the Cheetah CVS for some time, but this weekend I got
>> fed up with a number of outstanding patches not being released into the
>> mainline release of Cheetah, so I went ahead and forked it :)
>
> Have you tried contacting Tavis directly, perhaps requesting commit
> access to CVS?  I'd hate to see the project get unnecessarily forked.
>

No I've not emailed Tavis directly, I've not actually seen much trace of
him online or in the developer community since early 2008
(damnsimple.com still shows a lovely Apache 1.3 install page).

If he comes back around and permits me access, I'll certainly merge my
changes back into the mainline tree, but I'd likely continue working in
GitHub (CVS rots your brane, not even FreeBSD uses it for active
development anymore ;)).

I don't view forking as a bad thing either, I don't intend to create the
"Puma Template Engine" or some other large cat, I only intend on pushing
the project along to keep up to date with all the community
contributions I've seen over the past year or so (let along 2 years
since the last formal release).


Open source is supposed to be about the bazaar model of development, and
I figure at the very least a Community release of Cheetah will be able
to take advantage of that :)


I understand your concern, my plans are in the vein of improvement and
not fragmentation.


Cheers
--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4285 From: Michael DeHaan <mdehaan@...>
Date: Tue Mar 17, 2009 7:56 pm
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
mdehaan@...
Send Email Send Email
 
R. Tyler Ballance wrote:
> On Mon, Mar 16, 2009 at 10:55:03AM -0400, Mike Bonnet wrote:
>
>> R. Tyler Ballance wrote:
>>
>>> I've had a fork of the Cheetah CVS for some time, but this weekend I got
>>> fed up with a number of outstanding patches not being released into the
>>> mainline release of Cheetah, so I went ahead and forked it :)
>>>
>> Have you tried contacting Tavis directly, perhaps requesting commit
>> access to CVS?  I'd hate to see the project get unnecessarily forked.
>>
>>
>
> No I've not emailed Tavis directly, I've not actually seen much trace of
> him online or in the developer community since early 2008
> (damnsimple.com still shows a lovely Apache 1.3 install page).
>
> If he comes back around and permits me access, I'll certainly merge my
> changes back into the mainline tree, but I'd likely continue working in
> GitHub (CVS rots your brane, not even FreeBSD uses it for active
> development anymore ;)).
>
> I don't view forking as a bad thing either, I don't intend to create the
> "Puma Template Engine" or some other large cat, I only intend on pushing
> the project along to keep up to date with all the community
> contributions I've seen over the past year or so (let along 2 years
> since the last formal release).
>
>
> Open source is supposed to be about the bazaar model of development, and
> I figure at the very least a Community release of Cheetah will be able
> to take advantage of that :)
>
>
> I understand your concern, my plans are in the vein of improvement and
> not fragmentation.
>

Ditto what Mike said.   I've added him to this email to save time.

Tavis's last post to the list was 11/08, in general, going missing for
that time without a post to the list is not a good thing, and I would
like to see Cheetah moving forward.    Hope everything is ok.

(Not sure if the Python 2.6 deprecation warnings got corrected yet --
but that's one example of us needing something -- so we can't simply
just stop taking updates).

If a fork means bugfixes, great, but let's also make sure things remain
backwards compatibile and we have a good answer to list and domain
ownership -- where the community needs to migrate if needed -- once we
figure out the situation.

--Michael




------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4286 From: mobiledreamers@...
Date: Tue Mar 17, 2009 8:27 pm
Subject: [Cheetahtemplate-discuss] cheetah fill doesnt pick modules from PYTHONPATH
mobiledreamers@...
Send Email Send Email
 
 why does cheetah not pick up python modules from the pythonpath

 cheetah fill widgets_common.html
Filling widgets_common.html -> widgets_common.html.html
Traceback (most recent call last):
  File "/usr/bin/cheetah", line 3, in <module>
    CheetahWrapper().main()
  File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/CheetahWrapper.py", line 183, in main
    meth()
  File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/CheetahWrapper.py", line 245, in fill
    self._compileOrFill()
  File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/CheetahWrapper.py", line 347, in _compileOrFill
    self._compileOrFillBundle(b)
  File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/CheetahWrapper.py", line 567, in _compileOrFillBundle
    tclass = TemplateClass.compile(file=src, compilerSettings=compilerSettings)
  File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py", line 768, in compile
    exec co in mod.__dict__
  File "widgets_common_html.py", line 23, in <module>
  File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/ImportManager.py", line 461, in importHook
    raise ImportError, "No module named %s" % fqname
ImportError: No module named facebookstuff


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4287 From: "R. Tyler Ballance" <tyler@...>
Date: Tue Mar 17, 2009 9:50 pm
Subject: Re: [Cheetahtemplate-discuss] RecursiveNull class is not comparable
tyler@...
Send Email Send Email
 
On Mon, Feb 16, 2009 at 06:00:10PM +0100, Peter Warasin wrote:
> Hi list
>
> I use the RecursiveNull class in order to fill variables with '' when
> they are not in the search list.
>
> An expression of the following form however always will be False:
>
> #if $INEXISTENVAR != 'on'
> Not on
> #end if
>
> $INEXISTENTVAR in this expression is RecursiveNull, which should return
> '', but it does not compare to 'on', since RecursiveNull has no __eq__()
>  method.
>
> A patch is attached to this mail, which solves the problem for me.
> I don't know if there is maybe a better solution for this problem,
> without patching the code.. (?)


This patch was brought to my attention, and I'm a bit curious as to the
usecase since RecursiveNull is not used anywhere in the Cheetah
codebase, can you provide more context perhaps?

Consider this patch instead however:

		 diff --git a/src/Tools/RecursiveNull.py b/src/Tools/RecursiveNull.py
		 index 4897d80..a1bae65 100644
		 --- a/src/Tools/RecursiveNull.py
		 +++ b/src/Tools/RecursiveNull.py
		 @@ -20,4 +20,11 @@ class RecursiveNull:
					    return ''
			    def __nonzero__(self):
					    return 0
		 +      def __eq__(self, x):
		 +              if x:
		 +                  return False
		 +              return True
		 +      def __ne__(self, x):
		 +              return x and True or False


This behavior is now exhibited by RecursiveNull in your case:

		 >>> from src.Tools.RecursiveNull import RecursiveNull
		 >>> rn = RecursiveNull()
		 >>> rn == 'on'
		 False
		 >>> rn == False
		 True
		 >>> rn == None
		 True
		 >>> rn != 'on'
		 True
		 >>>


At least from my read on the history of this module, this seems like the
right thing to do with it.


If this is the appropriate patch, I will go ahead and commit it to the
GitHub repository (https://github.com/rtyler/cheetah/tree) and lump it
in with the next Cheetah Community Edition release

Thoughts?

>
> Index: Cheetah-2.0/src/Tools/RecursiveNull.py
> ===================================================================
> --- Cheetah-2.0.orig/src/Tools/RecursiveNull.py 2009-02-16 16:51:45.000000000
+0100
> +++ Cheetah-2.0/src/Tools/RecursiveNull.py 2009-02-16 16:51:59.000000000 +0100
> @@ -20,4 +20,6 @@
>                return ''
>        def __nonzero__(self):
>                return 0
> +      def __eq__(self, x):
> +              return x == ''
>

--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4288 From: "R. Tyler Ballance" <tyler@...>
Date: Tue Mar 17, 2009 10:30 pm
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
tyler@...
Send Email Send Email
 
On Tue, Mar 17, 2009 at 03:56:12PM -0400, Michael DeHaan wrote:
>> I understand your concern, my plans are in the vein of improvement and
>> not fragmentation.
>>
>
> Ditto what Mike said.   I've added him to this email to save time.

I actually forwarded it along as well, so I'm certain Tavis has gotten
it (but maybe not read it).

> Tavis's last post to the list was 11/08, in general, going missing for
> that time without a post to the list is not a good thing, and I would
> like to see Cheetah moving forward.    Hope everything is ok.
>
> (Not sure if the Python 2.6 deprecation warnings got corrected yet --
> but that's one example of us needing something -- so we can't simply
> just stop taking updates).
>
> If a fork means bugfixes, great, but let's also make sure things remain
> backwards compatibile and we have a good answer to list and domain
> ownership -- where the community needs to migrate if needed -- once we
> figure out the situation.

I agree wholeheartedly, at Slide and I know a number of other companies
Cheetah is an intergral part of our code base (we're a web company!) so
it's important to us as well as I'm sure it is important to you all to
see bug fixes and optimizations make their way back into the tree at
regular intervals.

I don't intend on anything ever *not* being backwards comptible, but the
approach I have been taking is treating Cheetah CE as what Cheetah
development would look like in the main tree if we had access to the
main tree (that and the Git thing..).

It might be worth thinking about how long we should wait before pinging
SourceForge support about the mailing list and domain thing, I wish you
could assign ownership to like a Cheetah Foundation or something :-P

Hope Tavis is okay and just hasn't read his email though :/


Cheers
--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4289 From: Michael DeHaan <mdehaan@...>
Date: Tue Mar 17, 2009 10:38 pm
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
mdehaan@...
Send Email Send Email
 
R. Tyler Ballance wrote:
> On Tue, Mar 17, 2009 at 03:56:12PM -0400, Michael DeHaan wrote:
>
>>> I understand your concern, my plans are in the vein of improvement and
>>> not fragmentation.
>>>
>>>
>> Ditto what Mike said.   I've added him to this email to save time.
>>
>
> I actually forwarded it along as well, so I'm certain Tavis has gotten
> it (but maybe not read it).
>
>
>> Tavis's last post to the list was 11/08, in general, going missing for
>> that time without a post to the list is not a good thing, and I would
>> like to see Cheetah moving forward.    Hope everything is ok.
>>
>> (Not sure if the Python 2.6 deprecation warnings got corrected yet --
>> but that's one example of us needing something -- so we can't simply
>> just stop taking updates).
>>
>> If a fork means bugfixes, great, but let's also make sure things remain
>> backwards compatibile and we have a good answer to list and domain
>> ownership -- where the community needs to migrate if needed -- once we
>> figure out the situation.
>>
>
> I agree wholeheartedly, at Slide and I know a number of other companies
> Cheetah is an intergral part of our code base (we're a web company!) so
> it's important to us as well as I'm sure it is important to you all to
> see bug fixes and optimizations make their way back into the tree at
> regular intervals.
>
> I don't intend on anything ever *not* being backwards comptible, but the
> approach I have been taking is treating Cheetah CE as what Cheetah
> development would look like in the main tree if we had access to the
> main tree (that and the Git thing..).
>
> It might be worth thinking about how long we should wait before pinging
> SourceForge support about the mailing list and domain thing, I wish you
> could assign ownership to like a Cheetah Foundation or something :-P
>

I know this isn't about Fedora (it's about upstream) but we have a
policy about this that seems to work

https://fedoraproject.org/wiki/MikeKnox/AWOL_Maintainers

Given that, if we don't see an answer, I think we should move forward.

You've shown initiative in merging patches and such, so I don't see why
we can't say your
github is authoritative.   Lots of us are dependent on Cheetah, as you
said, so if the interest
is in fixing bugs and keeping it stable, great.   Most importantly,
you've provided a lot of patches.

The web site is most likely not hosted on sourceforge (right?) so we'd
probably want to set up another or just mention
it on the github Wiki.

Setting up a few extra committers might be nice just to head off a
future problem, though hopefully it
wouldn't come to that.

Yes/no?

--Michael

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4290 From: "R. Tyler Ballance" <tyler@...>
Date: Tue Mar 17, 2009 10:51 pm
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
tyler@...
Send Email Send Email
 
On Tue, Mar 17, 2009 at 06:38:31PM -0400, Michael DeHaan wrote:
> R. Tyler Ballance wrote:
> I know this isn't about Fedora (it's about upstream) but we have a
> policy about this that seems to work
>
> https://fedoraproject.org/wiki/MikeKnox/AWOL_Maintainers

Interesting, I think that's a good sign of maturity when an OSS project
accounts for these kinds of things. Good work Fedora :)

> Given that, if we don't see an answer, I think we should move forward.
>
> You've shown initiative in merging patches and such, so I don't see why
> we can't say your
> github is authoritative.   Lots of us are dependent on Cheetah, as you
> said, so if the interest
> is in fixing bugs and keeping it stable, great.   Most importantly,
> you've provided a lot of patches.

In my "defense" I've not provided a lot of patches (IMHO), I've incorporated a
lot of patches and tested them. I encourage anybody that has patches, to
include the appropriate test cases in src/Tests, bugs in templating
engines can be subtle in cause, but very damaging and frustrating in
effect.

> The web site is most likely not hosted on sourceforge (right?) so we'd
> probably want to set up another or just mention
> it on the github Wiki.

The website is all hosted on SourceForge as far as I can tell, if you
look in www/ you'll notice the upload.sh performs an scp(1) to
SourceForge of the generated HTML.

The DNS entries are all likely tied to Tavis' registrar account.

> Setting up a few extra committers might be nice just to head off a
> future problem, though hopefully it
> wouldn't come to that.

The one nice thing about GitHub in this case is that the Cheetah CE
repository is public and anybody can fork (it's encouraged!) off of it
in order to create patches. GitHub provides a nice interface for
upstream project maintainers to properly incorporate downstream patches
from individuals (http://github.com/blog/270-the-fork-queue)

That said, I do think it's helpful to post patches to the mailing list
for general code review and discuss, but also so everybody is aprised on
the specifics of bugs and their fixes as the project moves forward.

Cheers
--
-R. Tyler Ballance
Slide, Inc.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

#4291 From: Michael DeHaan <mdehaan@...>
Date: Wed Mar 18, 2009 4:12 am
Subject: Re: [Cheetahtemplate-discuss] [ANNOUNCE] Cheetah Community Edition v2.1.0
mdehaan@...
Send Email Send Email
 
>
> In my "defense" I've not provided a lot of patches (IMHO), I've incorporated a
> lot of patches and tested them. I encourage anybody that has patches, to
> include the appropriate test cases in src/Tests, bugs in templating
> engines can be subtle in cause, but very damaging and frustrating in
> effect.
>
>

That's most of what running a project consists of :)


>> The web site is most likely not hosted on sourceforge (right?) so we'd
>> probably want to set up another or just mention
>> it on the github Wiki.
>>
>
> The website is all hosted on SourceForge as far as I can tell, if you
> look in www/ you'll notice the upload.sh performs an scp(1) to
> SourceForge of the generated HTML.
>
> The DNS entries are all likely tied to Tavis' registrar account.
>
>
>> Setting up a few extra committers might be nice just to head off a
>> future problem, though hopefully it
>> wouldn't come to that.
>>
>
> The one nice thing about GitHub in this case is that the Cheetah CE
> repository is public and anybody can fork (it's encouraged!) off of it
> in order to create patches. GitHub provides a nice interface for
> upstream project maintainers to properly incorporate downstream patches
> from individuals (http://github.com/blog/270-the-fork-queue)
>
> That said, I do think it's helpful to post patches to the mailing list
> for general code review and discuss, but also so everybody is aprised on
> the specifics of bugs and their fixes as the project moves forward.
>

Github's calling that "forking" is a bit weird in terms of technology
(I'd call that a remote branch), but I do love git and
github does make it easy.

It still does help to have one official "upstream" tree.

So sourceforge does have a project takeover process if we need it?
> Cheers
>


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

Messages 4262 - 4291 of 5012   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help