pallets/jinja

refactor `PackageLoader` to use `importlib.resources`

davidism opened this issue · 1 comments

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.

looking at this at PyCon sprint