Drop use of codecs.open() - #405
Merged
aaronliu0130 merged 2 commits intoNov 4, 2025
Merged
Conversation
aaronliu0130
requested changes
Nov 1, 2025
aaronliu0130
left a comment
Member
There was a problem hiding this comment.
I was planning to do this! Thank you.
codecs.open() has been deprecated as of Python 3.14, and plain open() supports all use-cases we have, switch to using it. [pre-commit.ci] auto fixes from pre-commit.com hooks: for more information, see https://pre-commit.ci Drop mode argument to open(): ruff complains about open(mode="r")
Since we now use plain open(), we can also use universal newlines and remove large sections of code that keep track of CR and CRLF.
aaronliu0130
force-pushed
the
do-not-use-codecs-open
branch
from
November 4, 2025 03:27
99e34e5 to
cd9c2af
Compare
aaronliu0130
approved these changes
Nov 4, 2025
13 tasks
geri1701
added a commit
to geri1701/nixpkgs
that referenced
this pull request
Jul 13, 2026
Backport upstream’s removal of deprecated codecs.open(), whose warnings cause the test suite to fail under Python 3.14. cpplint/cpplint#405 Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol)
geri1701
added a commit
to geri1701/nixpkgs
that referenced
this pull request
Jul 13, 2026
Backport upstream’s removal of deprecated codecs.open(), whose warnings cause the test suite to fail under Python 3.14. cpplint/cpplint#405 Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol)
DrymarchonShaun
pushed a commit
to DrymarchonShaun/nixpkgs
that referenced
this pull request
Jul 14, 2026
Backport upstream’s removal of deprecated codecs.open(), whose warnings cause the test suite to fail under Python 3.14. cpplint/cpplint#405 Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol)
twassman
pushed a commit
to twassman/nixpkgs
that referenced
this pull request
Jul 16, 2026
Backport upstream’s removal of deprecated codecs.open(), whose warnings cause the test suite to fail under Python 3.14. cpplint/cpplint#405 Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol)
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.
codecs.open() has been deprecated as of Python 3.14, and plain open() supports all use-cases we have, switch to using it.