From 3258507b4a9b2fdb9ff956f6fee8f941e030b851 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 24 Jan 2024 13:25:48 -0500 Subject: [PATCH 1/4] Call inner item callback and interaction_check by default --- discord/ui/dynamic.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/discord/ui/dynamic.py b/discord/ui/dynamic.py index f3dcbf58a..0b65e90f3 100644 --- a/discord/ui/dynamic.py +++ b/discord/ui/dynamic.py @@ -208,3 +208,9 @@ class DynamicItem(Generic[BaseT], Item['View']): from the ``match`` object. """ raise NotImplementedError + + async def callback(self, interaction: Interaction[ClientT]) -> Any: + return await self.item.callback(interaction) + + async def interaction_check(self, interaction: Interaction[ClientT], /) -> bool: + return await self.item.interaction_check(interaction) From 9859a3959b776bbe38f79bfcf5b06feb53cd8f69 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 26 Jan 2024 09:21:29 -0500 Subject: [PATCH 2/4] Pin documentation dependencies --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 1b0fbdcfe..fdbe37c81 100644 --- a/setup.py +++ b/setup.py @@ -37,9 +37,9 @@ extras_require = { 'docs': [ 'sphinx==4.4.0', 'sphinxcontrib_trio==1.1.2', - 'sphinxcontrib-websupport', + 'sphinxcontrib-websupport==1.2.6', 'typing-extensions>=4.3,<5', - 'sphinx-inline-tabs', + 'sphinx-inline-tabs==2023.4.21', ], 'speed': [ 'orjson>=3.5.4', From 0fadddf7d074a9cdfeda0f9279a4ba08c932ccb5 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 26 Jan 2024 09:23:33 -0500 Subject: [PATCH 3/4] Downgrade sphinxcontrib-websupport version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fdbe37c81..cdc503dd8 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ extras_require = { 'docs': [ 'sphinx==4.4.0', 'sphinxcontrib_trio==1.1.2', - 'sphinxcontrib-websupport==1.2.6', + 'sphinxcontrib-websupport==1.2.4', 'typing-extensions>=4.3,<5', 'sphinx-inline-tabs==2023.4.21', ], From 62a70c21b6c33fd9eec5ec44706e106a80a6d740 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 26 Jan 2024 10:21:34 -0500 Subject: [PATCH 4/4] Pin remaining documentation dependencies For some reason the Sphinx developers made breaking changes in minor versions --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index cdc503dd8..ff572400c 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,14 @@ extras_require = { 'docs': [ 'sphinx==4.4.0', 'sphinxcontrib_trio==1.1.2', + # TODO: bump these when migrating to a newer Sphinx version 'sphinxcontrib-websupport==1.2.4', + 'sphinxcontrib-applehelp==1.0.4', + 'sphinxcontrib-devhelp==1.0.2', + 'sphinxcontrib-htmlhelp==2.0.1', + 'sphinxcontrib-jsmath==1.0.1', + 'sphinxcontrib-qthelp==1.0.3', + 'sphinxcontrib-serializinghtml==1.1.5', 'typing-extensions>=4.3,<5', 'sphinx-inline-tabs==2023.4.21', ],