Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust deprecation dates #531

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion mcstatus/motd/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def _handle_formatting(self, element: Formatting, /) -> str:


class AnsiTransformer(PlainTransformer):

FORMATTING_TO_ANSI_TAGS = {
Formatting.BOLD: "1",
Formatting.STRIKETHROUGH: "9",
Expand Down
2 changes: 1 addition & 1 deletion mcstatus/pinger.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ async def test_ping(self) -> float:
return (received - sent) * 1000


# TODO Remove this deprecation after 2023-08
# TODO Remove this deprecation after 2023-12
PingResponse: TypeAlias = JavaStatusResponse
20 changes: 10 additions & 10 deletions mcstatus/status_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ def build(cls, raw: RawJavaResponse, latency: float = 0) -> Self:
)

@property
@deprecated(replacement="icon", date="2023-08")
@deprecated(replacement="icon", date="2023-12")
def favicon(self) -> str | None:
"""
.. deprecated:: 11.0.0
Will be removed 2023-08, use :attr:`icon <JavaStatusResponse.icon>` instead.
Will be removed 2023-12, use :attr:`icon <JavaStatusResponse.icon>` instead.
"""
return self.icon

Expand Down Expand Up @@ -192,29 +192,29 @@ def build(cls, decoded_data: list[Any], latency: float) -> Self:
)

@property
@deprecated(replacement="players.online", date="2023-08")
@deprecated(replacement="players.online", date="2023-12")
def players_online(self) -> int:
"""
.. deprecated:: 11.0.0
Will be removed 2023-08, use :attr:`players.online <BedrockStatusPlayers.online>` instead.
Will be removed 2023-12, use :attr:`players.online <BedrockStatusPlayers.online>` instead.
"""
return self.players.online

@property
@deprecated(replacement="players.max", date="2023-08")
@deprecated(replacement="players.max", date="2023-12")
def players_max(self) -> int:
"""
.. deprecated:: 11.0.0
Will be removed 2023-08, use :attr:`players.max <BedrockStatusPlayers.max>` instead.
Will be removed 2023-12, use :attr:`players.max <BedrockStatusPlayers.max>` instead.
"""
return self.players.max

@property
@deprecated(replacement="map_name", date="2023-08")
@deprecated(replacement="map_name", date="2023-12")
def map(self) -> str | None:
"""
.. deprecated:: 11.0.0
Will be removed 2023-08, use :attr:`.map_name` instead.
Will be removed 2023-12, use :attr:`.map_name` instead.
"""
return self.map_name

Expand Down Expand Up @@ -346,10 +346,10 @@ class BedrockStatusVersion(BaseStatusVersion):
"""``MCPE`` or ``MCEE`` for Education Edition."""

@property
@deprecated(replacement="name", date="2023-08")
@deprecated(replacement="name", date="2023-12")
def version(self) -> str:
"""
.. deprecated:: 11.0.0
Will be removed 2023-08, use :attr:`.name` instead.
Will be removed 2023-12, use :attr:`.name` instead.
"""
return self.name