]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
add 'linetable' to the preserved CodeType attributes (#1334)
authorThomas Moschny <thomas.moschny@gmx.de>
Tue, 19 Jan 2021 20:01:18 +0000 (21:01 +0100)
committerGitHub <noreply@github.com>
Tue, 19 Jan 2021 20:01:18 +0000 (12:01 -0800)
add 'linetable' to the preserved CodeType attributes

co_linetable replaces co_lnotab as part of PEP 626 in Python 3.10.

src/jinja2/debug.py

index 5cac28baaea3589ee94af0b99b96b28056abdf6c..fac5719985cd8cb6b9c3b22bc6e07c4c783d3135 100644 (file)
@@ -130,6 +130,7 @@ def fake_traceback(exc_value, tb, filename, lineno):
             "lnotab",
             "freevars",
             "cellvars",
+            "linetable",  # Python 3.10
         ):
             if isinstance(attr, tuple):
                 # Replace with given value.