Hi,
I spent half an our on this :-)
It seems the code was doing something awful even before
and the action is now plainly forbidden with modern Python.
Here's my proposal:
--- a/irc/tests/test_client_aio.py
+++ b/irc/tests/test_client_aio.py
@@ -13,21 +13,13 @@
return mock_create_connection
[email protected]
-def suppress_issue_197():
- with warnings.catch_warnings():
- warnings.filterwarnings('ignore', 'There is no current event loop')
- yield
-
-
def test_privmsg_sends_msg():
# create dummy transport, protocol
mock_transport = MagicMock()
mock_protocol = MagicMock()
# connect to dummy server
- with suppress_issue_197():
- loop = asyncio.get_event_loop()
+ loop = asyncio.new_event_loop()
loop.create_connection = make_mocked_create_connection(
mock_transport, mock_protocol
)
irc/bot.py . [ 2%]
irc/client.py .... [ 14%]
irc/dict.py . [ 17%]
irc/events.py . [ 20%]
irc/features.py ... [ 29%]
irc/message.py .. [ 35%]
irc/modes.py ... [ 44%]
irc/strings.py .. [ 50%]
irc/tests/test_bot.py ............ [ 85%]
irc/tests/test_client.py .... [ 97%]
irc/tests/test_client_aio.py . [100%]
======================= 34 passed, 2 deselected in 0.79s =======================
Le ven. 16 oct. 2026 à 04:15, Ben Finney <[email protected]> a écrit :
>
> Howdy Alexandre,
>
> On 16-Oct-2026, Ben Finney wrote:
> > An apparent bug is crashing the test suite; this has been reported
> > upstream at <URL: https://github.com/jaraco/irc/issues/246>.
>
> This test case failure is evident in the Salsa build output at
> <URL: https://salsa.debian.org/bignose/pkg-python-irc/-/jobs/10484709#L1357>.
>
> I have included the test failure output in my bug report upstream,
> hopefully they can correct what we might have wrong or fix the bug.
>
> Until then, can you please investigate to see whether it's a bug we can
> patch? (I don't want to disable the test case, its failure seems relevant
> to the installed package and we want the bug actually fixed.)
>
> --
> \ “Smoking cures weight problems. Eventually.” —Steven Wright |
> `\ |
> _o__) |
> Ben Finney <[email protected]>