Your message dated Mon, 17 Feb 2025 00:34:34 +0000
with message-id <[email protected]>
and subject line Bug#1084336: fixed in python-homeassistant-analytics 0.9.0-1
has caused the Debian Bug report #1084336,
regarding python-homeassistant-analytics: FTBFS: E 
aiohttp.client_exceptions.ClientConnectionError: Connection refused: GET 
https://analytics.home-assistant.io/custom_integrations.json
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1084336: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084336
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:python-homeassistant-analytics
Version: 0.7.0-2
Severity: serious
Tags: ftbfs

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
 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:129: Building wheel for python3.12 with "build" 
module
I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation --wheel 
--outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_python-homeassistant-analytics
* Building wheel...
Successfully built python_homeassistant_analytics-0.5.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with 
"installer" module
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_python-homeassistant-analytics/build; 
python3.12 -m pytest --no-cov
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: 
The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will 
default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to 
avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", 
"module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
rootdir: 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_python-homeassistant-analytics/build
configfile: pyproject.toml
plugins: syrupy-4.7.1, typeguard-4.3.0, asyncio-0.24.0a1, cov-5.0.0
asyncio: mode=Mode.AUTO, default_loop_scope=None
collected 9 items

tests/test_python_homeassistant_analytics.py FFFFFFFFF                   [100%]

=================================== FAILURES ===================================
_________________________ test_putting_in_own_session __________________________

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

    async def test_putting_in_own_session(
        responses: aioresponses,
    ) -> None:
        """Test putting in own session."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/data.json",
            status=200,
            body=load_fixture("data.json"),
        )
        async with aiohttp.ClientSession() as session:
            analytics = HomeassistantAnalyticsClient(session=session)
          await analytics.get_analytics()

tests/test_python_homeassistant_analytics.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:87: in 
get_analytics
    response = await self._request("analytics.home-assistant.io", "data.json")
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc95a6780>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc9539730>
method = 'GET', url = URL('https://analytics.home-assistant.io/data.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/data.json')
url_str = 'https://analytics.home-assistant.io/data.json'
key = ('GET', URL('https://analytics.home-assistant.io/data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_creating_own_session ___________________________

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

    async def test_creating_own_session(
        responses: aioresponses,
    ) -> None:
        """Test creating own session."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/data.json",
            status=200,
            body=load_fixture("data.json"),
        )
        analytics = HomeassistantAnalyticsClient()
      await analytics.get_analytics()

