Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stdlib/codecs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from _typeshed import ReadableBuffer
from abc import abstractmethod
from collections.abc import Callable, Generator, Iterable
from typing import Any, BinaryIO, ClassVar, Final, Literal, Protocol, TextIO, overload, type_check_only
from typing_extensions import Self, TypeAlias, disjoint_base
from typing_extensions import Self, TypeAlias, deprecated, disjoint_base

__all__ = [
"register",
Expand Down Expand Up @@ -191,6 +191,7 @@ def getincrementaldecoder(encoding: _BufferedEncoding) -> _BufferedIncrementalDe
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.")

def open(
filename: str, mode: str = "r", encoding: str | None = None, errors: str = "strict", buffering: int = -1
) -> StreamReaderWriter: ...
Expand Down