From 28bd09b514301955529916a94fd2394a277fc752 Mon Sep 17 00:00:00 2001 From: Kevin Tindall Date: Wed, 3 May 2023 12:27:54 -0500 Subject: [PATCH 1/2] Adjust deprecation dates --- mcstatus/pinger.py | 2 +- mcstatus/status_response.py | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mcstatus/pinger.py b/mcstatus/pinger.py index 4ffec2be..55c003dd 100644 --- a/mcstatus/pinger.py +++ b/mcstatus/pinger.py @@ -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 diff --git a/mcstatus/status_response.py b/mcstatus/status_response.py index 45f4d335..b3920c1c 100644 --- a/mcstatus/status_response.py +++ b/mcstatus/status_response.py @@ -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 ` instead. + Will be removed 2023-12, use :attr:`icon ` instead. """ return self.icon @@ -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 ` instead. + Will be removed 2023-12, use :attr:`players.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 ` instead. + Will be removed 2023-12, use :attr:`players.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 @@ -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 From 3836c768c6550e83085659756a236fb5a8278fd5 Mon Sep 17 00:00:00 2001 From: Kevin Tindall Date: Wed, 3 May 2023 12:33:35 -0500 Subject: [PATCH 2/2] Run black formatter --- mcstatus/motd/transformers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mcstatus/motd/transformers.py b/mcstatus/motd/transformers.py index 9a6a1acf..31f005b3 100644 --- a/mcstatus/motd/transformers.py +++ b/mcstatus/motd/transformers.py @@ -180,7 +180,6 @@ def _handle_formatting(self, element: Formatting, /) -> str: class AnsiTransformer(PlainTransformer): - FORMATTING_TO_ANSI_TAGS = { Formatting.BOLD: "1", Formatting.STRIKETHROUGH: "9",