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

Remove use of importlib_resources once we hit a baseline of Python 3.9+ #706

Closed
robinwhittleton opened this issue Jun 9, 2024 · 6 comments

Comments

@robinwhittleton
Copy link
Member

As we now require Python 3.8+ we can replace importlib_resources with the built-in importlib.resources. I did this work, only to find that the suggested updates actually required functionality that was only added to importlib.resources in Python 3.9. Still, for posterity I’ve pushed the branch to https://github.com/standardebooks/tools/tree/remove_importlib_resources. When we change to require 3.9+ I can rebase the branch and submit a PR.

Out of interest I checked, and it looks like Ubuntu 20.04 LTS has a default of Python 3.8, 22.04 LTS uses Python 3.10, and 24.04 LTS uses Python 3.12.

@acabal
Copy link
Member

acabal commented Jun 9, 2024

We're sticking to 22.04 until EOL so it's going to be a long time until this can be merged in :)

@robinwhittleton
Copy link
Member Author

22.04 uses 3.10 though? https://packages.ubuntu.com/jammy/python3 . In which case maybe we should bump the minimum version in setup?

@acabal
Copy link
Member

acabal commented Jun 9, 2024

Ah I suppose it does. Well if you want to check if all the dependencies work on 3.9 you can give it a shot.

@robinwhittleton
Copy link
Member Author

I’d hope they all work, given that I’m not having any problems with more recent Pythons. But for completeness’ sake, I double-checked each dependency on Pypi and they all look fine for this: the highest requirement was 3.8+ and none of them defined an upper limit. Anyway, up to you of course, I know that bumping stuff in setup has caused you a bunch of hassle over the years.

I did find one slightly worrying thing on Pypi: the version of requests that we depend on has been yanked for security reasons. We should probably update that to the latest patch version.

@acabal
Copy link
Member

acabal commented Jun 10, 2024

OK, can you do a PR then?

@robinwhittleton
Copy link
Member Author

Fixed in #707.

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

No branches or pull requests

2 participants