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

Add support for Python 3.13 #68

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Add support for Python 3.13 #68

merged 4 commits into from
Oct 31, 2024

Conversation

alexdewar
Copy link
Collaborator

This PR replaces the single use of the imghdr built-in package, which is no longer available in Python 3.13. This was the only barrier to using Python 3.13, so I've now updated the pyproject.toml and added it to the CI test matrix.

Closes #55.

@alexdewar
Copy link
Collaborator Author

Note: I opted to use the filetype package to check whether files are images or not, because it is lightweight and has no external dependencies. But if you want to do more sophisticated checking in future (e.g. to figure out whether input is XML vs HTML) then it might be worth substituting it for something like this instead.

@AdrianDAlessandro AdrianDAlessandro merged commit 81867b6 into main Oct 31, 2024
8 checks passed
@AdrianDAlessandro AdrianDAlessandro deleted the py313 branch October 31, 2024 15:54
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.

Replace use of built-in imghdr package
2 participants