From f4d0978d405af910774084ec5d7b1f3b089a5411 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 22 Jul 2023 20:36:03 +0200 Subject: [PATCH 01/11] Update ci * Add 3.12 * Always save pip wheel cache * Increase timeout * Add -v flag * Use only one worker per job * Update pylint - add disable --- .github/workflows/ci.yaml | 38 +++++++++++++++++++++++--------------- pyproject.toml | 2 ++ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4a7ad03f218344..c6ad866a71ef42 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,13 +33,13 @@ on: type: boolean env: - CACHE_VERSION: 5 + CACHE_VERSION: 5-c1 PIP_CACHE_VERSION: 4 MYPY_CACHE_VERSION: 5 BLACK_CACHE_VERSION: 1 HA_SHORT_VERSION: "2023.11" DEFAULT_PYTHON: "3.11" - ALL_PYTHON_VERSIONS: "['3.11']" + ALL_PYTHON_VERSIONS: "['3.11', '3.12']" # 10.3 is the oldest supported version # - 10.3.32 is the version currently shipped with Synology (as of 17 Feb 2022) # 10.6 is the current long-term-support @@ -61,9 +61,9 @@ env: PYTHONASYNCIODEBUG: 1 HASS_CI: 1 -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} +# cancel-in-progress: true jobs: info: @@ -472,8 +472,9 @@ jobs: name: Prepare dependencies runs-on: ubuntu-22.04 needs: info - timeout-minutes: 60 + timeout-minutes: 120 strategy: + fail-fast: false matrix: python-version: ${{ fromJSON(needs.info.outputs.python_versions) }} steps: @@ -501,7 +502,7 @@ jobs: needs.info.outputs.python_cache_key }} - name: Restore pip wheel cache if: steps.cache-venv.outputs.cache-hit != 'true' - uses: actions/cache@v3.3.2 + uses: actions/cache/restore@v3.3.2 with: path: ${{ env.PIP_CACHE }} key: >- @@ -534,6 +535,16 @@ jobs: PIP_CACHE_DIR=$PIP_CACHE pip install -r requirements_all.txt PIP_CACHE_DIR=$PIP_CACHE pip install -r requirements_test.txt pip install -e . --config-settings editable_mode=compat + - name: Save pip wheel cache + if: | + steps.cache-venv.outputs.cache-hit != 'true' + && (success() || failure()) + uses: actions/cache/save@v3.3.2 + with: + path: ${{ env.PIP_CACHE }} + key: >- + ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ + steps.generate-pip-key.outputs.key }} hassfest: name: Check hassfest @@ -717,16 +728,11 @@ jobs: needs: - info - base - - gen-requirements-all - - hassfest - - lint-other - - lint-ruff - - mypy strategy: fail-fast: false matrix: group: ${{ fromJson(needs.info.outputs.test_groups) }} - python-version: ${{ fromJson(needs.info.outputs.python_versions) }} + python-version: ["3.12"] name: >- Run tests Python ${{ matrix.python-version }} (${{ matrix.group }}) steps: @@ -860,7 +866,8 @@ jobs: MYSQL_ROOT_PASSWORD: password options: --health-cmd="mysqladmin ping -uroot -ppassword" --health-interval=5s --health-timeout=2s --health-retries=3 if: | - (github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core') + false + && (github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core') && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' @@ -984,7 +991,8 @@ jobs: POSTGRES_PASSWORD: password options: --health-cmd="pg_isready -hlocalhost -Upostgres" --health-interval=5s --health-timeout=2s --health-retries=3 if: | - (github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core') + false + && (github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core') && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' diff --git a/pyproject.toml b/pyproject.toml index 9b8642172ce8c7..39181a38aaa5d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -161,6 +161,8 @@ disable = [ "consider-using-f-string", "consider-using-namedtuple-or-dataclass", "consider-using-assignment-expr", + "deprecated-module", + "no-name-in-module", # Handled by ruff # Ref: From c942d169402b614714792dc4f9677ed7aa20cadd Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:57:42 +0200 Subject: [PATCH 02/11] Add classifer for 3.12 --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 39181a38aaa5d0..b63ee55f378834 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Home Automation", ] requires-python = ">=3.11.0" From 74b784ea13fc0db13bcb4181715b16c5bf8babbb Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 18 Jul 2023 02:21:03 +0200 Subject: [PATCH 03/11] Update RestrictedPython to 7.0a1.dev0 --- homeassistant/components/python_script/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/python_script/manifest.json b/homeassistant/components/python_script/manifest.json index 80ed6164e74b06..2b5c79050f8cd8 100644 --- a/homeassistant/components/python_script/manifest.json +++ b/homeassistant/components/python_script/manifest.json @@ -5,5 +5,5 @@ "documentation": "https://www.home-assistant.io/integrations/python_script", "loggers": ["RestrictedPython"], "quality_scale": "internal", - "requirements": ["RestrictedPython==6.2"] + "requirements": ["RestrictedPython==7.0a1.dev0"] } diff --git a/requirements_all.txt b/requirements_all.txt index e5eeaaa48f6500..f49c707d97f021 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -122,7 +122,7 @@ PyXiaomiGateway==0.14.3 RachioPy==1.0.3 # homeassistant.components.python_script -RestrictedPython==6.2 +RestrictedPython==7.0a1.dev0 # homeassistant.components.remember_the_milk RtmAPI==0.7.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 6f08b72228df96..d41555191d867a 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -109,7 +109,7 @@ PyXiaomiGateway==0.14.3 RachioPy==1.0.3 # homeassistant.components.python_script -RestrictedPython==6.2 +RestrictedPython==7.0a1.dev0 # homeassistant.components.remember_the_milk RtmAPI==0.7.2 From 7b2880476018f81abcf47ac21f70989b43c4efd9 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 18 Jul 2023 02:39:49 +0200 Subject: [PATCH 04/11] Disable datapoint --- homeassistant/components/metoffice/manifest.json | 1 + requirements_all.txt | 3 --- requirements_test_all.txt | 3 --- tests/components/metoffice/conftest.py | 5 ++++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/metoffice/manifest.json b/homeassistant/components/metoffice/manifest.json index cfe6e6de9cd4d9..b16a68378aa7a2 100644 --- a/homeassistant/components/metoffice/manifest.json +++ b/homeassistant/components/metoffice/manifest.json @@ -3,6 +3,7 @@ "name": "Met Office", "codeowners": ["@MrHarcombe", "@avee87"], "config_flow": true, + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/metoffice", "iot_class": "cloud_polling", "loggers": ["datapoint"], diff --git a/requirements_all.txt b/requirements_all.txt index f49c707d97f021..63896d8c1491a9 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -641,9 +641,6 @@ crownstone-uart==2.1.0 # homeassistant.components.datadog datadog==0.15.0 -# homeassistant.components.metoffice -datapoint==0.9.8 - # homeassistant.components.bluetooth dbus-fast==2.11.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index d41555191d867a..f00161b961de09 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -524,9 +524,6 @@ crownstone-uart==2.1.0 # homeassistant.components.datadog datadog==0.15.0 -# homeassistant.components.metoffice -datapoint==0.9.8 - # homeassistant.components.bluetooth dbus-fast==2.11.1 diff --git a/tests/components/metoffice/conftest.py b/tests/components/metoffice/conftest.py index b1d1c9f508e27c..0b82ac3fb7fabb 100644 --- a/tests/components/metoffice/conftest.py +++ b/tests/components/metoffice/conftest.py @@ -1,9 +1,12 @@ """Fixtures for Met Office weather integration tests.""" +# ruff: noqa: F821 from unittest.mock import patch -from datapoint.exceptions import APIException +# from datapoint.exceptions import APIException import pytest +collect_ignore_glob = ["test_*.py"] + @pytest.fixture def mock_simple_manager_fail(): From 8209b327dec377c582e01a1917d6ef158ce7ebaa Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 18 Jul 2023 03:07:48 +0200 Subject: [PATCH 05/11] Disable webexteamssdk --- homeassistant/components/cisco_webex_teams/manifest.json | 1 + requirements_all.txt | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/cisco_webex_teams/manifest.json b/homeassistant/components/cisco_webex_teams/manifest.json index 4fe333f40a5b7d..3d3d5e57741900 100644 --- a/homeassistant/components/cisco_webex_teams/manifest.json +++ b/homeassistant/components/cisco_webex_teams/manifest.json @@ -2,6 +2,7 @@ "domain": "cisco_webex_teams", "name": "Cisco Webex Teams", "codeowners": ["@fbradyirl"], + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/cisco_webex_teams", "iot_class": "cloud_push", "loggers": ["webexteamssdk"], diff --git a/requirements_all.txt b/requirements_all.txt index 63896d8c1491a9..989c0bb3eba1a7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2693,9 +2693,6 @@ watchdog==2.3.1 # homeassistant.components.waterfurnace waterfurnace==1.1.0 -# homeassistant.components.cisco_webex_teams -webexteamssdk==1.1.1 - # homeassistant.components.assist_pipeline webrtc-noise-gain==1.2.3 From c790db5829d13a0d41c23fc71b841a004096a69c Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:02:59 +0200 Subject: [PATCH 06/11] Disable aiokafka --- homeassistant/components/apache_kafka/manifest.json | 1 + requirements_all.txt | 3 --- requirements_test_all.txt | 3 --- tests/components/apache_kafka/conftest.py | 3 +++ 4 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 tests/components/apache_kafka/conftest.py diff --git a/homeassistant/components/apache_kafka/manifest.json b/homeassistant/components/apache_kafka/manifest.json index 11cb0ece7acc31..9a20a5750904bb 100644 --- a/homeassistant/components/apache_kafka/manifest.json +++ b/homeassistant/components/apache_kafka/manifest.json @@ -2,6 +2,7 @@ "domain": "apache_kafka", "name": "Apache Kafka", "codeowners": ["@bachya"], + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/apache_kafka", "iot_class": "local_push", "loggers": ["aiokafka", "kafka_python"], diff --git a/requirements_all.txt b/requirements_all.txt index 989c0bb3eba1a7..21ed82d5f7f17d 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -261,9 +261,6 @@ aiohue==4.7.0 # homeassistant.components.imap aioimaplib==1.0.1 -# homeassistant.components.apache_kafka -aiokafka==0.7.2 - # homeassistant.components.kef aiokef==0.2.16 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index f00161b961de09..53b43c1e863579 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -239,9 +239,6 @@ aiohue==4.7.0 # homeassistant.components.imap aioimaplib==1.0.1 -# homeassistant.components.apache_kafka -aiokafka==0.7.2 - # homeassistant.components.lifx aiolifx-effects==0.3.2 diff --git a/tests/components/apache_kafka/conftest.py b/tests/components/apache_kafka/conftest.py new file mode 100644 index 00000000000000..b93cb082fd266a --- /dev/null +++ b/tests/components/apache_kafka/conftest.py @@ -0,0 +1,3 @@ +"""Skip test collection.""" + +collect_ignore_glob = ["test_*.py"] From 95e2ef7e2e6053ad493b5cfc86461cda8912b343 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:03:57 +0200 Subject: [PATCH 07/11] Disable vulcan-api --- homeassistant/components/vulcan/manifest.json | 1 + requirements_all.txt | 3 --- requirements_test_all.txt | 3 --- tests/components/vulcan/conftest.py | 3 +++ 4 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 tests/components/vulcan/conftest.py diff --git a/homeassistant/components/vulcan/manifest.json b/homeassistant/components/vulcan/manifest.json index fea87480cf0dec..d732310e1349f8 100644 --- a/homeassistant/components/vulcan/manifest.json +++ b/homeassistant/components/vulcan/manifest.json @@ -3,6 +3,7 @@ "name": "Uonet+ Vulcan", "codeowners": ["@Antoni-Czaplicki"], "config_flow": true, + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/vulcan", "iot_class": "cloud_polling", "quality_scale": "silver", diff --git a/requirements_all.txt b/requirements_all.txt index 21ed82d5f7f17d..691c7332c9398b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2671,9 +2671,6 @@ vsure==2.6.6 # homeassistant.components.vasttrafik vtjp==0.1.14 -# homeassistant.components.vulcan -vulcan-api==2.3.0 - # homeassistant.components.vultr vultr==0.1.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 53b43c1e863579..1fdd2913c6e2cf 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1983,9 +1983,6 @@ volvooncall==0.10.3 # homeassistant.components.verisure vsure==2.6.6 -# homeassistant.components.vulcan -vulcan-api==2.3.0 - # homeassistant.components.vultr vultr==0.1.2 diff --git a/tests/components/vulcan/conftest.py b/tests/components/vulcan/conftest.py new file mode 100644 index 00000000000000..b93cb082fd266a --- /dev/null +++ b/tests/components/vulcan/conftest.py @@ -0,0 +1,3 @@ +"""Skip test collection.""" + +collect_ignore_glob = ["test_*.py"] From baf27e79c03b6d04fabd01535181e5c80ac102b6 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:25:00 +0200 Subject: [PATCH 08/11] Disable pysnmplib --- homeassistant/components/brother/manifest.json | 1 + homeassistant/components/snmp/manifest.json | 1 + requirements_all.txt | 6 ------ requirements_test_all.txt | 6 ------ tests/components/brother/__init__.py | 3 ++- tests/components/brother/conftest.py | 2 ++ tests/components/snmp/conftest.py | 3 +++ 7 files changed, 9 insertions(+), 13 deletions(-) create mode 100644 tests/components/snmp/conftest.py diff --git a/homeassistant/components/brother/manifest.json b/homeassistant/components/brother/manifest.json index cba44b68c6ac44..7a40fb63bc7a10 100644 --- a/homeassistant/components/brother/manifest.json +++ b/homeassistant/components/brother/manifest.json @@ -3,6 +3,7 @@ "name": "Brother Printer", "codeowners": ["@bieniu"], "config_flow": true, + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/brother", "integration_type": "device", "iot_class": "local_polling", diff --git a/homeassistant/components/snmp/manifest.json b/homeassistant/components/snmp/manifest.json index 324a1e493661c3..cb9fd4702ad021 100644 --- a/homeassistant/components/snmp/manifest.json +++ b/homeassistant/components/snmp/manifest.json @@ -2,6 +2,7 @@ "domain": "snmp", "name": "SNMP", "codeowners": [], + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/snmp", "iot_class": "local_polling", "loggers": ["pyasn1", "pysmi", "pysnmp"], diff --git a/requirements_all.txt b/requirements_all.txt index 691c7332c9398b..6f46487b72be4c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -565,9 +565,6 @@ boto3==1.28.17 # homeassistant.components.broadlink broadlink==0.18.3 -# homeassistant.components.brother -brother==2.3.0 - # homeassistant.components.brottsplatskartan brottsplatskartan==0.0.1 @@ -2037,9 +2034,6 @@ pysmartthings==0.7.8 # homeassistant.components.edl21 pysml==0.0.12 -# homeassistant.components.snmp -pysnmplib==5.0.21 - # homeassistant.components.snooz pysnooz==0.8.6 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 1fdd2913c6e2cf..51cf5e8ddcf8e9 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -475,9 +475,6 @@ boschshcpy==0.2.57 # homeassistant.components.broadlink broadlink==0.18.3 -# homeassistant.components.brother -brother==2.3.0 - # homeassistant.components.brottsplatskartan brottsplatskartan==0.0.1 @@ -1538,9 +1535,6 @@ pysmartthings==0.7.8 # homeassistant.components.edl21 pysml==0.0.12 -# homeassistant.components.snmp -pysnmplib==5.0.21 - # homeassistant.components.snooz pysnooz==0.8.6 diff --git a/tests/components/brother/__init__.py b/tests/components/brother/__init__.py index 8e24c2d8058f50..8dd27ffc887109 100644 --- a/tests/components/brother/__init__.py +++ b/tests/components/brother/__init__.py @@ -1,8 +1,9 @@ """Tests for Brother Printer integration.""" +# ruff: noqa: F821 import json from unittest.mock import patch -from homeassistant.components.brother.const import DOMAIN +# from homeassistant.components.brother.const import DOMAIN from homeassistant.const import CONF_HOST, CONF_TYPE from homeassistant.core import HomeAssistant diff --git a/tests/components/brother/conftest.py b/tests/components/brother/conftest.py index 9e81cce9d123cb..a667b37c59f3a5 100644 --- a/tests/components/brother/conftest.py +++ b/tests/components/brother/conftest.py @@ -4,6 +4,8 @@ import pytest +collect_ignore_glob = ["test_*.py"] + @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock, None, None]: diff --git a/tests/components/snmp/conftest.py b/tests/components/snmp/conftest.py new file mode 100644 index 00000000000000..b93cb082fd266a --- /dev/null +++ b/tests/components/snmp/conftest.py @@ -0,0 +1,3 @@ +"""Skip test collection.""" + +collect_ignore_glob = ["test_*.py"] From de14d476bcfec68da8e56ae335151a20a79b3e77 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 18 Jul 2023 04:15:12 +0200 Subject: [PATCH 09/11] Disable guppy3 --- homeassistant/components/profiler/manifest.json | 1 + requirements_all.txt | 9 --------- requirements_test_all.txt | 9 --------- tests/components/profiler/conftest.py | 3 +++ 4 files changed, 4 insertions(+), 18 deletions(-) create mode 100644 tests/components/profiler/conftest.py diff --git a/homeassistant/components/profiler/manifest.json b/homeassistant/components/profiler/manifest.json index 1b33c778843807..3939b71994b207 100644 --- a/homeassistant/components/profiler/manifest.json +++ b/homeassistant/components/profiler/manifest.json @@ -3,6 +3,7 @@ "name": "Profiler", "codeowners": ["@bdraco"], "config_flow": true, + "disabled": "Dependencies does not support Python 3.12", "documentation": "https://www.home-assistant.io/integrations/profiler", "quality_scale": "internal", "requirements": ["pyprof2calltree==1.4.5", "guppy3==3.1.3", "objgraph==3.5.0"] diff --git a/requirements_all.txt b/requirements_all.txt index 6f46487b72be4c..77df1dfaaf5fb3 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -929,9 +929,6 @@ gspread==5.5.0 # homeassistant.components.gstreamer gstreamer-player==1.1.2 -# homeassistant.components.profiler -guppy3==3.1.3 - # homeassistant.components.iaqualink h2==4.1.0 @@ -1319,9 +1316,6 @@ oasatelematics==0.3 # homeassistant.components.google oauth2client==4.1.3 -# homeassistant.components.profiler -objgraph==3.5.0 - # homeassistant.components.garages_amsterdam odp-amsterdam==5.3.1 @@ -1939,9 +1933,6 @@ pyplaato==0.0.18 # homeassistant.components.point pypoint==2.3.2 -# homeassistant.components.profiler -pyprof2calltree==1.4.5 - # homeassistant.components.prosegur pyprosegur==0.0.9 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 51cf5e8ddcf8e9..bc33a05726248c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -730,9 +730,6 @@ growattServer==1.3.0 # homeassistant.components.google_sheets gspread==5.5.0 -# homeassistant.components.profiler -guppy3==3.1.3 - # homeassistant.components.iaqualink h2==4.1.0 @@ -1021,9 +1018,6 @@ numpy==1.26.0 # homeassistant.components.google oauth2client==4.1.3 -# homeassistant.components.profiler -objgraph==3.5.0 - # homeassistant.components.garages_amsterdam odp-amsterdam==5.3.1 @@ -1461,9 +1455,6 @@ pyplaato==0.0.18 # homeassistant.components.point pypoint==2.3.2 -# homeassistant.components.profiler -pyprof2calltree==1.4.5 - # homeassistant.components.prosegur pyprosegur==0.0.9 diff --git a/tests/components/profiler/conftest.py b/tests/components/profiler/conftest.py new file mode 100644 index 00000000000000..b93cb082fd266a --- /dev/null +++ b/tests/components/profiler/conftest.py @@ -0,0 +1,3 @@ +"""Skip test collection.""" + +collect_ignore_glob = ["test_*.py"] From b6ced3289d969dac37aca9f99d5eddcca291d20c Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 10 Sep 2023 12:41:44 +0200 Subject: [PATCH 10/11] Install custom pytest --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c6ad866a71ef42..13b9c1d96cbb44 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -534,6 +534,7 @@ jobs: PIP_CACHE_DIR=$PIP_CACHE pip install -U "pip>=21.3.1" setuptools wheel PIP_CACHE_DIR=$PIP_CACHE pip install -r requirements_all.txt PIP_CACHE_DIR=$PIP_CACHE pip install -r requirements_test.txt + pip install --no-deps --force-reinstall git+https://github.com/pytest-dev/pytest.git@b73b4c464c6fa54f55a1c6ed8eaceb5529a161bb pip install -e . --config-settings editable_mode=compat - name: Save pip wheel cache if: | From bcb3b10caf5f57190ae294c6aaf3727cb6ae6106 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:38:44 +0200 Subject: [PATCH 11/11] Filter even more warnings --- pyproject.toml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b63ee55f378834..9ed9f3973316bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -423,8 +423,6 @@ log_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(threadName)s %(name)s:%( log_date_format = "%Y-%m-%d %H:%M:%S" asyncio_mode = "auto" filterwarnings = [ - "error::sqlalchemy.exc.SAWarning", - # -- HomeAssistant - aiohttp # Overwrite web.Application to pass a custom default argument to _make_request "ignore:Inheritance class HomeAssistantApplication from web.Application is discouraged:DeprecationWarning", @@ -442,6 +440,8 @@ filterwarnings = [ "ignore:ssl.TLSVersion.TLSv1 is deprecated:DeprecationWarning:elkm1_lib.util", # https://github.com/michaeldavie/env_canada/blob/v0.5.37/env_canada/ec_cache.py "ignore:Inheritance class CacheClientSession from ClientSession is discouraged:DeprecationWarning:env_canada.ec_cache", + # https://github.com/allenporter/ical/pull/215 - v5.0.0 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:ical.util", # https://github.com/bachya/regenmaschine/blob/2023.08.0/regenmaschine/client.py#L51 "ignore:ssl.TLSVersion.SSLv3 is deprecated:DeprecationWarning:regenmaschine.client", @@ -454,6 +454,13 @@ filterwarnings = [ # -- tracked upstream / open PRs # https://github.com/caronc/apprise/issues/659 - v1.4.5 "ignore:Use setlocale\\(\\), getencoding\\(\\) and getlocale\\(\\) instead:DeprecationWarning:apprise.AppriseLocal", + # https://github.com/kiorky/croniter/issues/49 - v1.4.1 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:croniter.croniter", + # https://github.com/spulec/freezegun/issues/508 - v1.2.2 + # https://github.com/spulec/freezegun/pull/511 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:freezegun.api", + # https://github.com/influxdata/influxdb-client-python/issues/603 - v1.37.0 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:influxdb_client.client.write.point", # https://github.com/beetbox/mediafile/issues/67 - v0.12.0 "ignore:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning:mediafile", # https://github.com/eclipse/paho.mqtt.python/issues/653 - v1.6.1 @@ -461,6 +468,8 @@ filterwarnings = [ "ignore:ssl.PROTOCOL_TLS is deprecated:DeprecationWarning:paho.mqtt.client", # https://github.com/PythonCharmers/python-future/issues/488 - v0.18.3 "ignore:the imp module is deprecated in favour of importlib and slated for removal in Python 3.12:DeprecationWarning:future.standard_library", + # https://github.com/frenck/python-toonapi/pull/9 - v0.2.1 - 2021-09-23 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:toonapi.models", # https://github.com/foxel/python_ndms2_client/issues/6 - v0.1.2 "ignore:'telnetlib' is deprecated and slated for removal in Python 3.13:DeprecationWarning:ndms2_client.connection", # https://github.com/pytest-dev/pytest-cov/issues/557 - v4.1.0 @@ -468,14 +477,37 @@ filterwarnings = [ "ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated:DeprecationWarning:xdist.plugin", # -- fixed, waiting for release / update + # https://github.com/ludeeus/aiogithubapi/pull/208 - >=23.9.0 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:aiogithubapi.namespaces.events", + # https://github.com/bachya/aiopurpleair/pull/200 - >2023.08.0 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:aiopurpleair.helpers.validators", + # https://github.com/scrapinghub/dateparser/pull/1179 - >1.1.8 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:dateparser.timezone_parser", + # https://github.com/zopefoundation/DateTime/pull/55 - >5.2 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:DateTime.pytz_support", # https://github.com/kurtmckee/feedparser/issues/330 - >6.0.10 "ignore:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:feedparser.encodings", # https://github.com/jaraco/jaraco.abode/commit/9e3e789efc96cddcaa15f920686bbeb79a7469e0 - update jaraco.abode to >=5.1.0 "ignore:`jaraco.functools.call_aside` is deprecated, use `jaraco.functools.invoke` instead:DeprecationWarning:jaraco.abode.helpers.timeline", # https://github.com/nextcord/nextcord/pull/1095 - >2.6.1 "ignore:pkg_resources is deprecated as an API:DeprecationWarning:nextcord.health_check", + # https://github.com/bachya/pytile/pull/280 - >2023.08.0 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:pytile.tile", + # https://github.com/rytilahti/python-miio/pull/1809 - >0.5.12 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:miio.protocol", + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:miio.miioprotocol", + # https://github.com/hunterjm/python-onvif-zeep-async/pull/51 - >3.1.12 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:onvif.client", + # Fixed upstream in python-telegram-bot - >=20.0 + "ignore:python-telegram-bot is using upstream urllib3:UserWarning:telegram.utils.request", + # https://github.com/ludeeus/pytraccar/pull/15 - >1.0.0 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:pytraccar.client", + # https://github.com/zopefoundation/RestrictedPython/pull/259 - >=7.0a1.dev0 + "ignore:ast\\.(Str|Num) is deprecated and will be removed in Python 3.14:DeprecationWarning:RestrictedPython.transformer", # https://github.com/grahamwetzler/smart-meter-texas/pull/143 - >0.5.3 "ignore:ssl.OP_NO_SSL\\*/ssl.OP_NO_TLS\\* options are deprecated:DeprecationWarning:smart_meter_texas", + # https://github.com/Bluetooth-Devices/xiaomi-ble/pull/59 - >0.21.1 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:xiaomi_ble.parser", # -- not helpful # pyatmo.__init__ imports deprecated moduls from itself - v7.5.0 @@ -498,10 +530,13 @@ filterwarnings = [ "ignore:with timeout\\(\\) is deprecated:DeprecationWarning:aiomodernforms.modernforms", # https://pypi.org/project/directv/ - v0.4.0 - 2020-09-12 "ignore:with timeout\\(\\) is deprecated:DeprecationWarning:directv.directv", + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:directv.models", # https://pypi.org/project/emulated-roku/ - v0.2.1 - 2020-01-23 (archived) "ignore:loop argument is deprecated:DeprecationWarning:emulated_roku", # https://pypi.org/project/foobot_async/ - v1.0.0 - 2020-11-24 "ignore:with timeout\\(\\) is deprecated:DeprecationWarning:foobot_async", + # https://pypi.org/project/influxdb/ - v5.3.1 - 2020-11-11 (archived) + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:influxdb.line_protocol", # https://pypi.org/project/lark-parser/ - v0.12.0 - 2021-08-30 -> moved to `lark` # https://pypi.org/project/commentjson/ - v0.9.0 - 2020-10-05 # https://github.com/vaidik/commentjson/issues/51 @@ -510,17 +545,46 @@ filterwarnings = [ "ignore:module '(sre_parse|sre_constants)' is deprecate:DeprecationWarning:lark.utils", # https://pypi.org/project/lomond/ - v0.3.3 - 2018-09-21 "ignore:ssl.PROTOCOL_TLS is deprecated:DeprecationWarning:lomond.session", + # https://pypi.org/project/oauth2client/ - v4.1.3 - 2018-09-07 (archived) + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:oauth2client.client", # https://pypi.org/project/passlib/ - v1.7.4 - 2020-10-08 "ignore:'crypt' is deprecated and slated for removal in Python 3.13:DeprecationWarning:passlib.utils", + # https://pypi.org/project/PyMetEireann/ - v2021.8.0 - 2021-08-16 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:meteireann", # https://pypi.org/project/pyqwikswitch/ - v0.94 - 2019-08-19 "ignore:client.loop property is deprecated:DeprecationWarning:pyqwikswitch.async_", "ignore:with timeout\\(\\) is deprecated:DeprecationWarning:pyqwikswitch.async_", + # https://pypi.org/project/Rx/ - v3.2.0 - 2021-04-25 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:rx.internal.constants", # https://pypi.org/project/rxv/ - v0.7.0 - 2021-10-10 "ignore:defusedxml.cElementTree is deprecated, import from defusedxml.ElementTree instead:DeprecationWarning:rxv.ssdp", # https://pypi.org/project/vilfo-api-client/ - v0.4.1 - 2021-11-06 "ignore:Function 'semver.compare' is deprecated. Deprecated since version 3.0.0:PendingDeprecationWarning:.*vilfo.client", # https://pypi.org/project/webrtcvad/ - v2.0.10 - 2017-01-08 "ignore:pkg_resources is deprecated as an API:DeprecationWarning:webrtcvad", + + # -- existing issues + "ignore:'audioop' is deprecated and slated for removal in Python 3.13:DeprecationWarning:homeassistant.components.assist_pipeline.websocket_api", + "ignore:This method will be removed future version, pass the callback to the BleakClient constructor instead:FutureWarning:homeassistant.components.bluetooth.wrappers", + "ignore:The asyncore module is deprecated and will be removed in Python 3.12:DeprecationWarning:pysnmp.carrier.asyncore.base", + + # -- ignore + # https://github.com/protocolbuffers/protobuf - v4.24.3 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated and scheduled for removal:DeprecationWarning:google.protobuf.internal.well_known_types", + "ignore:Type google._upb._message.(Message|Scalar)MapContainer uses PyType_Spec with a metaclass that has custom tp_new. .* Python 3.14:DeprecationWarning", + # https://github.com/googleapis/google-auth-library-python/blob/v2.23.2/google/auth/_helpers.py#L95 - v2.23.2 + "ignore:datetime.*utcnow\\(\\) is deprecated:DeprecationWarning:google.auth._helpers", + # https://github.com/googleapis/proto-plus-python/blob/v1.22.3/proto/datetime_helpers.py#L24 - v1.22.3 + "ignore:datetime.*utcfromtimestamp\\(\\) is deprecated:DeprecationWarning:proto.datetime_helpers", + # https://github.com/MatsNl/pyatag/issues/11 -> no recent activity - v0.3.6.2 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:pyatag.gateway", + # https://github.com/Python-MyQ/Python-MyQ -> fork - v3.1.11 + "ignore:datetime.*utcnow\\(\\) is deprecated and scheduled for removal:DeprecationWarning:pymyq.(api|account)", + # Aiohttp 3.9.0 UserWarnings handled in another branch + "ignore:It is recommended to use web.AppKey instances for keys:UserWarning", + + # -- enable warnings + "error::sqlalchemy.exc.SAWarning", ] [tool.ruff]