Repository: MatthewFlamm/pytest-homeassistant-custom-component (language: python)

Issue:
Python 3.11
Home Assistant 2023.2.0 supports Python 3.11. So I tried to test my custom components in Python 3.11.2.
Created new venv, installed homeassistant 2023.3.0b7, pytest-homeassistant-custom-component 0.13.3.
Running pytest throws an error:
```
File "/Users/vasek/GitHub/Holidays/venv11/lib/python3.11/site-packages/pytest_homeassistant_custom_component/plugins.py", line 116, in <module>
from .asyncio_legacy import legacy_coroutine
ModuleNotFoundError: No module named 'pytest_homeassistant_custom_component.asyncio_legacy'
```
I have verified that pytest_homeassistant_custom_component really does not contain asyncio_legacy.


Discussion / hints:
I have 3/4 of a mind to just wait until this resolves itself, but there also should be no problem to fix it temporarily in the meantime.

https://github.com/home-assistant/core/pull/88560

Fix patch:
diff --git a/README.md b/README.md
index 0efb597..6cfc3c6 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,7 @@ This repository is set up to be nearly fully automatic.
 
 * Version of home-assistant/core is given in `ha_version`, `pytest_homeassistant_custom_component.const`, and in the README above.
 * This package is generated against published releases of homeassistant and updated daily.
+* PRs should not include changes to the `pytest_homeassistant_custom_component` files.  CI testing will automatically generate the new files.
 
 ### Version Strategy
 * When changes in extraction are required, there will be a change in the minor version.
diff --git a/generate_phacc/const.py b/generate_phacc/const.py
index 3500d99..99828cf 100644
--- a/generate_phacc/const.py
+++ b/generate_phacc/const.py
@@ -12,12 +12,13 @@
 
 files = [
     "__init__.py",
+    "asyncio_legacy.py",  # remove when it is not longer needed
     "common.py",
     "conftest.py",
     "ignore_uncaught_exceptions.py",
     "components/recorder/common.py",
     "syrupy.py",
-    "typing.py"
+    "typing.py",
 ]
 
 # remove requirements for development only, i.e not related to homeassistant tests


Test patch:
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index 4145c4d..6767edd 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -15,7 +15,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.10"]
+        python-version: ["3.10", "3.11"]
 
     steps:
     - uses: actions/checkout@v2
@@ -23,9 +23,28 @@ jobs:
       uses: actions/setup-python@v1
       with:
         python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
+    - name: Install dependencies generate
       run: |
         python -m pip install --upgrade pip
+        pip install -r requirements_generate.txt
+    - name: execute generate package
+      run: |
+        export PYTHONPATH=$PYTHONPATH:$(pwd)
+        python generate_phacc/generate_phacc.py --regen
+    - name: list files
+      run: ls -a
+    - name: publish artifact
+      uses: actions/upload-artifact@v2
+      with:
+        name: generated-package
+        path: |
+          ./
+          !**/*.pyc
+          !tmp_dir/
+          !.git/
+        if-no-files-found: error
+    - name: Install dependencies test
+      run: |
         pip install -e .
     - name: Test with pytest
       run: |