Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST: Add 3.12-dev [ci] #53

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: >-
Expand Down Expand Up @@ -533,7 +534,18 @@ 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: |
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
Expand Down Expand Up @@ -717,16 +729,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:
Expand Down Expand Up @@ -860,7 +867,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'
Expand Down Expand Up @@ -984,7 +992,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'
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/apache_kafka/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/brother/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/cisco_webex_teams/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/metoffice/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/profiler/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/python_script/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
1 change: 1 addition & 0 deletions homeassistant/components/snmp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/vulcan/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
71 changes: 69 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -161,6 +162,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: <https://github.com/astral-sh/ruff/issues/970>
Expand Down Expand Up @@ -420,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",
Expand All @@ -439,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",

Expand All @@ -451,28 +454,60 @@ 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
# https://github.com/eclipse/paho.mqtt.python/pull/665
"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
# Should resolve itself once pytest-xdist 4.0 is released and the option is removed
"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
Expand All @@ -495,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
Expand All @@ -507,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]
Expand Down
Loading