Package: src:fyta-cli
Version: 0.7.3-1
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:fyta-cli, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:142: Building wheel for python3.14 with "build" 
module
I: pybuild base:385: python3.14 -m build --skip-dependency-check --no-isolation 
--wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14  

[... snipped ...]

            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_get_plant_image _____________________________

responses = <aioresponses.core.aioresponses object at 0x7fd645638e20>

    async def test_get_plant_image(
        responses: aioresponses,
    ) -> None:
        """Test getting plant image."""
        responses.post(
            FYTA_AUTH_URL,
            status=200,
            body=load_fixture("login_response.json"),
        )
        responses.get(
            "https://api.prod.fyta-app.de/user-plant/1/origin_path";,
            headers={"Content-Type": "image/png"},
            status=200,
            body=bytes([100]),
        )
    
        fyta_connector = FytaConnector("[email protected]", "examplepassword")
    
>       response = await fyta_connector.get_plant_image(
            "https://api.prod.fyta-app.de/user-plant/1/origin_path";
        )

tests/test_fyta_cli.py:307: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
fyta_cli/fyta_connector.py:98: in get_plant_image
    return await self.client.get_plant_image(image_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fyta_cli/fyta_client.py:214: in get_plant_image
    await self.login()  # get new access token, if current token expired
    ^^^^^^^^^^^^^^^^^^
fyta_cli/fyta_client.py:86: in login
    response = await self.session.post(
<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 0x7fd645639480>
url = URL('https://web.fyta.de/api/auth/login'), method = 'post'
request_headers = {}, status = 200
body = b'{\n    "access_token": "111111111111111111111111111111111111111",\n    
"token_type": "Bearer",\n    "expires_in": 5184000,\n    "refresh_token": 
"2222222222222222222222222222222222222222",\n    "scope": "mobile"\n}'
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)
>       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_get_plant_image_errors __________________________

responses = <aioresponses.core.aioresponses object at 0x7fd645639260>

    async def test_get_plant_image_errors(
        responses: aioresponses,
    ) -> None:
        """Test update errors."""
        responses.post(
            FYTA_AUTH_URL,
            status=200,
            body=load_fixture("login_response.json"),
        )
        responses.get(
            "https://api.prod.fyta-app.de/user-plant/1/origin_path";,
            headers={"Content-Type": "text/html"},
            status=500,
        )
        responses.get(
            "https://api.prod.fyta-app.de/user-plant/1/origin_path";,
            headers={"Content-Type": "text/html"},
            status=204,
        )
    
        fyta_connector = FytaConnector("[email protected]", "examplepassword")
    
>       response = await fyta_connector.get_plant_image(
            "https://api.prod.fyta-app.de/user-plant/1/origin_path";
        )

tests/test_fyta_cli.py:343: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
fyta_cli/fyta_connector.py:98: in get_plant_image
    return await self.client.get_plant_image(image_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fyta_cli/fyta_client.py:214: in get_plant_image
    await self.login()  # get new access token, if current token expired
    ^^^^^^^^^^^^^^^^^^
fyta_cli/fyta_client.py:86: in login
    response = await self.session.post(
<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 0x7fd6454a4950>
url = URL('https://web.fyta.de/api/auth/login'), method = 'post'
request_headers = {}, status = 200
body = b'{\n    "access_token": "111111111111111111111111111111111111111",\n    
"token_type": "Bearer",\n    "expires_in": 5184000,\n    "refresh_token": 
"2222222222222222222222222222222222222222",\n    "scope": "mobile"\n}'
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)
>       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
=============================== warnings summary ===============================
tests/test_fyta_cli.py::test_login
tests/test_fyta_cli.py::test_login_exceptions[{"message": "Unsupported Media 
Type"}-True-FytaConnectionError]
tests/test_fyta_cli.py::test_login_exceptions[{"statusCode": 404, "error": "Not 
Found"}-False-FytaAuthentificationError]
tests/test_fyta_cli.py::test_login_exceptions[{"statusCode": 401,"error": 
"Unauthorized","errors": [{"message": "Could not authenticate 
user"}]}-False-FytaPasswordError]
tests/test_fyta_cli.py::test_get_plant_image
tests/test_fyta_cli.py::test_get_plant_image_errors
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/fyta_cli/fyta_client.py:88: 
DeprecationWarning: BasicAuth is deprecated and will be removed in aiohttp 4.0; 
use aiohttp.encode_basic_auth() with headers={'Authorization': ...} instead
    auth=BasicAuth(self.email, self.password),

tests/test_fyta_cli.py::test_login
tests/test_fyta_cli.py::test_login_exceptions[{"message": "Unsupported Media 
Type"}-True-FytaConnectionError]
tests/test_fyta_cli.py::test_login_exceptions[{"statusCode": 404, "error": "Not 
Found"}-False-FytaAuthentificationError]
tests/test_fyta_cli.py::test_login_exceptions[{"statusCode": 401,"error": 
"Unauthorized","errors": [{"message": "Could not authenticate 
user"}]}-False-FytaPasswordError]
tests/test_fyta_cli.py::test_get_plant_image
tests/test_fyta_cli.py::test_get_plant_image_errors
  /usr/lib/python3.13/copyreg.py:99: DeprecationWarning: BasicAuth is 
deprecated and will be removed in aiohttp 4.0; use aiohttp.encode_basic_auth() 
with headers={'Authorization': ...} instead
    return cls.__new__(cls, *args)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_fyta_cli.py::test_connection[{"message": "Unsupported Media 
Type"}-True]
FAILED tests/test_fyta_cli.py::test_connection[-False] - TypeError: 
ClientRes...Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fd6456c3e00>
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fd645497b10>

FAILED tests/test_fyta_cli.py::test_login - TypeError: ClientResponse.__init_...
FAILED tests/test_fyta_cli.py::test_login_exceptions[{"statusCode": 404, 
"error": "Not Found"}-False-FytaAuthentificationError]
FAILED tests/test_fyta_cli.py::test_login_exceptions[{"statusCode": 
401,"error": "Unauthorized","errors": [{"message": "Could not authenticate 
user"}]}-False-FytaPasswordError]
FAILED tests/test_fyta_cli.py::test_get_plant_image - TypeError: ClientRespon...
FAILED tests/test_fyta_cli.py::test_get_plant_image_errors - TypeError: Clien...
============ 7 failed, 2 passed, 6 deselected, 12 warnings in 0.33s ============
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fd645496e90>
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest 
--asyncio-mode=auto -k "not test_get_plant_list and not test_get_plant_data"
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:5: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2
--------------------------------------------------------------------------------

Reply via email to