Skip to content

Commit a487d6d

Browse files
committed
Remove old SignalTimeoutError
See #306
1 parent 2fa9d92 commit a487d6d

File tree

5 files changed

+3
-13
lines changed

5 files changed

+3
-13
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
`@The-Compiler`_ for the PR.
2828
- The old ``qtbot.stopForInteraction()`` name is now removed as it was
2929
cumbersome and rarely used. Use ``qtbot.stop()`` (added in 1.1.1) instead.
30+
- The old ``SignalTimeoutError`` exception alias is now removed, as it was renamed to
31+
``TimeoutError`` in 2.1.
3032
- ``qtbot.waitSignal`` and ``waitSignals`` (as well as their PEP-8 aliases)
3133
supported passing ``None`` as signal, making them wait for the given timeout
3234
instead. This is not supported anymore, use ``qtbot.wait(ms)`` instead.

src/pytestqt/exceptions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ class TimeoutError(Exception):
9898
.. versionadded:: 2.1
9999
100100
Exception thrown by :class:`pytestqt.qtbot.QtBot` methods.
101-
102-
.. note::
103-
In versions prior to ``2.1``, this exception was called ``SignalTimeoutError``.
104-
An alias is kept for backward compatibility.
105101
"""
106102

107103
pass
108-
109-
110-
# backward compatibility alias
111-
SignalTimeoutError = TimeoutError

src/pytestqt/plugin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
format_captured_exceptions,
88
_is_exception_capture_enabled,
99
_QtExceptionCaptureManager,
10-
SignalTimeoutError,
1110
)
1211
from pytestqt.logging import QtLoggingPlugin, _QtMessageCapture, Record
1312
from pytestqt.qt_compat import qt_api
@@ -19,7 +18,6 @@
1918
assert QtBot
2019
assert SignalBlocker
2120
assert MultiSignalBlocker
22-
assert SignalTimeoutError
2321
assert Record
2422
assert capture_exceptions
2523
assert format_captured_exceptions

src/pytestqt/qtbot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import contextlib
22
import weakref
33

4-
from pytestqt.exceptions import SignalTimeoutError, TimeoutError
4+
from pytestqt.exceptions import TimeoutError
55
from pytestqt.qt_compat import qt_api
66
from pytestqt.wait_signal import (
77
SignalBlocker,
@@ -672,7 +672,6 @@ def wait_callback(self, *args, **kwargs):
672672

673673

674674
# provide easy access to exceptions to qtbot fixtures
675-
QtBot.SignalTimeoutError = SignalTimeoutError
676675
QtBot.SignalEmittedError = SignalEmittedError
677676
QtBot.TimeoutError = TimeoutError
678677
QtBot.CallbackCalledTwiceError = CallbackCalledTwiceError

tests/test_basics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def test_public_api_backward_compatibility():
248248
assert pytestqt.plugin.QtBot
249249
assert pytestqt.plugin.SignalBlocker
250250
assert pytestqt.plugin.MultiSignalBlocker
251-
assert pytestqt.plugin.SignalTimeoutError
252251
assert pytestqt.plugin.format_captured_exceptions
253252
assert pytestqt.plugin.capture_exceptions
254253
assert pytestqt.plugin.QtLoggingPlugin

0 commit comments

Comments
 (0)