| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason people fixed the `print` call but not the import when https://github.com/sqlalchemy/mako/issues/234 was brought up.
I also mentioned in in https://github.com/sqlalchemy/mako/issues/369
Closes: #370
Pull-request: https://github.com/sqlalchemy/mako/pull/370
Pull-request-sha: 8560bfed22f11b7edb5d2ac2e5cfc6a7bd59b718
Change-Id: I236eef05f5b45420035c522287fa66eb3cb21a00
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue where unpacking nested tuples in a for loop using would raise a
"couldn't apply loop context" error if the loop context was used. The regex
used to match the for loop expression now allows the list of loop variables
to contain parenthesized sub-tuples. Pull request courtesy Matt Trescott.
For example:
~~~
for (key1, val1), (key2, val2) in itertools.pairwise(dict.items()):
...
~~~
This is really just "kicking the can down the road" so to speak, because
it doesn't allow an infinite number of layers of tuples, but
it helps somewhat.
Closes: #368
Pull-request: https://github.com/sqlalchemy/mako/pull/368
Pull-request-sha: 3f15a87266a36306826d460cddc7699dd62a9c43
Change-Id: I52915acb8904daf7071d8c92e1de352f200131ec
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue in lexer in the same category as that of :ticket:`366` where
the regexp used to match an end tag didn't correctly organize for matching
characters surrounded by whitespace, leading to high memory / interpreter
hang if a closing tag incorrectly had a large amount of unterminated space
in it. Credit to Sebastian Chnelik for locating the issue.
As Mako templates inherently render and directly invoke arbitrary Python
code from the template source, it is **never** appropriate to create
templates that contain untrusted input.
Fixes: #367
Change-Id: I2f3a8665e92c1b6efcf36b1dba6e58fe0975b7da
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue in lexer where the regexp used to match tags would not
correctly interpret quoted sections individually. While this parsing issue
still produced the same expected tag structure later on, the mis-handling
of quoted sections was also subject to a regexp crash if a tag had a large
number of quotes within its quoted sections.
Fixes: #366
Change-Id: I74e0d71ff7f419970711a7cd51adcf1bb90a44c0
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimized some codepaths within the lexer/Python code generation process,
improving performance for generation of templates prior to their being
cached. Pull request courtesy Takuto Ikuta.
This shows around 10% performance improvement in our use case (https://crbug.com/1214033#c32).
Closes: #361
Pull-request: https://github.com/sqlalchemy/mako/pull/361
Pull-request-sha: bcdee5ccf57100490aa0e48baeda6f15b584ab32
Change-Id: If647f77a52d5745019dcc46f82fd7a928f990757
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various fixes to the test suite in the area of exception message rendering
to accommodate for variability in Python versions as well as Pygments.
builds on 9b8da4b1e2bdc025b643f2061aa32 which also
reduced some of the checks for exception message formatting.
also updates black to 22.3.0 as there seem to be some dependency
issues with the older version
Fixes: #360
Change-Id: Ib8916534699e7c57817cf82d53300e50d47d0d50
|
|
|
|
|
|
|
|
|
|
| |
Fixes #260
Closes: #359
Pull-request: https://github.com/sqlalchemy/mako/pull/359
Pull-request-sha: 541f219237c47ab159a7bc36172044d503cd0c08
Change-Id: Icdaa09284cb9921b5753985ae600978763e0223f
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixes: #349
Change-Id: I202c252a913fb72cc328a6e7f0f33174802487d3
|
|
|
|
| |
Change-Id: Ic54c7e719dab661aa6181ef483cbde2cee6dd852
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes #352
Change-Id: I051ec20505464559e9399a8f1ac4a39dc323902a
|
|/
|
|
|
| |
Fixes #351
Change-Id: I7bd7d105871628f3c65433e46bbf3fe7b106386a
|
|
|
|
| |
Change-Id: I64c34efbfed69c3cc952218c3f27928a958ca859
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mako now performs exception chaining using ``raise from``, correctly
identifying underlying exception conditions when it raises its own
exceptions. Pull request courtesy Ram Rachum.
Additionally includes cleanup of the test suite to include
better exception fixtures.
Closes: #319
Pull-request: https://github.com/sqlalchemy/mako/pull/319
Pull-request-sha: d06526ac3f80ca9d24cd8143d8afde254f80b094
Additionally:
Fixes: #348
Change-Id: Ibb2864de822bf4b63adf22a6bb32cf0758d296bd
|
|
|
|
|
|
| |
can't reproduce locally, so just trying things
Change-Id: I43f52a216c8ea4ddca537f5f4f072bf6efec7f52
|
|
|
|
| |
Change-Id: I1ec7deeeadeeac3dacca58a9d4207c23551e5dd9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue where control statements on multi lines with a backslash would
not parse correctly if the template itself contained CR/LF pairs as on
Windows. Pull request courtesy Charles Pigott.
A missing '\\' meant that it would actually allow
```
% if foo \r
bar:
```
in a template file and not match if the file actually had a `\r` char
Closes: #346
Pull-request: https://github.com/sqlalchemy/mako/pull/346
Pull-request-sha: e79ebabe3df7e59c9ea40e62406131e1a0c6c3b4
Change-Id: I179bdd661cecb1ffb3cf262e31183c8e83d98f12
|
|
|
|
| |
Change-Id: Icdddf85b3ddf5d3e7172e318c9e75b3c9a857314
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Iafb96d53196ff74c98f2fbc7caf2eb8fbdc70029
|
|/
|
|
|
|
| |
forgot to do this in the earlier commit
Change-Id: I6cd29865edd761f6a047d9c4ac363280e24565d9
|
|
|
|
| |
Change-Id: If35e5fb2faedc5172a0b20710616fa0f7fbb4bab
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 2021 copyright
- remove unneeded compat functions
- remove unneeded filter constructs
- bytestring_passthrough mode doesn't actually do anything,
as Py3k StringIO doesn't accept bytes in any case, remove this
- should we call ourselves 2.0 and do semver ?
Change-Id: I8a8cb5e78037b758e58c87d5d7b4f66b6c211419
|
|/
|
|
| |
Change-Id: I27667b81e6577945bdb5d26a3e821c466d255019
|
|
|
|
|
|
|
|
|
|
|
| |
- remove python 2 support
- add github workflows
- remove disable unicode
- cleanup compat file
- modernize setup
- use pep517
Change-Id: Ic38dbf478046cec5d0815b468f0c235b4ea5e20c
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fixed some issues with running the test suite which would be revealed by
running tests in random order.
Fixes: #338
Change-Id: I90c2a86f9279a265f64b75be3a7af314ab8772ba
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed Python deprecation issues related to module importing, as well as
file access within the Lingua plugin, for deprecated APIs that began to
emit warnings under Python 3.10. Pull request courtesy Petr Viktorin.
This modernizes the code to avoid `DeprecationWarning` and `ResourceWarning` encountered in the test suite under Python 3.10a4:
- [load_module](https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module) is deprecated
- Some files weren't being closed
This changes the semantics of the `compat.load_module` function: on Python 3.5+, the module is no longer inserted in `sys.modules`. All non-test calls did `del sys.modules[self.module_id]` right after the call, anyway. On older Python, the module is inserted and then deleted.
(Some additional `DeprecationWarning` come from Setuptools: https://github.com/pypa/setuptools/pull/2517)
Closes: #328
Pull-request: https://github.com/sqlalchemy/mako/pull/328
Pull-request-sha: 87c1d09e5f39de7b19e749568c437928580f7553
Change-Id: I9cb3772f6812ef14297792344caf2f9aa5337adf
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The default template encoding is now utf-8. Previously, the encoding was
"ascii", which was standard throughout Python 2. This allows that
"magic encoding comment" for utf-8 templates is no longer required.
Fixes: #267
Change-Id: I411a75ebd6161e2517e06b5180a3571e5f5d923e
|
| |
|
| |
|