tests/test_python_homeassistant_analytics.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:87: in 
get_analytics
    response = await self._request("analytics.home-assistant.io", "data.json")
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc95ceff0>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc95cfe00>
method = 'GET', url = URL('https://analytics.home-assistant.io/data.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/data.json')
url_str = 'https://analytics.home-assistant.io/data.json'
key = ('GET', URL('https://analytics.home-assistant.io/data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________ test_unexpected_server_response ________________________

responses = <aioresponses.core.aioresponses object at 0x7f9bc944d040>
homeassistant_analytics_client = 
HomeassistantAnalyticsClient(session=<aiohttp.client.ClientSession object at 
0x7f9bc944e1e0>, request_timeout=10, api_host='analytics.home-assistant.io', 
_close_session=False, _etags={})

    async def test_unexpected_server_response(
        responses: aioresponses,
        homeassistant_analytics_client: HomeassistantAnalyticsClient,
    ) -> None:
        """Test handling unexpected response."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/data.json",
            status=200,
            headers={"Content-Type": "plain/text"},
            body="Yes",
        )
        with pytest.raises(HomeassistantAnalyticsError):
          assert await homeassistant_analytics_client.get_analytics()

tests/test_python_homeassistant_analytics.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:87: in 
get_analytics
    response = await self._request("analytics.home-assistant.io", "data.json")
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc944d040>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc944e1e0>
method = 'GET', url = URL('https://analytics.home-assistant.io/data.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/data.json')
url_str = 'https://analytics.home-assistant.io/data.json'
key = ('GET', URL('https://analytics.home-assistant.io/data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________________ test_timeout _________________________________

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

    async def test_timeout(
        responses: aioresponses,
    ) -> None:
        """Test request timeout."""
# Faking a timeout by sleeping
        async def response_handler(_: str, **_kwargs: Any) -> CallbackResult:
            """Response handler for this test."""
            await asyncio.sleep(2)
            return CallbackResult(body="Goodmorning!")
responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/data.json",
            callback=response_handler,
        )
        async with HomeassistantAnalyticsClient(
            request_timeout=1,
        ) as homeassistant_analytics_client:
            with pytest.raises(HomeassistantAnalyticsConnectionError):
              assert await homeassistant_analytics_client.get_analytics()

tests/test_python_homeassistant_analytics.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:87: in 
get_analytics
    response = await self._request("analytics.home-assistant.io", "data.json")
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc953af60>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc95ced80>
method = 'GET', url = URL('https://analytics.home-assistant.io/data.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/data.json')
url_str = 'https://analytics.home-assistant.io/data.json'
key = ('GET', URL('https://analytics.home-assistant.io/data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________________________ test_analytics ________________________________

responses = <aioresponses.core.aioresponses object at 0x7f9bc95cd6a0>
homeassistant_analytics_client = 
HomeassistantAnalyticsClient(session=<aiohttp.client.ClientSession object at 
0x7f9bc944fa10>, request_timeout=10, api_host='analytics.home-assistant.io', 
_close_session=False, _etags={})
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)

    async def test_analytics(
        responses: aioresponses,
        homeassistant_analytics_client: HomeassistantAnalyticsClient,
        snapshot: SnapshotAssertion,
    ) -> None:
        """Test retrieving analytics."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/data.json",
            status=200,
            body=load_fixture("data.json"),
        )
      assert await homeassistant_analytics_client.get_analytics() == snapshot

tests/test_python_homeassistant_analytics.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:87: in 
get_analytics
    response = await self._request("analytics.home-assistant.io", "data.json")
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc95cd6a0>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc944fa10>
method = 'GET', url = URL('https://analytics.home-assistant.io/data.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/data.json')
url_str = 'https://analytics.home-assistant.io/data.json'
key = ('GET', URL('https://analytics.home-assistant.io/data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________________ test_etags __________________________________

responses = <aioresponses.core.aioresponses object at 0x7f9bc944e000>
homeassistant_analytics_client = 
HomeassistantAnalyticsClient(session=<aiohttp.client.ClientSession object at 
0x7f9bc951cda0>, request_timeout=10, api_host='analytics.home-assistant.io', 
_close_session=False, _etags={})

    async def test_etags(
        responses: aioresponses,
        homeassistant_analytics_client: HomeassistantAnalyticsClient,
    ) -> None:
        """Test retrieving current analytics."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/current_data.json",
            status=200,
            body=load_fixture("current_data.json"),
            headers={"etag": "123"},
        )
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/current_data.json",
            status=304,
        )
      assert await homeassistant_analytics_client.get_current_analytics()

tests/test_python_homeassistant_analytics.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:92: in 
get_current_analytics
    response = await self._request(
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc944e000>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc951cda0>
method = 'GET'
url = URL('https://analytics.home-assistant.io/current_data.json'), args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/current_data.json')
url_str = 'https://analytics.home-assistant.io/current_data.json'
key = ('GET', URL('https://analytics.home-assistant.io/current_data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/current_data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
____________________________ test_current_analytics ____________________________

responses = <aioresponses.core.aioresponses object at 0x7f9bc944c2c0>
homeassistant_analytics_client = 
HomeassistantAnalyticsClient(session=<aiohttp.client.ClientSession object at 
0x7f9bc95cd700>, request_timeout=10, api_host='analytics.home-assistant.io', 
_close_session=False, _etags={})
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)

    async def test_current_analytics(
        responses: aioresponses,
        homeassistant_analytics_client: HomeassistantAnalyticsClient,
        snapshot: SnapshotAssertion,
    ) -> None:
        """Test retrieving current analytics."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/current_data.json",
            status=200,
            body=load_fixture("current_data.json"),
        )
      assert await homeassistant_analytics_client.get_current_analytics() == 
snapshot

tests/test_python_homeassistant_analytics.py:152:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:92: in 
get_current_analytics
    response = await self._request(
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc944c2c0>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc95cd700>
method = 'GET'
url = URL('https://analytics.home-assistant.io/current_data.json'), args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/current_data.json')
url_str = 'https://analytics.home-assistant.io/current_data.json'
key = ('GET', URL('https://analytics.home-assistant.io/current_data.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/current_data.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________________________ test_integrations _______________________________

responses = <aioresponses.core.aioresponses object at 0x7f9bc95cd8b0>
homeassistant_analytics_client = 
HomeassistantAnalyticsClient(session=<aiohttp.client.ClientSession object at 
0x7f9bc951cb30>, request_timeout=10, api_host='analytics.home-assistant.io', 
_close_session=False, _etags={})
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)

    async def test_integrations(
        responses: aioresponses,
        homeassistant_analytics_client: HomeassistantAnalyticsClient,
        snapshot: SnapshotAssertion,
    ) -> None:
        """Test retrieving integrations."""
        responses.get(
            f"{HOMEASSISTANT_URL}/integrations.json",
            status=200,
            body=load_fixture("integrations.json"),
        )
      assert await homeassistant_analytics_client.get_integrations() == snapshot

tests/test_python_homeassistant_analytics.py:166:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:100: in 
get_integrations
    response = await self._request("home-assistant.io", "integrations.json")
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc95cd8b0>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc951cb30>
method = 'GET', url = URL('https://home-assistant.io/integrations.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://home-assistant.io/integrations.json')
url_str = 'https://home-assistant.io/integrations.json'
key = ('GET', URL('https://home-assistant.io/integrations.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://home-assistant.io/integrations.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_custom_integrations ___________________________

responses = <aioresponses.core.aioresponses object at 0x7f9bc951f2f0>
homeassistant_analytics_client = 
HomeassistantAnalyticsClient(session=<aiohttp.client.ClientSession object at 
0x7f9bc94fc2c0>, request_timeout=10, api_host='analytics.home-assistant.io', 
_close_session=False, _etags={})
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)

    async def test_custom_integrations(
        responses: aioresponses,
        homeassistant_analytics_client: HomeassistantAnalyticsClient,
        snapshot: SnapshotAssertion,
    ) -> None:
        """Test retrieving custom integrations."""
        responses.get(
            f"{HOMEASSISTANT_ANALYTICS_URL}/custom_integrations.json",
            status=200,
            body=load_fixture("custom_integrations.json"),
        )
      assert await homeassistant_analytics_client.get_custom_integrations() == 
snapshot

tests/test_python_homeassistant_analytics.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python_homeassistant_analytics/python_homeassistant_analytics.py:106: in 
get_custom_integrations
    response = await self._request(
python_homeassistant_analytics/python_homeassistant_analytics.py:59: in _request
    response = await self.session.get(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
    result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aioresponses.core.aioresponses object at 0x7f9bc951f2f0>
orig_self = <aiohttp.client.ClientSession object at 0x7f9bc94fc2c0>
method = 'GET'
url = URL('https://analytics.home-assistant.io/custom_integrations.json')
args = ()
kwargs = {'allow_redirects': True, 'headers': {'Accept': 'application/json, 
text/plain, */*', 'User-Agent': 'PythonHomeassistantAnalytics/0.5.0'}}
url_origin = URL('https://analytics.home-assistant.io/custom_integrations.json')
url_str = 'https://analytics.home-assistant.io/custom_integrations.json'
key = ('GET', 
URL('https://analytics.home-assistant.io/custom_integrations.json'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 
'PythonHomeassistantAnalytics/0.5.0', 'Accept': 'application/json, text/plain, 
*/*'}, 'allow_redirects': True})
response = None

    async def _request_mock(self, orig_self: ClientSession,
                            method: str, url: 'Union[URL, str]',
                            *args: Tuple,
                            **kwargs: Any) -> 'ClientResponse':
        """Return mocked response object or raise connection error."""
        if orig_self.closed:
            raise RuntimeError('Session is closed')
url_origin = url
        url = normalize_url(merge_params(url, kwargs.get('params')))
        url_str = str(url)
        for prefix in self._passthrough:
            if url_str.startswith(prefix):
                return (await self.patcher.temp_original(
                    orig_self, method, url_origin, *args, **kwargs
                ))
key = (method, url)
        self.requests.setdefault(key, [])
        request_call = self._build_request_call(method, *args, **kwargs)
        self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs) if response is None:
          raise ClientConnectionError(
                'Connection refused: {} {}'.format(method, url)
            )
E           aiohttp.client_exceptions.ClientConnectionError: Connection 
refused: GET https://analytics.home-assistant.io/custom_integrations.json

/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
--------------------------- snapshot report summary ----------------------------
4 snapshots unused.

Re-run pytest with --snapshot-update to delete unused snapshots.
=========================== short test summary info ============================
FAILED tests/test_python_homeassistant_analytics.py::test_putting_in_own_session
FAILED tests/test_python_homeassistant_analytics.py::test_creating_own_session
FAILED 
tests/test_python_homeassistant_analytics.py::test_unexpected_server_response
FAILED tests/test_python_homeassistant_analytics.py::test_timeout - aiohttp.c...
FAILED tests/test_python_homeassistant_analytics.py::test_analytics - aiohttp...
FAILED tests/test_python_homeassistant_analytics.py::test_etags - aiohttp.cli...
FAILED tests/test_python_homeassistant_analytics.py::test_current_analytics
FAILED tests/test_python_homeassistant_analytics.py::test_integrations - aioh...
FAILED tests/test_python_homeassistant_analytics.py::test_custom_integrations
============================== 9 failed in 0.36s ===============================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_python-homeassistant-analytics/build; 
python3.12 -m pytest --no-cov
dh_auto_test: error: pybuild --test -i python{version} -p 3.12 returned exit 
code 13
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

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

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

Thanks.

--- End Message ---
--- Begin Message ---
Source: python-homeassistant-analytics
Source-Version: 0.9.0-1
Done: Edward Betts <[email protected]>

We believe that the bug you reported is fixed in the latest version of
python-homeassistant-analytics, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Edward Betts <[email protected]> (supplier of updated 
python-homeassistant-analytics 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 16 Feb 2025 17:48:43 -0500
Source: python-homeassistant-analytics
Architecture: source
Version: 0.9.0-1
Distribution: unstable
Urgency: medium
Maintainer: Home Assistant Team <[email protected]>
Changed-By: Edward Betts <[email protected]>
Closes: 1084336
Changes:
 python-homeassistant-analytics (0.9.0-1) unstable; urgency=medium
 .
   * New upstream release.
   * Patch test suite so aiohttp uses HTTP proxy from environment variables, to
     avoid network access during build and autopkgtest. (Closes: #1084336)
   * Update copyright year.
   * Simplify debian/rules.
   * Simplify debian/watch.
Checksums-Sha1:
 e99f6d67bd7241cf3c820e92c443938b78ef2be3 2711 
python-homeassistant-analytics_0.9.0-1.dsc
 e4a46488690c449a4758585f4001f54aea521b3c 1752277 
python-homeassistant-analytics_0.9.0.orig.tar.gz
 94a11fe62e81699d76bcfb350fa23425f9936192 3164 
python-homeassistant-analytics_0.9.0-1.debian.tar.xz
 efecff7cea35155f44822d7bff100df2b2f95221 8683 
python-homeassistant-analytics_0.9.0-1_source.buildinfo
Checksums-Sha256:
 ff023f5f8e303d0ceea989891f56f28dac32be3d51776828d07d6dce4659ee52 2711 
python-homeassistant-analytics_0.9.0-1.dsc
 8bf9bcdce53f663b5c0b362eb61a6001f256d9c2d3e8e2560d7791020d0d3085 1752277 
python-homeassistant-analytics_0.9.0.orig.tar.gz
 2ff71dbaf4830073f7ff8c1ab5b6ffdc9f73345c50bd4867ee18eb1fbdc023f3 3164 
python-homeassistant-analytics_0.9.0-1.debian.tar.xz
 29febefb408b439519f79634cd7aeddb3afa2fb5d8d3a781c0aee1539a305e9e 8683 
python-homeassistant-analytics_0.9.0-1_source.buildinfo
Files:
 daaa86e58d6069120d99b4a45f16729a 2711 python optional 
python-homeassistant-analytics_0.9.0-1.dsc
 d2ead0dd7b2c0b603e7a608ef9bc429c 1752277 python optional 
python-homeassistant-analytics_0.9.0.orig.tar.gz
 f32abc7cb7619a62f7bd478148abbd4e 3164 python optional 
python-homeassistant-analytics_0.9.0-1.debian.tar.xz
 97f08a4646fbef5880430e9340bab7ea 8683 python optional 
python-homeassistant-analytics_0.9.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+4rPp4xyYInDitAmlgWhCYxjuSoFAmeyfzkACgkQlgWhCYxj
uSoXHxAAlzk+FQe0BTu49+00FhfmILcmDwVOrJewgfyTaOgwqEnqfrqKjmT93r4H
D5RhFpkHzXLppEyNiCuzuRqLThnax+5JPxD7k6sJl5GEns+a2aWPqvs7n25PZdXF
LR+j0jduMqaace7wPz9ROcn0sjf62ntIJlzSbwRdXIyfwyfRiioYl3vEbBFIj0V4
EwqlBXRY1u3faTNx+bW+AR237RsvYP8xYXfv5YBZtCYamOVvrQ6MKQMkfSQx97VP
SpByyPJFiEP3CLKxw/K91KKJLMtqe0RumAE/hiLiahH+75tNStXqQqjZyKVXyMBi
w7aGEA8LNX4ri1W0fNyllUSo1Q8+Tb57hY7pYEZgIqv+Tdd2BSTeVdXm1DYAe+hB
Tz2WIlzsy7bDtxc09rjBwiv/QmDS+ffcV2lKVC1YVeLZ8Td6Q+k4WdOkOeY7sBAf
maDkuxB1TdVMWH7lWLPSsHrxUP5ugQlFTP6e1YIB7pyUqjcpMwomrfZL2AF5MIIz
/ut0mehjQ06yR5NEgoqDSKQyshBKCMelP37vdgeO/5TPj9ecGh2sGIZzxfSDTQiu
HaSsPqq6GcAtUOAMsNtBBkOH+gmZMmjbP4XsorZFqlvLTtO8bTpRGrKl0oRuhCF9
9ixfN5i/ZhUxJdrZXlJBH/S8C6XuCr3Ih7ksfVtiYbli2U2Wb64=
=02VL
-----END PGP SIGNATURE-----

Attachment: pgpOcEG9U1pGL.pgp
Description: PGP signature


--- End Message ---

Reply via email to