Skip to content

Remove all deprecated usages of codecs.open#698

Merged
nicholasserra merged 1 commit intotrentm:masterfrom
Crozzers:remove-deprecated-codecsopen
Apr 27, 2026
Merged

Remove all deprecated usages of codecs.open#698
nicholasserra merged 1 commit intotrentm:masterfrom
Crozzers:remove-deprecated-codecsopen

Conversation

@Crozzers
Copy link
Copy Markdown
Contributor

codecs.open was deprecated in Python 3.14 as it's been superseded by the builtin open.

This PR removes all usages of codecs.open, replacing them with the normal way of opening files in Python. Along with this, I fixed a bunch of warnings related to un-closed files, as there were alot of usages of open(...).read() in the test suite.

I also added a makefile rule that runs make testone but with Python warnings enabled. This should make it easier for devs to spot these kinds of small issues in the future.

@nicholasserra
Copy link
Copy Markdown
Collaborator

LGTM thank you!

@nicholasserra nicholasserra merged commit 8ec7a71 into trentm:master Apr 27, 2026
15 checks passed
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