aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Support Python 3's keyword-only arguments.Eevee (Alex Munroe)2014-02-113-3/+34
| | | | | | | | Previously, they would parse correctly in Python 3, but any keyword-only arguments would be quietly lost, and the user would either get `TypeError: foo() got an unexpected keyword argument...` or the confusing behavior of having the keyword argument overwritten with whatever's in the context with the same name.
* - remove creation of blank "x" fileMike Bayer2013-12-261-4/+16
|
* - changelog for [ticket:225]Mike Bayer2013-12-241-1/+1
|
* Improved handling of translator comments in Babel pluginNed Batchelder2013-12-242-1/+13
| | | | | | | | | | There's no reason an intervening node should clear the translator comments. There's already logic that discards the comments if they occurred too far away from the harvested string. This way we can write more natural templates and still have the translator comments that provide the best translated text. http://www.makotemplates.org/trac/ticket/225
* - changelogMike Bayer2013-10-081-4/+3
| | | | - fix test to work under py3.2
* Merge pull request #5 from vmagamedov/mastermike bayer2013-10-081-0/+8
|\ | | | | Fixed TGPlugin.render method to support unicode template names in py2k.
| * Fixed TGPlugin.render method to support unicode template names in py2k.Vladimir Magamedov2013-09-171-0/+8
| |
* | - [bug] Fixed issue where an old lexer rule prevented a template lineMike Bayer2013-10-011-0/+6
|/ | | | which looked like "#*" from being correctly parsed. [ticket:224]
* Fix docstrings to use "UTF-8" instead of "utf8"Martin Geisler2013-08-281-2/+2
| | | | | | | | | | | The UTF-8 FAQ says this is the correct name for the encoding. http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 The official name and spelling of this encoding is UTF-8, where UTF stands for UCS Transformation Format. Please do not write UTF-8 in any documentation text in other ways (such as utf8 or UTF_8), unless of course you refer to a variable name and not the encoding itself.
* Use Emacs compatible coding systemMartin Geisler2013-08-283-3/+3
| | | | | | | | | | | | Emacs doesn't recognize "utf8" as a valid coding system. The correct name is "utf-8". This is in line with the UTF-8 FAQ: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 The official name and spelling of this encoding is UTF-8, where UTF stands for UCS Transformation Format. Please do not write UTF-8 in any documentation text in other ways (such as utf8 or UTF_8), unless of course you refer to a variable name and not the encoding itself.
* Use "coding:" instead of "encoding:" to specify file encodingMartin Geisler2013-08-283-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using "-*- encoding:utf-8 -*-" doesn't really set the file encoding for Emacs. It will even prompt the user when opening a compiled file: The local variables list in foo.mak.py contains values that may not be safe (*). Do you want to apply it? You can type y -- to apply the local variables list. n -- to ignore the local variables list. ! -- to apply the local variables list, and permanently mark these values (*) as safe (in the future, they will be set automatically.) * encoding: utf-8 The problem is that Emacs looks for a file variable named "coding" and it doesn't know about "encoding": http://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html This is no doubt why Python recognizes "coding:" by itself: http://www.python.org/dev/peps/pep-0263/ This change makes the code generator output "# -*- coding:%s -*-" and updates the documentation and examples to match this style.
* - fix #190 for py2.4rel_0_9_0Mike Bayer2013-08-042-5/+9
| | | | - other 2.4 ism
* - [bug] The Context.locals_() method becomes a private underscoredMike Bayer2013-08-031-0/+21
| | | | | | | method, as this method has a specific internal use. The purpose of Context.kwargs has been clarified, in that it only delivers top level keyword arguments originally passed to template.render(). [ticket:219]
* - [bug] Fixed Py3K bug where a "lambda" expression was notMike Bayer2013-08-032-1/+2
| | | | interpreted correctly within a template tag. [ticket:190]
* - [bug] Using <%namespace import="*" module="somemodule"/> nowMike Bayer2013-08-031-2/+5
| | | | | | skips over module elements that are not explcitly callable, avoiding TypeError when trying to produce partials. [ticket:207]
* use repr hereMike Bayer2013-08-032-2/+4
|
* - changelogMike Bayer2013-08-031-0/+1
| | | | - guess this is 0.9.0
* - inline the loop here againMike Bayer2013-08-032-5/+6
| | | | - add more of a test
* Allow literal string argument that starts with a "#".Yap Sok Ann2013-06-252-2/+1
| | | | | | | | | | | | | | | | | | Without this change, when running setup.py extract_messages, we would get error: TokenError: ('EOF in multi-line statement', (2, 0)) Looking at the unit test, it seems like a literal string argument in the form of "_('xxx')" is supposed to be picked up by Babel. However, that contradicts with the documentation, which states: > When using tags, the values of the arguments are taken as literal strings by > default. To embed Python expressions as arguments, use the embedded > expression format So, as a side effect of this commit, the convenience of "_('xxx')" has been removed. Probably can add it back if necessary for backward compatibility.
* - [bug] Fixed regression where "entity" filter wasn'tMike Bayer2013-04-151-0/+7
| | | | | converted for py3k properly (added tests.) [ticket:214]
* - [bug] Cleaned up all the various deprecation/Mike Bayer2013-04-134-13/+14
| | | | | | file warnings when running the tests under various Pythons with warnings turned on. [ticket:213]
* - [bug] Fixed bug whereby an exception in Python 3Mike Bayer2013-02-201-1/+12
| | | | | | against a module compiled to the filesystem would fail trying to produce a RichTraceback due to the content being in bytes. [ticket:209]
* - get the pygments install to be easily switched on/offMike Bayer2012-11-122-15/+18
| | | | | - fix test_exceptions to always call non-pygments tests - update test for py3k transition
* - [feature] Added lexer_cls argument to Template,Mike Bayer2012-11-121-3/+33
| | | | | TemplateLookup, allows alternate Lexer classes to be used.
* fixMike Bayer2012-11-111-1/+1
|
* 2.4-3.3 pass in placeMike Bayer2012-11-117-132/+132
|
* py2.5 worksMike Bayer2012-11-115-25/+38
|
* all tests pass on py3k and py2.7. py2.5/2.4 nextMike Bayer2012-11-113-7/+12
|
* - first pass at running a py3k compatible base in py2k as well.Mike Bayer2012-11-1122-544/+549
| | | | | having some weird unicode issues I can't debug; the meaning of str.encode() seems to be changing globally somehow
* Finalized future_imports feature.Benjamin Trofatter2012-11-101-1/+1
| | | | | Changed keyword argument from futures to future_imports for clarity. Added docstring describing use.
* Added futures support to makoBenjamin Trofatter2012-11-091-0/+7
| | | | | | Provide a list of names to import from __future__ to Template or TemplateLookup, and it will render the import from __future__ statement at the top of the generated code so that it actually works.
* - [bug] Fixed bug in plugin loader to correctlyMike Bayer2012-09-161-2/+10
| | | | | raise exception when non-existent plugin is specified.
* - forgot to make the decorators decorateMike Bayer2012-09-051-3/+3
|
* - clean up test exclusionsMike Bayer2012-09-055-131/+146
|
* - add a skip for pypyMike Bayer2012-09-021-1/+2
|
* - [bug] Fixed the "filter" attribute of theMike Bayer2012-08-291-26/+40
| | | | | | <%text> tag so that it pulls locally specified identifiers from the context the same way as that of <%block> and <%filter>.
* - [bug] AST supporting now supports tuple-packedMike Bayer2012-08-031-0/+11
| | | | | function arguments inside pure-python def or lambda expressions. [ticket:201]
* - these don't need to be switched for py3krel_0_7_1Mike Bayer2012-07-071-37/+4
|
* - [bug] Fixed some long-broken scoping behaviorMike Bayer2012-07-071-0/+34
| | | | | | | involving variables declared in defs and such, which only became apparent when the strict_undefined flag was turned on. [ticket:192]
* - pep8 + modernizeMike Bayer2012-07-071-70/+116
|
* - [bug] Can now use strict_undefined at theMike Bayer2012-07-073-42/+120
| | | | | | same time args passed to def() are used by other elements of the <%def> tag. [ticket:191]
* pep8, use eq_, assert_raisesMike Bayer2012-07-071-95/+175
|
* - remove context manager to allow 2.5 and 2.4 to work, [ticket:188]Mike Bayer2012-04-133-67/+139
| | | | | - add conditionals to pygments-dependent tests that ensure pygments 1.4, separate check for no pygments.
* - add the final patch for #146Mike Bayer2012-04-061-0/+98
|
* - [feature] Control lines with no bodies willMike Bayer2012-04-031-1/+76
| | | | | | now succeed, as "pass" is added for these when no statements are otherwise present. Courtesy Ben Trofatter [ticket:146]
* - UNDEFINED is a reserved word too, fix docs, add testsrel_0_7_0Mike Bayer2012-03-301-1/+32
|
* fix two py3k failuresMike Bayer2012-03-302-2/+2
|
* remove this test per ben's requestMike Bayer2012-03-301-14/+0
|
* - merge the mako-loop branch, bump to 0.7Mike Bayer2012-03-292-4/+299
|\
| * - add a path to disable the loop feature - enable_loop=FalseMike Bayer2012-03-291-0/+94
| | | | | | | | | | - fix up links, formatting in docs - remove some repetition in the _compile logic