Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disuse deprecated pkg_resources module #26

Merged
merged 4 commits into from
Nov 11, 2023

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented Nov 9, 2023

I set out to remove the usage of pkg_resources which is now deprecated in favor of importlib (see here).

Lektor-tags uses pkg_resources to find where it default Jinja template is installed. This led me to discover that, as things are currently, the default template is not installed at all (at least when lektor-tags is installed from a wheel)! (See #5).

So this PR first fixes #5, then removes the usage of pkg_resources in favor of importlib.resources.

Fixes #5

This is to support distributing our default template as package data.
(See ticket lektor#5.)
Switch from using `pkg_resources` to `importlib.resources` for
accessing package data.
The `tag.html` template (which is identical in content to
`lektor_tags_default_template.html`) appears to be unused.
@yagebu yagebu merged commit 39665b8 into lektor:master Nov 11, 2023
4 checks passed
@dairiki dairiki deleted the fix.5-default-template branch November 12, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default template cannot be found
2 participants