pallets / jinja

A very fast and expressive template engine.
https://jinja.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
10.12k stars 1.6k forks source link

refactor `PackageLoader` to use `importlib.resources` #1978

Open davidism opened 2 months ago

davidism commented 2 months ago

I had to ignore a failing test when adding 3.13 to the test matrix #1977, as the zip importer no longer exposes a private _files list for PackageLoader.list_templates to use. Presumably I didn't use importlib.resources before because I had to support older Python versions? Either way, should be able to now. Consider the importlib_resources backport for 3.7 and 3.8 so we can use the files API in all versions.

danwuSBU commented 2 months ago

looking at this at PyCon sprint