| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using URIs as entrered will make the stack trace arguably more readable than
using the module name which is the URI with non-word characters replaced by
underscores.
This change also fixes a mistake where a mods cache hit would not update
template_filename, causing a stale filename to be displayed if the stack
trace alternates between different templates. There now is a test case for
this.
Closes: #298
Pull-request: https://github.com/sqlalchemy/mako/pull/298
Pull-request-sha: ea35208d504932561711cdb574ec1f7def1e7060
Change-Id: Ieb606f6b6b7f4602d4d56694dd0bccf6dc287d20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improved the line-number tracking for source lines inside of Python ``<%
... %>`` blocks, such that text- and HTML-formatted exception traces such
as that of :func:`.html_error_template` now report the correct source line
inside the block, rather than the first line of the block itself.
Exceptions in ``<%! ... %>`` blocks which get raised while loading the
module are still not reported correctly, as these are handled before the
Mako code is generated. Pull request courtesy Martin von Gagern.
Closes: #297
Pull-request: https://github.com/sqlalchemy/mako/pull/297
Pull-request-sha: 60ad749604f8de0a9b8133430995045a93d0939c
Change-Id: I2086e4370e8e2db7099de01743840286f0160efc
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As this is an old module that keeps changing with new Python
releases, combined with the fact that we no longer use "import *",
remove all unused functions from this module so that the list
of imports we are maintaining is much shorter.
Python 3.8 is also added to tox.ini with more adjustments to
test_exceptions to accommodate for quoting differences.
Fixes: #296
Change-Id: I0cea7d21ecb2be9335e0845ae7fbd06d468a137b
|
|
|
|
| |
Change-Id: Ia047c7052a6d242c2cf1c7a83981f1e38ea4d928
|
|
|
|
|
|
|
|
|
|
| |
Added a default encoding of "utf-8" when the :class:`.RichTraceback`
object retrieves Python source lines from a Python traceback; as these
are bytes in Python 3 they need to be decoded so that they can be
formatted in the template.
Fixes: #293
Change-Id: I41a5c09422d6500c7cab2423ed14ac951a64e2f4
|
|
|
|
| |
Change-Id: Ibdfe5b2f2f3d1426921bcadf6740ae065ed0833b
|
|
|
|
|
|
| |
changes in pygments formatting; we might be losing
a bit of what was tested here originally but we still assert pygments
is taking place.
|
|
|
|
|
| |
- drop python 2.4, 2.5 support
- various pep8ing
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
against a module compiled to the filesystem would
fail trying to produce a RichTraceback due to the
content being in bytes. [ticket:209]
|
|
|
|
|
| |
- fix test_exceptions to always call non-pygments tests
- update test for py3k transition
|
| |
|
| |
|
|
|
|
|
| |
having some weird unicode issues I can't debug; the meaning of
str.encode() seems to be changing globally somehow
|
| |
|
|
|
|
|
| |
- add conditionals to pygments-dependent tests that ensure
pygments 1.4, separate check for no pygments.
|
| |
|
|
|
|
|
|
| |
Corrected the success conditions of test_utf8_html_error_template and
test_utf8_format_exceptions when testing in py2.x without pygments to
match the currently expected output.
|
|
|
|
|
|
|
| |
apply Pygments highlighting to the source
code displayed in the traceback, if Pygments
if available. Courtesy Ben Trofatter
[ticket:95]
|
| |
|
|
|
|
| |
is now escaped with the HTML filter. [ticket:142]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
i.e. in place of cgi.escape(). Faster
C-based implementation and also escapes
single quotes for additional security.
Supports the __html__ attribute for
the given expression as well.
When using "disable_unicode" mode,
a pure Python HTML escaper function
is used which also quotes single quotes.
Note that Pylons by default doesn't
use Mako's filter - check your
environment.py file.
|
| |
|
|
|
|
|
| |
exceptions.text_error_template which
is not Py3k compatible. [ticket:137]
|
|
|
|
|
|
|
|
|
| |
such that if no traceback is passed
and sys.exc_info() has been reset,
the formatter just returns blank
for the "traceback" portion.
[ticket:135]
- some long line cleanup
|
| |
|
|
|
|
|
|
| |
line contains no line number, as in when
inside an eval/exec-generated function.
[ticket:132]
|
| |
|
|
|
|
|
|
| |
text_error_template().render() now accept "error"
and "traceback" as optional arguments, and
these are now actually used. [ticket:122]
|
|
|
|
|
|
| |
- Python 3 support is added ! See README.py3k
for installation and testing notes.
[ticket:119]
|
|
|