Giter Site home page Giter Site logo

appdaemon-testing's Introduction

Hey ๐Ÿ‘‹

I'm Nick, A frontend engineer at Canva. I love complex problems and challenges, and things that give me something new and interesting to work on.

As might be apparent from my numerous home automation repositories, in my free time I enjoy dabbling in home automation. I'm a huge evangelist of Home Assistant and run it at a few different physical sites.

On the side I run 100 Warm Tunas, an social aggregation site, intended to predict triple j's Hottest 100 each year.

See my latest work at my website, https://nickwhyte.com

appdaemon-testing's People

Contributors

dependabot[bot] avatar nickw444 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

appdaemon-testing's Issues

Is there a way to test asyncio apps?

Hi there,

really interested in this lib, looks great!
However, all of my appdaemon apps are written in asyncio "syntax".
Is there a way to test those with your lib as well?

Thx!

Feature Request: Unit Test for AppDaemon

Hello @nickw444,

Thanks for this framework. I am one of the maintainers for AD, and wanted to ask if there was a way for you to kindly extend your framework to be used to test AD as a whole and not just apps (well I kind of recognise its one and the same thing anyway), nor limited to the Hass namespace.

Basically we looking at having a CI/CD pipeline going forward, so every code blocks to be merged can be automatically tested to check for non breaking code before the PR is accepted; mind you this is not something I have done before, so apologies ahead if I missed something.

Is this something you can help us with please? The target for now will be mostly the general apis, then over time we can expand into specific plugin based apis.

Kind regards

Should a setup state also pass an assertion?

Thanks for making this code available. Very useful indeed.

I am new to python/appdaemon testing and was debugging a test case, but should the commented out assertions below not return true? If I comment the line out it passes okay.

test code

from appdaemon_testing.pytest import automation_fixture
from appdaemon_testing.pytest import mock
from apps.automation import Automation

@automation_fixture(
    Automation,
    args={
    },
)

def automation() -> Automation:
    pass

...
def test_not_is_dusk(hass_driver, automation: Automation):
    with hass_driver.setup():
        hass_driver.set_state('sun.sun', 0, attribute_name='elevation')
    # assert automation.get_state('sun.sun', attribute_name='elevation') == 0 # <<<<<<<<<<<<<<<<<<<<<<
    assert not automation.is_dusk()

def test_is_dusk(hass_driver, automation: Automation):
    with hass_driver.setup():
        hass_driver.set_state('sun.sun', -4, attribute_name='elevation')
    # assert automation.get_state('sun.sun', attribute_name='elevation') == -4 # <<<<<<<<<<<<<<<<<<<<<<
    assert automation.is_dusk()

code under test

class Automation(hass.Hass):
...
    def get_sun_elevation(self):
        elev = self.get_state('sun.sun', attribute='elevation')
        self.log(f'   elev ({elev:2.2f})', level='DEBUG')
        return elev

    def is_dusk(self):
        elev = self.get_sun_elevation()
        dusk = elev < -3
        t = 'is' if dusk else 'is not'
        self.log(f'   {t} dusk', level='DEBUG')
        return dusk
...

Fails to install with python 3.12 due to aiohttp and uvloop dependencies

Very useful for my testing but hasn't been updated in some time. Now fails with python 3.12.

What happens:

(venv) ~ # pip install appdaemon-testing 
Collecting appdaemon-testing
  Using cached appdaemon_testing-0.1.4-py3-none-any.whl.metadata (5.7 kB)
Collecting appdaemon (from appdaemon-testing)
  Using cached appdaemon-4.4.2-py3-none-any.whl.metadata (15 kB)
