Skip to content

Drop use of codecs.open() - #405

Merged
aaronliu0130 merged 2 commits into
cpplint:developfrom
s-t-e-v-e-n-k:do-not-use-codecs-open
Nov 4, 2025
Merged

Drop use of codecs.open()#405
aaronliu0130 merged 2 commits into
cpplint:developfrom
s-t-e-v-e-n-k:do-not-use-codecs-open

Conversation

@s-t-e-v-e-n-k

Copy link
Copy Markdown
Contributor

codecs.open() has been deprecated as of Python 3.14, and plain open() supports all use-cases we have, switch to using it.

@aaronliu0130 aaronliu0130 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning to do this! Thank you.

Comment thread cpplint.py Outdated
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
aaronliu0130 force-pushed the do-not-use-codecs-open branch from 99e34e5 to cd9c2af Compare November 4, 2025 03:27
@aaronliu0130 aaronliu0130 added this to the 2.1.0 milestone Nov 4, 2025
@aaronliu0130
aaronliu0130 merged commit d15a871 into cpplint:develop Nov 4, 2025
10 checks passed
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)
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