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

Make importlib_resources optional #187

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

madig
Copy link
Contributor

@madig madig commented Nov 1, 2024

In the interest of reducing the number of dependencies, require importlib_resources only on Python < 3.10. I think tools like shed can automatically delete the if-else checks if the minimum Python version is lifted eventually. importlib.resources.files was added in Py 3.9 but testing it there raised some error I didn't feel like investigating, so I gated the dep on 3.10 instead.

Also added a tox config for easy testing. Did you know that you can install tox-uv alongside your tox and uv will automatically download Python versions you don't have? Makes testing across versions very easy. Also, did you know about tox p? Makes it time-efficient as well!

Side-note: testing on Py 3.8 and 3.9, where importlib_resources is used, takes 250 seconds on my machine, whereas with the newer versions it takes around 50 seconds. Make of that what you will.

@simoncozens simoncozens merged commit 6e0838b into googlefonts:main Nov 8, 2024
9 checks passed
@madig madig deleted the fix-importlib-dep branch November 8, 2024 22:33
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.

2 participants