Collecting aiohttp~=3.8.4 (from appdaemon->appdaemon-testing)
  Using cached aiohttp-3.8.6.tar.gz (7.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting aiohttp-jinja2~=1.5.1 (from appdaemon->appdaemon-testing)
  Using cached aiohttp_jinja2-1.5.1-py3-none-any.whl.metadata (8.1 kB)
Collecting astral~=3.2 (from appdaemon->appdaemon-testing)
  Using cached astral-3.2-py3-none-any.whl.metadata (1.7 kB)
Collecting bcrypt~=4.0.1 (from appdaemon->appdaemon-testing)
  Using cached bcrypt-4.0.1-cp36-abi3-musllinux_1_1_aarch64.whl.metadata (9.0 kB)
Collecting deepdiff==6.3.0 (from appdaemon->appdaemon-testing)
  Using cached deepdiff-6.3.0-py3-none-any.whl.metadata (4.7 kB)
Collecting feedparser~=6.0.10 (from appdaemon->appdaemon-testing)
  Using cached feedparser-6.0.11-py3-none-any.whl.metadata (2.4 kB)
Collecting iso8601~=1.1.0 (from appdaemon->appdaemon-testing)
  Using cached iso8601-1.1.0-py3-none-any.whl.metadata (9.8 kB)
Collecting paho-mqtt~=1.6.1 (from appdaemon->appdaemon-testing)
  Using cached paho_mqtt-1.6.1-py3-none-any.whl
Collecting pid~=3.0.4 (from appdaemon->appdaemon-testing)
  Using cached pid-3.0.4-py2.py3-none-any.whl.metadata (5.0 kB)
Collecting python-dateutil~=2.8.2 (from appdaemon->appdaemon-testing)
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl.metadata (8.2 kB)
Collecting python-socketio<5.9,>=5.5 (from appdaemon->appdaemon-testing)
  Using cached python_socketio-5.8.0-py3-none-any.whl.metadata (3.2 kB)
Collecting pytz<2023.4.0,>=2022.7.1 (from appdaemon->appdaemon-testing)
  Using cached pytz-2023.3.post1-py2.py3-none-any.whl.metadata (22 kB)
Collecting pyyaml~=6.0 (from appdaemon->appdaemon-testing)
  Using cached PyYAML-6.0.1-cp312-cp312-linux_aarch64.whl
Collecting requests~=2.28.2 (from appdaemon->appdaemon-testing)
  Using cached requests-2.28.2-py3-none-any.whl.metadata (4.6 kB)
Collecting sockjs~=0.11.0 (from appdaemon->appdaemon-testing)
  Using cached sockjs-0.11.0-py3-none-any.whl.metadata (5.4 kB)
Collecting websocket-client~=1.5.1 (from appdaemon->appdaemon-testing)
  Using cached websocket_client-1.5.3-py3-none-any.whl.metadata (7.6 kB)
Collecting tomli~=2.0.1 (from appdaemon->appdaemon-testing)
  Using cached tomli-2.0.1-py3-none-any.whl.metadata (8.9 kB)
Collecting tomli-w~=1.0.0 (from appdaemon->appdaemon-testing)
  Using cached tomli_w-1.0.0-py3-none-any.whl.metadata (4.9 kB)
Collecting uvloop==0.17.0 (from appdaemon->appdaemon-testing)
  Using cached uvloop-0.17.0.tar.gz (2.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting ordered-set<4.2.0,>=4.0.2 (from deepdiff==6.3.0->appdaemon->appdaemon-testing)
  Using cached ordered_set-4.1.0-py3-none-any.whl.metadata (5.3 kB)
Requirement already satisfied: attrs>=17.3.0 in ./venv/lib/python3.12/site-packages (from aiohttp~=3.8.4->appdaemon->appdaemon-testing) (23.2.0)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in ./venv/lib/python3.12/site-packages (from aiohttp~=3.8.4->appdaemon->appdaemon-testing) (3.3.2)
Requirement already satisfied: multidict<7.0,>=4.5 in ./venv/lib/python3.12/site-packages (from aiohttp~=3.8.4->appdaemon->appdaemon-testing) (6.0.5)
Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp~=3.8.4->appdaemon->appdaemon-testing)
  Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: yarl<2.0,>=1.0 in ./venv/lib/python3.12/site-packages (from aiohttp~=3.8.4->appdaemon->appdaemon-testing) (1.9.4)
Requirement already satisfied: frozenlist>=1.1.1 in ./venv/lib/python3.12/site-packages (from aiohttp~=3.8.4->appdaemon->appdaemon-testing) (1.4.1)
Requirement already satisfied: aiosignal>=1.1.2 in ./venv/lib/python3.12/site-packages (from aiohttp~=3.8.4->appdaemon->appdaemon-testing) (1.3.1)
Collecting jinja2>=3.0.0 (from aiohttp-jinja2~=1.5.1->appdaemon->appdaemon-testing)
  Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting sgmllib3k (from feedparser~=6.0.10->appdaemon->appdaemon-testing)
  Using cached sgmllib3k-1.0.0-py3-none-any.whl
Requirement already satisfied: six>=1.5 in ./venv/lib/python3.12/site-packages (from python-dateutil~=2.8.2->appdaemon->appdaemon-testing) (1.16.0)
Collecting bidict>=0.21.0 (from python-socketio<5.9,>=5.5->appdaemon->appdaemon-testing)
  Using cached bidict-0.23.1-py3-none-any.whl.metadata (8.7 kB)
Collecting python-engineio>=4.3.0 (from python-socketio<5.9,>=5.5->appdaemon->appdaemon-testing)
  Using cached python_engineio-4.9.1-py3-none-any.whl.metadata (2.2 kB)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.12/site-packages (from requests~=2.28.2->appdaemon->appdaemon-testing) (3.7)
Collecting urllib3<1.27,>=1.21.1 (from requests~=2.28.2->appdaemon->appdaemon-testing)
  Using cached urllib3-1.26.18-py2.py3-none-any.whl.metadata (48 kB)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.12/site-packages (from requests~=2.28.2->appdaemon->appdaemon-testing) (2024.2.2)
Collecting MarkupSafe>=2.0 (from jinja2>=3.0.0->aiohttp-jinja2~=1.5.1->appdaemon->appdaemon-testing)
  Using cached MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl.metadata (3.0 kB)
Collecting simple-websocket>=0.10.0 (from python-engineio>=4.3.0->python-socketio<5.9,>=5.5->appdaemon->appdaemon-testing)
  Using cached simple_websocket-1.0.0-py3-none-any.whl.metadata (1.3 kB)
Collecting wsproto (from simple-websocket>=0.10.0->python-engineio>=4.3.0->python-socketio<5.9,>=5.5->appdaemon->appdaemon-testing)
  Using cached wsproto-1.2.0-py3-none-any.whl.metadata (5.6 kB)
Collecting h11<1,>=0.9.0 (from wsproto->simple-websocket>=0.10.0->python-engineio>=4.3.0->python-socketio<5.9,>=5.5->appdaemon->appdaemon-testing)
  Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)
