Conversation
anthrotype
reviewed
Jul 23, 2025
| from gftools.push.trafficjam import PushItems | ||
| from jinja2 import Environment, FileSystemLoader, select_autoescape | ||
| from pkg_resources import resource_filename | ||
| import importlib_resources |
Member
There was a problem hiding this comment.
you meant importlib.resources with a dot in the middle, the one from the standard library:
https://docs.python.org/3/library/importlib.resources.html
importlib_resources is the backport for older pythons, you probably don't need it if you stick to the minimum common denominator of the python versions that gftools supports:
Member
There was a problem hiding this comment.
if you really want to use the backport you should specify the dependency in the setup.py or pyproject.toml etc.
Collaborator
Author
There was a problem hiding this comment.
Thanks. I see importlib.resources has been around since py3.7 so I'll replace.
Collaborator
Author
|
Right, off to install Py3.9 |
anthrotype
reviewed
Jul 23, 2025
anthrotype
reviewed
Jul 23, 2025
anthrotype
reviewed
Jul 23, 2025
anthrotype
approved these changes
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pkg_resources has been removed in python 3.12+.
Maybe I'm getting old but I hate this type of change. There's obviously a good reason for it but I'm just tired.
The migration guide was super handy, https://importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-filename