diff options
| author | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-12-23 18:01:46 +0100 |
|---|---|---|
| committer | Adrian Herrmann <adrian.herrmann@qt.io> | 2024-01-06 16:56:20 +0100 |
| commit | 10a75de16b1d5e8f4acd1af121aaa56cbe4e65a4 (patch) | |
| tree | 68ee216011efe14bf730c63b3a99b5d88582b84e /sources/pyside6/PySide6/QtAsyncio | |
| parent | 6b0b3bdbd43e7c5384700292fc001f5af1c452b2 (diff) | |
QtAsyncio: Implement missing functions for policy
Add implementations in QAsyncioEventLoopPolicy for get_child_watcher()
and set_child_watcher(). Child watchers are deprecated since 3.12 so we
don't need to bother with their logic, we just don't want the linter
warning.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I5178e9f6e8d5915741ed3cb65b3432699cba86d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtAsyncio')
| -rw-r--r-- | sources/pyside6/PySide6/QtAsyncio/events.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/pyside6/PySide6/QtAsyncio/events.py b/sources/pyside6/PySide6/QtAsyncio/events.py index bec73f5bf..9549a2475 100644 --- a/sources/pyside6/PySide6/QtAsyncio/events.py +++ b/sources/pyside6/PySide6/QtAsyncio/events.py @@ -78,6 +78,12 @@ class QAsyncioEventLoopPolicy(asyncio.AbstractEventLoopPolicy): def new_event_loop(self) -> asyncio.AbstractEventLoop: return QAsyncioEventLoop(self._application) + def get_child_watcher(self) -> asyncio.AbstractChildWatcher: + raise DeprecationWarning("Child watchers are deprecated since Python 3.12") + + def set_child_watcher(self, watcher: asyncio.AbstractChildWatcher) -> None: + raise DeprecationWarning("Child watchers are deprecated since Python 3.12") + class QAsyncioEventLoop(asyncio.BaseEventLoop, QObject): """ @@ -479,7 +485,8 @@ class QAsyncioEventLoop(asyncio.BaseEventLoop, QObject): def default_exception_handler(self, context: typing.Dict[str, typing.Any]) -> None: # TODO - print(context["message"]) + if context["message"]: + print(context["message"]) def call_exception_handler(self, context: typing.Dict[str, typing.Any]) -> None: if self._exception_handler is not None: |
