Skip to content

Conversation

@max-muoto
Copy link
Contributor

@max-muoto max-muoto commented Dec 25, 2025

With #14289 going stale I'm splitting up some of the deprecations from this PR. This PR deprecates codes.open which was deprecated in 3.14. Since the replacement exists in all versions, it's being deprecated universally.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

def getincrementaldecoder(encoding: str) -> _IncrementalDecoder: ...
def getreader(encoding: str) -> _StreamReader: ...
def getwriter(encoding: str) -> _StreamWriter: ...
@deprecated("codecs.open() is deprecated. Use open() instead.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you, but let's use more unify message, like this:

Suggested change
@deprecated("codecs.open() is deprecated. Use open() instead.")
@deprecated("Deprecated since Python 3.14. Use `open()` instead.")

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