Using cached appdaemon_testing-0.1.4-py3-none-any.whl (6.6 kB)
Using cached appdaemon-4.4.2-py3-none-any.whl (9.1 MB)
Using cached deepdiff-6.3.0-py3-none-any.whl (69 kB)
Using cached aiohttp_jinja2-1.5.1-py3-none-any.whl (11 kB)
Using cached astral-3.2-py3-none-any.whl (38 kB)
Using cached bcrypt-4.0.1-cp36-abi3-musllinux_1_1_aarch64.whl (613 kB)
Using cached feedparser-6.0.11-py3-none-any.whl (81 kB)
Using cached iso8601-1.1.0-py3-none-any.whl (9.9 kB)
Using cached pid-3.0.4-py2.py3-none-any.whl (11 kB)
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Using cached python_socketio-5.8.0-py3-none-any.whl (56 kB)
Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Using cached sockjs-0.11.0-py3-none-any.whl (23 kB)
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Using cached tomli_w-1.0.0-py3-none-any.whl (6.0 kB)
Using cached websocket_client-1.5.3-py3-none-any.whl (56 kB)
Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Using cached bidict-0.23.1-py3-none-any.whl (32 kB)
Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)
Using cached ordered_set-4.1.0-py3-none-any.whl (7.6 kB)
Using cached python_engineio-4.9.1-py3-none-any.whl (57 kB)
Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Using cached MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl (33 kB)
Using cached simple_websocket-1.0.0-py3-none-any.whl (13 kB)
Using cached wsproto-1.2.0-py3-none-any.whl (24 kB)
Using cached h11-0.14.0-py3-none-any.whl (58 kB)
Building wheels for collected packages: uvloop, aiohttp
  Building wheel for uvloop (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  ร— Building wheel for uvloop (pyproject.toml) did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [240 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-312
      creating build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/_noop.py -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/__init__.py -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/_version.py -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/_testbase.py -> build/lib.linux-aarch64-cpython-312/uvloop
      running egg_info
      writing uvloop.egg-info/PKG-INFO
      writing dependency_links to uvloop.egg-info/dependency_links.txt
      writing requirements to uvloop.egg-info/requires.txt
      writing top-level names to uvloop.egg-info/top_level.txt
      reading manifest file 'uvloop.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
      adding license file 'LICENSE-APACHE'
      adding license file 'LICENSE-MIT'
      writing manifest file 'uvloop.egg-info/SOURCES.txt'
      /tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'uvloop.handles' is absent from the `packages` configuration.
      !!
      
              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'uvloop.handles' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.
      
              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'uvloop.handles' is explicitly added
              to the `packages` configuration field.
      
              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).
      
              You can read more about "package discovery" on setuptools documentation page:
      
              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
      
              If you don't want 'uvloop.handles' to be distributed and are
              already explicitly excluding 'uvloop.handles' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.
      
              You can read more about "package data files" on setuptools documentation page:
      
              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
      
      
              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************
      
      !!
        check.warn(importable)
      /tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'uvloop.includes' is absent from the `packages` configuration.
      !!
      
              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'uvloop.includes' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.
      
              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'uvloop.includes' is explicitly added
              to the `packages` configuration field.
      
              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).
      
              You can read more about "package discovery" on setuptools documentation page:
      
              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
      
              If you don't want 'uvloop.includes' to be distributed and are
              already explicitly excluding 'uvloop.includes' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.
      
              You can read more about "package data files" on setuptools documentation page:
      
              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
      
      
              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************
      
      !!
        check.warn(importable)
      copying uvloop/cbhandles.pxd -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/cbhandles.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/dns.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/errors.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/loop.c -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/loop.pxd -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/loop.pyi -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/loop.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/lru.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/pseudosock.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/py.typed -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/request.pxd -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/request.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/server.pxd -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/server.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/sslproto.pxd -> build/lib.linux-aarch64-cpython-312/uvloop
      copying uvloop/sslproto.pyx -> build/lib.linux-aarch64-cpython-312/uvloop
      creating build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/async_.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/async_.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/basetransport.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/basetransport.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/check.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/check.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/fsevent.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/fsevent.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/handle.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/handle.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/idle.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/idle.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/pipe.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/pipe.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/poll.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/poll.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/process.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/process.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/stream.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/stream.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/streamserver.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/streamserver.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/tcp.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/tcp.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/timer.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/timer.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/udp.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      copying uvloop/handles/udp.pyx -> build/lib.linux-aarch64-cpython-312/uvloop/handles
      creating build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/__init__.py -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/compat.h -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/consts.pxi -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/debug.h -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/debug.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/fork_handler.h -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/python.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/stdlib.pxi -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/system.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      copying uvloop/includes/uv.pxd -> build/lib.linux-aarch64-cpython-312/uvloop/includes
      running build_ext
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether build environment is sane... yes
      checking for a race-free mkdir -p... ./install-sh -c -d
      checking for gawk... no
      checking for mawk... no
      checking for nawk... no
      checking for awk... awk
      checking whether make sets $(MAKE)... no
      checking whether make supports nested variables... no
      checking build system type... aarch64-unknown-linux-musl
      checking host system type... aarch64-unknown-linux-musl
      checking for gcc... no
      checking for cc... no
      checking for cl.exe... no
      checking for clang... no
      configure: error: in `/tmp/pip-install-qsgkb5fp/uvloop_a29779dd9b9c4630ae7392c4a6538141/build/libuv-aarch64':
      configure: error: no acceptable C compiler found in $PATH
      See `config.log' for more details
      Traceback (most recent call last):
        File "/root/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/root/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 410, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 272, in <module>
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-n9xaeb6y/normal/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 91, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-n9xaeb6y/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
          self.build_extensions()
        File "<string>", line 231, in build_extensions
        File "<string>", line 210, in build_libuv
        File "/usr/lib/python3.12/subprocess.py", line 571, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['./configure']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for uvloop
  Building wheel for aiohttp (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  ร— Building wheel for aiohttp (pyproject.toml) did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [97 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-312
      creating build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_exceptions.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/abc.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/helpers.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/cookiejar.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_request.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_protocol.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/tcp_helpers.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_response.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_urldispatcher.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_app.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/client.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/typedefs.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/http_parser.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/pytest_plugin.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_middlewares.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_routedef.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/client_ws.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/tracing.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_server.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/hdrs.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/formdata.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/payload_streamer.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_ws.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/resolver.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/http_exceptions.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/connector.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/payload.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/__init__.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/log.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/test_utils.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_fileresponse.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/client_reqrep.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/client_proto.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_log.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/streams.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/base_protocol.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/locks.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/worker.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/multipart.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/http_websocket.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/http.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/http_writer.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/client_exceptions.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/web_runner.py -> build/lib.linux-aarch64-cpython-312/aiohttp
      running egg_info
      writing aiohttp.egg-info/PKG-INFO
      writing dependency_links to aiohttp.egg-info/dependency_links.txt
      writing requirements to aiohttp.egg-info/requires.txt
      writing top-level names to aiohttp.egg-info/top_level.txt
      reading manifest file 'aiohttp.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'aiohttp' anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '*.lib' found anywhere in distribution
      warning: no previously-included files matching '*.dll' found anywhere in distribution
      warning: no previously-included files matching '*.a' found anywhere in distribution
      warning: no previously-included files matching '*.obj' found anywhere in distribution
      warning: no previously-included files found matching 'aiohttp/*.html'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE.txt'
      writing manifest file 'aiohttp.egg-info/SOURCES.txt'
      copying aiohttp/_cparser.pxd -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_find_header.pxd -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_headers.pxi -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_helpers.pyi -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_helpers.pyx -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_http_parser.pyx -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_http_writer.pyx -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/_websocket.pyx -> build/lib.linux-aarch64-cpython-312/aiohttp
      copying aiohttp/py.typed -> build/lib.linux-aarch64-cpython-312/aiohttp
      creating build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_cparser.pxd.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_find_header.pxd.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_helpers.pyi.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_helpers.pyx.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_http_parser.pyx.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_http_writer.pyx.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/_websocket.pyx.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      copying aiohttp/.hash/hdrs.py.hash -> build/lib.linux-aarch64-cpython-312/aiohttp/.hash
      running build_ext
      building 'aiohttp._websocket' extension
      creating build/temp.linux-aarch64-cpython-312
      creating build/temp.linux-aarch64-cpython-312/aiohttp
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/root/venv/include -I/usr/include/python3.12 -c aiohttp/_websocket.c -o build/temp.linux-aarch64-cpython-312/aiohttp/_websocket.o
      error: command 'gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for aiohttp
Failed to build uvloop aiohttp
ERROR: Could not build wheels for uvloop, aiohttp, which is required to install pyproject.toml-based projects
(venv) ~ # 

uvloop version 0.19.0 and aiohttp 3.9.0 will build independently.

Any chance of a refresh or a clue as to what needs to change?

Thanks
-paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.