Source: aiocoap
Version: 0.4.14-1
Severity: serious
User: [email protected]
Usertags: python3.14

aiocoap's autopkgtests fail with Python 3.14 as a supported Python 
version, as is the case in unstable.  Here are some relevant bits of the 
test log:

============================= test session starts ==============================
platform linux -- Python 3.14.2, pytest-8.4.2, pluggy-1.6.0
rootdir: /tmp/autopkgtest.W5aGg2/autopkgtest_tmp
collected 260 items

tests/test_blockwise.py FFsF                                             [  1%]
tests/test_client.py FFFFFFFF                                            [  4%]
tests/test_commandline.py FFFFF.                                         [  6%]
tests/test_credentials.py ..s                                            [  8%]
tests/test_doctest.py ................F.................                 [ 21%]
tests/test_dtls.py ssssssssssssss                                        [ 26%]
tests/test_edhoc.py sssss                                                [ 28%]
tests/test_encoding.py ...........                                       [ 32%]
tests/test_fileserver.py F                                               [ 33%]
tests/test_group_oscore.py ssssssssssssssssssssssssssssss                [ 44%]
tests/test_noncoap_client.py FFFFFFFFss                                  [ 48%]
tests/test_noncoap_tcp_client.py FFFFFFFFFFF                             [ 52%]
tests/test_observe.py FFFFFFFFFFFF                                       [ 57%]
tests/test_oscore.py sssssssssssssssssssssss                             [ 66%]
tests/test_oscore_plugtest.py ssssssssssssssssssssssssssssssss           [ 78%]
tests/test_protocol.py FFF                                               [ 79%]
tests/test_rd_examples.py FF                                             [ 80%]
tests/test_reverseproxy.py FF                                            [ 81%]
tests/test_server.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFssssssssssssss          [ 97%]
tests/test_timeoutdict.py F                                              [ 97%]
tests/test_tls.py F                                                      [ 98%]
tests/test_uri_handling.py ....                                          [ 99%]
tests/test_util_cryptography.py s                                        [100%]

=================================== FAILURES ===================================
_______________________ TestBlockwise.test_client_hints ________________________

self = <tests.test_blockwise.TestBlockwise testMethod=test_client_hints>

    def setUp(self):
        super(WithAsyncLoop, self).setUp()

>       self.loop = asyncio.get_event_loop()
                    ^^^^^^^^^^^^^^^^^^^^^^^^

tests/fixtures.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 
0x7fa26578f0e0>

    def get_event_loop(self):
        """Get the event loop for the current context.

        Returns an instance of EventLoop or raises an exception.
        """
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/usr/lib/python3.14/asyncio/events.py:715: RuntimeError
[...]
___________________________________ test_017 ___________________________________

t = Sentinel (aiocoap.util)

    def test(t=t):
        result = t.run()
        for f in result.failures:
            print(f[1])
>           raise RuntimeError("Doctest failed (see above)")
E           RuntimeError: Doctest failed (see above)

tests/test_doctest.py:65: RuntimeError
----------------------------- Captured stdout call -----------------------------
AssertionError: Failed doctest test for aiocoap.util.Sentinel
  File "/usr/lib/python3/dist-packages/aiocoap/util/__init__.py", line 168, in 
Sentinel

----------------------------------------------------------------------
File "/usr/lib/python3/dist-packages/aiocoap/util/__init__.py", line 177, in 
aiocoap.util.Sentinel
Failed example:
    json.dumps([1, FIXME, 3])
Expected:
    Traceback (most recent call last):
    TypeError: Object of type Sentinel is not JSON serializable
Got:
    Traceback (most recent call last):
      File "<doctest aiocoap.util.Sentinel[2]>", line 1, in <module>
        json.dumps([1, FIXME, 3])
        ~~~~~~~~~~^^^^^^^^^^^^^^^
      File "/usr/lib/python3.14/json/__init__.py", line 235, in dumps
        return _default_encoder.encode(obj)
               ~~~~~~~~~~~~~~~~~~~~~~~^^^^^
      File "/usr/lib/python3.14/json/encoder.py", line 202, in encode
        chunks = self.iterencode(o, _one_shot=True)
      File "/usr/lib/python3.14/json/encoder.py", line 263, in iterencode
        return _iterencode(o, 0)
      File "/usr/lib/python3.14/json/encoder.py", line 182, in default
        raise TypeError(f'Object of type {o.__class__.__name__} '
                        f'is not JSON serializable')
    TypeError: Object of type Sentinel is not JSON serializable
    when serializing list item 1

There are many other instances of the first of these two failures, but 
they all look like basically the same thing.  Judging from 
https://github.com/chrysn/aiocoap/compare/0.4.14...0.4.17, I think this 
has likely been fixed in the latest upstream version, so I'd recommend 
trying to upgrade to that as the first step.

Thanks,

-- 
Colin Watson (he/him)                              [[email protected]]

-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64

Kernel: Linux 6.16.12+deb14+1-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to