#1139383 python-aioresponses: FTBFS with aiohttp 3.14

#1139383#5
Date:
2026-06-08 23:13:47 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202606/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-aioresponses, so that this is still
visible in the BTS web page for this package.

Thanks.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: MIT License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.

[... snipped ...]

        rsps.get(
            url,
            status=307,
            headers={"Location": "../baz"},
        )
        rsps.get(f"{base_url}/baz")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_aioresponses.py:781:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
<string>:3: in _request
    ???
/usr/lib/python3.13/unittest/mock.py:2332: in _execute_mock_call
    result = await effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aioresponses/core.py:512: in _request_mock
    response = await self.match(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aioresponses/core.py:456: in match
    response_or_exc = await matcher.build_response(
aioresponses/core.py:202: in build_response
    resp = self._build_response(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.RequestMatch object at 0x7f7ee209b650>
url = URL('https://httpbin.org/foo/bar'), method = 'get', request_headers = {}
status = 307, body = b'', content_type = 'application/json', payload = None
headers = {'Location': '../baz'}
response_class = <class 'aiohttp.client_reqrep.ClientResponse'>
reason = 'Temporary Redirect'

    def _build_response(self, url: 'Union[URL, str]',
                        method: str = hdrs.METH_GET,
                        request_headers: Optional[Dict] = None,
                        status: int = 200,
                        body: Union[str, bytes] = '',
                        content_type: str = 'application/json',
                        payload: Optional[Dict] = None,
                        headers: Optional[Dict] = None,
                        response_class: Optional[Type[ClientResponse]] = None,
                        reason: Optional[str] = None) -> ClientResponse:
        if response_class is None:
            response_class = ClientResponse
        if payload is not None:
            body = json.dumps(payload)
        if not isinstance(body, bytes):
            body = str.encode(body)
        if request_headers is None:
            request_headers = {}
        loop = Mock()
        loop.get_debug = Mock()
        loop.get_debug.return_value = True
        kwargs = {}  # type: Dict[str, Any]
        kwargs['request_info'] = RequestInfo(
            url=url,
            method=method,
            headers=CIMultiDictProxy(CIMultiDict(**request_headers)),
        )
        kwargs['writer'] = None
        kwargs['continue100'] = None
        kwargs['timer'] = TimerNoop()
        kwargs['traces'] = []
        kwargs['loop'] = loop
        kwargs['session'] = None

        # We need to initialize headers manually
        _headers = CIMultiDict({hdrs.CONTENT_TYPE: content_type})
        if headers:
            _headers.update(headers)
        raw_headers = self._build_raw_headers(_headers)
aioresponses/core.py:171: TypeError
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_aioresponses.py:753:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
<string>:3: in _request
    ???
/usr/lib/python3.13/unittest/mock.py:2332: in _execute_mock_call
    result = await effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aioresponses/core.py:512: in _request_mock
    response = await self.match(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aioresponses/core.py:456: in match
    response_or_exc = await matcher.build_response(
aioresponses/core.py:202: in build_response
    resp = self._build_response(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.RequestMatch object at 0x7f7ee25e2ed0>
url = URL('http://10.1.1.1:8080/redirect'), method = 'get', request_headers = {}
status = 200, body = b'', content_type = 'application/json', payload = None
headers = None, response_class = <class 'aiohttp.client_reqrep.ClientResponse'>
reason = 'OK'

    def _build_response(self, url: 'Union[URL, str]',
                        method: str = hdrs.METH_GET,
                        request_headers: Optional[Dict] = None,
                        status: int = 200,
                        body: Union[str, bytes] = '',
                        content_type: str = 'application/json',
                        payload: Optional[Dict] = None,
                        headers: Optional[Dict] = None,
                        response_class: Optional[Type[ClientResponse]] = None,
                        reason: Optional[str] = None) -> ClientResponse:
        if response_class is None:
            response_class = ClientResponse
        if payload is not None:
            body = json.dumps(payload)
        if not isinstance(body, bytes):
            body = str.encode(body)
        if request_headers is None:
            request_headers = {}
        loop = Mock()
        loop.get_debug = Mock()
        loop.get_debug.return_value = True
        kwargs = {}  # type: Dict[str, Any]
        kwargs['request_info'] = RequestInfo(
            url=url,
            method=method,
            headers=CIMultiDictProxy(CIMultiDict(**request_headers)),
        )
        kwargs['writer'] = None
        kwargs['continue100'] = None
        kwargs['timer'] = TimerNoop()
        kwargs['traces'] = []
        kwargs['loop'] = loop
        kwargs['session'] = None

        # We need to initialize headers manually
        _headers = CIMultiDict({hdrs.CONTENT_TYPE: content_type})
        if headers:
            _headers.update(headers)
        raw_headers = self._build_raw_headers(_headers)
aioresponses/core.py:171: TypeError
___ AIOResponseRedirectTest.test_request_info_with_original_request_headers ____

self = <tests.test_aioresponses.AIOResponseRedirectTest testMethod=test_request_info_with_original_request_headers>
rsps = <aioresponses.core.aioresponses object at 0x7f7ee1f71b70>

    @aioresponses()
    async def test_request_info_with_original_request_headers(self, rsps):
        headers = {"Authorization": "Bearer access-token"}
        rsps.get(self.url, status=200)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_aioresponses.py:764:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
<string>:3: in _request
    ???
/usr/lib/python3.13/unittest/mock.py:2332: in _execute_mock_call
    result = await effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aioresponses/core.py:512: in _request_mock
    response = await self.match(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aioresponses/core.py:456: in match
    response_or_exc = await matcher.build_response(
aioresponses/core.py:202: in build_response
    resp = self._build_response(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.RequestMatch object at 0x7f7ee209b590>
url = URL('http://10.1.1.1:8080/redirect'), method = 'get'
request_headers = {'Authorization': 'Bearer access-token'}, status = 200
body = b'', content_type = 'application/json', payload = None, headers = None
response_class = <class 'aiohttp.client_reqrep.ClientResponse'>, reason = 'OK'

    def _build_response(self, url: 'Union[URL, str]',
                        method: str = hdrs.METH_GET,
                        request_headers: Optional[Dict] = None,
                        status: int = 200,
                        body: Union[str, bytes] = '',
                        content_type: str = 'application/json',
                        payload: Optional[Dict] = None,
                        headers: Optional[Dict] = None,
                        response_class: Optional[Type[ClientResponse]] = None,
                        reason: Optional[str] = None) -> ClientResponse:
        if response_class is None:
            response_class = ClientResponse
        if payload is not None:
            body = json.dumps(payload)
        if not isinstance(body, bytes):
            body = str.encode(body)
        if request_headers is None:
            request_headers = {}
        loop = Mock()
        loop.get_debug = Mock()
        loop.get_debug.return_value = True
        kwargs = {}  # type: Dict[str, Any]
        kwargs['request_info'] = RequestInfo(
            url=url,
            method=method,
            headers=CIMultiDictProxy(CIMultiDict(**request_headers)),
        )
        kwargs['writer'] = None
        kwargs['continue100'] = None
        kwargs['timer'] = TimerNoop()
        kwargs['traces'] = []
        kwargs['loop'] = loop
        kwargs['session'] = None

        # We need to initialize headers manually
        _headers = CIMultiDict({hdrs.CONTENT_TYPE: content_type})
        if headers:
            _headers.update(headers)
        raw_headers = self._build_raw_headers(_headers)
aioresponses/core.py:171: TypeError
=========================== short test summary info ============================
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_assert_any_call
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_assert_any_call_not_called
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_assert_called
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_assert_called_twice
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_assert_not_called
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_binary_body - T...
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_binary_body_via_callback
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_callback - Type...
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_callback_coroutine
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_custom_response_class
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_exceptions_in_the_middle_of_responses
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_mocking_as_context_manager
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_mocking_as_decorator
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_multiple_requests
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_passing_argument
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_possible_race_condition
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_post_with_data
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_raise_for_status
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_request_raise_for_status
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_request_should_match_regexp
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_request_with_non_deepcopyable_parameter
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_returned_instance
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_returned_instance_and_params_handling
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_returned_instance_and_status_code
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_returned_response_cookies
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_returned_response_headers
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_returned_response_raw_headers
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_streaming - Typ...
FAILED tests/test_aioresponses.py::AIOResponsesTestCase::test_streaming_up_to
FAILED tests/test_aioresponses.py::AIOResponsesRaiseForStatusSessionTestCase::test_do_not_raise_for_status
FAILED tests/test_aioresponses.py::AIOResponsesRaiseForStatusSessionTestCase::test_raise_for_status
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_post_redirect_followed
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_redirect_followed
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_redirect_missing_location_header
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_redirect_missing_mocked_match
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_relative_url_redirect_followed
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_request_info
FAILED tests/test_aioresponses.py::AIOResponseRedirectTest::test_request_info_with_original_request_headers
=================== 38 failed, 24 passed, 2 skipped in 2.09s ===================
E: pybuild pybuild:485: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 --parallel=2 returned exit code 13
make: *** [debian/rules:12: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1139383#10
Date:
2026-06-09 01:57:29 UTC
From:
To:
Control: forwarded -1 https://github.com/pnuckowski/aioresponses/issues/289
#1139383#17
Date:
2026-06-10 13:19:12 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-aioresponses, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1139383@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Edward Betts <edward@4angle.com> (supplier of updated python-aioresponses package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 10 Jun 2026 12:20:10 +0100
Source: python-aioresponses
Architecture: source
Version: 0.7.6-4
Distribution: unstable
Urgency: medium
Maintainer: Jonas Smedegaard <dr@jones.dk>
Changed-By: Edward Betts <edward@4angle.com>
Closes: 1139383
Changes:
 python-aioresponses (0.7.6-4) unstable; urgency=medium
 .
   * Team upload.
   * Patch aioresponses/core.py to support aiohttp 3.14. (Closes: #1139383)
   * Switch to autopkgtest-pkg-pybuild.
Checksums-Sha1:
 1d3638bda9a498a962bc92740ab8af52fd2d5d29 2249 python-aioresponses_0.7.6-4.dsc
 d5e5a3963ea969eb27bcc2a58d4c87a56b1b5c9b 5528 python-aioresponses_0.7.6-4.debian.tar.xz
 98a71f5b880807ef9788c3676901871b00fd495a 8386 python-aioresponses_0.7.6-4_source.buildinfo
Checksums-Sha256:
 2a37c8493e374fe2d6baa1f48a5335009a2e2161f46f1bf2b2579b3b986b6f3f 2249 python-aioresponses_0.7.6-4.dsc
 373e065555afff4e90ea15b4f1472e6169531465ce6516ae270fa1c49a167f55 5528 python-aioresponses_0.7.6-4.debian.tar.xz
 b8b69712b916576d516c2d1b4955b5c2dc9e0391221a025948e88ed7399e4b18 8386 python-aioresponses_0.7.6-4_source.buildinfo
Files:
 76a8d557ca022c38a01309bd5f347428 2249 python optional python-aioresponses_0.7.6-4.dsc
 3090e3c82fd49028f47b2839b0366e07 5528 python optional python-aioresponses_0.7.6-4.debian.tar.xz
 2667cd14f224a98cca896424e08b44e3 8386 python optional python-aioresponses_0.7.6-4_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+4rPp4xyYInDitAmlgWhCYxjuSoFAmopXu4ACgkQlgWhCYxj
uSq01w/+OZ1fG492FvHSHH81564fysi77NweWz2cpXSOeGr1gLIAB4HDsr8J/d1q
vH3nokbHv7Z9hwmfRPqk9T00pIYnWsJkmW6ismFAtbuZ2gnjfT/RQ4zP6R93fB82
oVwm+UYdZmvRhD8KWOCJKFanqX3hfxo8PNw8j1LeH9QkPPFW8+cSBdh5Tn5mk+Gw
xtr+24WxRDdyfniLo3fbnxHwLphesHtHwPN1K5wVfvGMe1lUKwKze2aVg92qDTRw
5VGr5VZRxS1WMfl12DbK15GZUTqSg0Fq6fC0GELKI8nf+w7GL6Cr1Cl5oGM0lYcK
fsWRsRGOD+JGZ6HOPfhvLcXq7KiCo1CHVPAbGGg5T6LhEvhJxRZ/rUxgao9RkttQ
Y5RfLHFCTNFFuDayVkPTLv2pfzmbob8Z0gv/7j0hAxBxosQYVMypFsJbX/5a/gRq
VqEbvAwd65C7aZxNZnhH1t9q6SRA+r5D4LrTSxkUt23fdzeMuMqOWkuDL6Oexgj5
Gq4LUAloEn90KAZowz2phIfmJPiNMUkyM5po+JLiuoxFh4olMMVlp16V6EZzHivd
kD4t60PQ4jLTL0uyRtWW4Qq+B5su/he/JRvnxUk3K6NAhrhqIcc6+dL5ickOp9cS
24pp/VidoYrNLGseKKqv9f/UF3BCC7wAty3eRFtWJD6uUekfaoU=
=XWDO
-----END PGP SIGNATURE-----