aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-09-14Move py-jinja to src foldermain-16kCole Faust
When soong packages python files into a zip file, it will take their path relative to the Android.bp file and preserve that relative path in the zip file. Then the root directory of the zip file is added to the PYTHONPATH. Currently, all subdirectories of the top level zip directory are also added to the PYTHONPATH, but we want to remove this. Since jinja was being added to the zip file under src/jinja2, "import jinja2" works currectly, but won't work after the PYTHONPATH changes (you'd have to say "import src.jinja2"). To fix this, move the Android.bp file for py-jinja into the src folder, so the relative paths don't contain src/. Soong python modules do have a pkg_path attribute, which essentially adds more folders to the relative path, but we would need an attribute that removes them, which doesn't exist. This could also be done with a filegroup with the "path" attribute, but bp2build doesn't support that, so I opted to go with this option instead. Bug: 245583294 Test: Presubmits Change-Id: I38247f1f7e0a21d2f4f91ff3fc3c04e02ad52954
2020-08-18Revert "Revert "Import external/python/jinja into master""IRIS YANG
This reverts commit 81aec74062b5c629b3408f7f3d18343ec0bbcab8. Reason for revert: It seems Jinja folder is empty. Revert the revert to add files back. Third-party review: ag/11821018 Change-Id: I4429a3b3448cdf2eb62ec388392a2a29fa3dbc21
2020-07-17Revert "Import external/python/jinja into master"IRIS YANG
This reverts commit e868444bb65b7ae2a025b1c8c7854a8c4f2f58c1. Reason for revert: Since build will failed. We might need to wait b/160731429 fixed and submit it again. Change-Id: I56449de779d11c13cdfe1243b9a9726f94e55b33
2020-06-22ignore trim_blocks using '+%}'Amy
2020-06-22imported templates can see the current globalsAmy
_get_default_module takes an optional context to indicate that the template is imported. If there are differences between the environment and rendered template globals, a new module is used for the imported template.
2020-06-15remove sandbox._MagicFormatMappingAmy
add test for escape formatter
2020-05-23update package and filesystem loader docsDavid Lord
2020-04-13Merge branch '2.11.x'David Lord
2020-04-13release version 2.11.2David Lord
2020-04-13native only evals at end of renderDavid Lord
Co-authored-by: Martin Krizek <mkrizek@redhat.com>
2020-04-13Fix unintended lstrip_blocks behavior. Fixes #1138Peter Dolak
Introduced in #858. Tests will follow, also results of performance testing.
2020-04-08Update oudated CutomLoader code example (#1185)Xinbin Huang
py3 for CustomLoader example
2020-04-08Merge tag '2.11.1' into 2.11.xDavid Lord
2020-03-30add changelog and cleanup for pep 451 supportDavid Lord
2020-03-30Use importlib machinery to fix PEP 451 import hooksAnthony Sottile
2020-03-30Merge branch '2.11.x'David Lord
2020-03-30namespace object works in async templatesBart Feenstra
2020-03-30Fix tokens line number calculation when whitespace stripping is usedAndrey Lisin
2020-03-30Merge branch '2.11.x'David Lord
2020-03-30Revert "PackageLoader doesn't depend on setuptools"David Lord
This reverts commit 4b6077a8c0a0f56bb8dbac37f8f9027130b4091c.
2020-03-30Revert "PackageLoader understands namespace packages"David Lord
This reverts commit d2e0e78afe7c6ae864a20c2cc29e80936cff47af.
2020-03-27AttributeError in undefined message doesn't cause RuntimeErrorDavid Lord
2020-02-28better PyObject_HEAD size calculationDavid Lord
fixes infinite loop on Python 3.6 32-bit
2020-02-27Merge branch '2.11.x'David Lord
2020-02-27use soft_str in do_wordcount, to trigger undefinedMatt Martz
2020-02-05add note about ugettextDavid Lord
2020-02-05bump bytecode cache versionDavid Lord
2020-02-05apply pyupgrade and f-stringsDavid Lord
2020-02-05remove more compat codeDavid Lord
2020-02-05remove _compat moduleDavid Lord
2020-02-05remove deprecated codeDavid Lord
2020-02-05remove Python 2 from docsDavid Lord
2020-02-05Merge branch '2.11.x'David Lord
2020-02-04Use stricter getattr() checks for decorator functionsTomas Krizek
Explicit checks for "is True" prevents unexpected behaviour with objects that are callable and have permissive gettatr(), such as Mock. Fixes #1145
2020-01-30release version 2.11.1David Lord
2020-01-30Merge branch '2.11.x'David Lord
2020-01-30Fix attribute access in async code. Fixes #1141Armin Ronacher
2020-01-27start version 3.0.0David Lord
2020-01-27release version 2.11.0David Lord
2020-01-26import Markup from markupsafe, fix flake8 import warningsDavid Lord
2020-01-26increment bytecode cache versionDavid Lord
2020-01-26Revert "rename directory to jinja"David Lord
This reverts commit eac9acb7aeabf6f3e0ed4cb876e200e5e72d0d0e.
2020-01-26Revert "rename imports to jinja"David Lord
This reverts commit 1167525b73863119f8bbec03ddb9d35eacff4bef.
2020-01-26Revert "add warning and alias for jinja2"David Lord
This reverts commit fc9c60ba457efc4cadf6fa2886567e0ee6ca1a99.
2020-01-10add warning and alias for jinja2David Lord
2020-01-10rename imports to jinjaDavid Lord
2020-01-10rename directory to jinjaDavid Lord
2020-01-10simplify module docstringsDavid Lord
2020-01-10remove old scripts and examplesDavid Lord
2020-01-10more relative importsDavid Lord
_identifier exports a compiled regex instead of a string to avoid some tricky cleanup