Package: src:python-accuweather
Version: 3.0.0-2
Severity: serious
Tags: ftbfs forky sid
User: [email protected]
Usertags: aiohttp-3.14

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-accuweather, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
dh clean --buildsystem=pybuild --with python3
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
dh binary --buildsystem=pybuild --with python3
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild

[... snipped ...]

reason = 'Unauthorized'

    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)
>       resp = response_class(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       TypeError: ClientResponse.__init__() missing 1 required keyword-only 
argument: 'stream_writer'

/usr/lib/python3/dist-packages/aioresponses/core.py:171: TypeError
________________________________ test_api_error ________________________________

    @pytest.mark.asyncio()
    async def test_api_error() -> None:
        """Test with API error."""
        payload = {
            "Code": "ServiceError",
            "Message": "API error.",
        }
    
        session = aiohttp.ClientSession()
    
        with aioresponses() as session_mock:
            session_mock.get(
                
"https://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=32-character-string-1234567890qw&q=52.0677904%252C19.4795644&language=en-us";,
                payload=payload,
                status=404,
            )
            accuweather = AccuWeather(
                VALID_API_KEY, session, latitude=LATITUDE, longitude=LONGITUDE
            )
            with pytest.raises(
                ApiError, match="Invalid response from AccuWeather API: 404"
            ):
>               await accuweather.async_get_location()

tests/test_init.py:221: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
accuweather/__init__.py:107: in async_get_location
    data = await self._async_get_data(url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
accuweather/__init__.py:72: in _async_get_data
    async with self._session.get(url, headers=HTTP_HEADERS) as resp:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/aiohttp/client.py:1683: in __aenter__
    self._resp: _RetType_co = await self._coro
                              ^^^^^^^^^^^^^^^^
<string>:3: in _request
    ???
/usr/lib/python3.13/unittest/mock.py:2332: in _execute_mock_call
    result = await effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/aioresponses/core.py:512: in _request_mock
    response = await self.match(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/aioresponses/core.py:456: in match
    response_or_exc = await matcher.build_response(
/usr/lib/python3/dist-packages/aioresponses/core.py:202: in build_response
    resp = self._build_response(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <aioresponses.core.RequestMatch object at 0x7fc41f2ba650>
url = 
URL('https://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=32-character-string-1234567890qw&language=en-us&q=52.0677904%252C19.4795644')
method = 'get', request_headers = {'Content-Encoding': 'gzip'}, status = 404
body = b'{"Code": "ServiceError", "Message": "API error."}'
content_type = 'application/json'
payload = {'Code': 'ServiceError', 'Message': 'API error.'}, headers = None
response_class = <class 'aiohttp.client_reqrep.ClientResponse'>
reason = 'Not Found'

    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)
>       resp = response_class(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       TypeError: ClientResponse.__init__() missing 1 required keyword-only 
argument: 'stream_writer'

/usr/lib/python3/dist-packages/aioresponses/core.py:171: TypeError
_________________________ test_requests_exceeded_error 
_________________________Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fc41f1ca900>
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fc41f13d310>


    @pytest.mark.asyncio()
    async def test_requests_exceeded_error() -> None:
        """Test with requests exceeded error."""
        payload = {
            "Code": "ServiceUnavailable",
            "Message": "The allowed number of requests has been exceeded.",
        }
    
        session = aiohttp.ClientSession()
    
        with aioresponses() as session_mock:
            session_mock.get(
                
"https://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=32-character-string-1234567890qw&q=52.0677904%252C19.4795644&language=en-us";,
                payload=payload,
                status=503,
            )
            accuweather = AccuWeather(
                VALID_API_KEY, session, latitude=LATITUDE, longitude=LONGITUDE
            )
            with pytest.raises(
                RequestsExceededError,
                match="The allowed number of requests has been exceeded",
            ):
>               await accuweather.async_get_location()

tests/test_init.py:249: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
accuweather/__init__.py:107: in async_get_location
    data = await self._async_get_data(url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
accuweather/__init__.py:72: in _async_get_data
    async with self._session.get(url, headers=HTTP_HEADERS) as resp:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/aiohttp/client.py:1683: in __aenter__
    self._resp: _RetType_co = await self._coro
                              ^^^^^^^^^^^^^^^^
<string>:3: in _request
    ???
/usr/lib/python3.13/unittest/mock.py:2332: in _execute_mock_call
    result = await effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/aioresponses/core.py:512: in _request_mock
    response = await self.match(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/aioresponses/core.py:456: in match
    response_or_exc = await matcher.build_response(
/usr/lib/python3/dist-packages/aioresponses/core.py:202: in build_response
    resp = self._build_response(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <aioresponses.core.RequestMatch object at 0x7fc41f2bb050>
url = 
URL('https://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=32-character-string-1234567890qw&language=en-us&q=52.0677904%252C19.4795644')
method = 'get', request_headers = {'Content-Encoding': 'gzip'}, status = 503
body = b'{"Code": "ServiceUnavailable", "Message": "The allowed number of 
requests has been exceeded."}'
content_type = 'application/json'
payload = {'Code': 'ServiceUnavailable', 'Message': 'The allowed number of 
requests has been exceeded.'}
headers = None, response_class = <class 'aiohttp.client_reqrep.ClientResponse'>
reason = 'Service Unavailable'

    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)
>       resp = response_class(method, url, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       TypeError: ClientResponse.__init__() missing 1 required keyword-only 
argument: 'stream_writer'

/usr/lib/python3/dist-packages/aioresponses/core.py:171: TypeError
--------------------------- snapshot report summary ----------------------------
3 snapshots unused.

Re-run pytest with --snapshot-update to delete unused snapshots.
=========================== short test summary info ============================
FAILED tests/test_init.py::test_get_location - TypeError: ClientResponse.__in...
FAILED tests/test_init.py::test_get_current_conditions - TypeError: ClientRes...
FAILED tests/test_init.py::test_get_daily_forecast - TypeError: ClientRespons...
FAILED tests/test_init.py::test_get_hourly_forecast - TypeError: ClientRespon...
FAILED tests/test_init.py::test_invalid_api_key_2 - TypeError: ClientResponse...
FAILED tests/test_init.py::test_api_error - TypeError: ClientResponse.__init_...
FAILED tests/test_init.py::test_requests_exceeded_error - TypeError: ClientRe...
========================= 7 failed, 3 passed in 0.44s ==========================
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fc41f1ff890>
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest -v
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 
3.13" --parallel=2 returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2
--------------------------------------------------------------------------------

Reply via email to