Skip to content
Merged
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
8 changes: 5 additions & 3 deletions homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ pandas==2.3.3
# https://github.com/home-assistant/core/pull/67046
multidict>=6.0.2

# Version 2.0 added typing, prevent accidental fallbacks
backoff>=2.0

# Brotli 1.2.0 fixes CVE and is required for aiohttp 3.13.3 compatibility
Brotli>=1.2.0

Expand Down Expand Up @@ -236,6 +233,11 @@ auth0-python<5.0
# Setuptools >=82.0.0 doesn't contain pkg_resources anymore
setuptools<82.0.0

# backoff and python-backoff share the same package name
# pin versions which are mostly compatible to each other
backoff==2.2.1
Comment thread
cdce8p marked this conversation as resolved.
python-backoff<2.4.0
Comment on lines +236 to +239

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since both packages share the same name, they will inevitably overwrite one another during install. Depending on the dependency resolution, the final package might at one point be backoff and at another python-backoff.

Added the constraints here to make sure that we don't accidentally depend on "new" features in python-backoff which aren't in backoff.

Comment thread
cdce8p marked this conversation as resolved.

# Pin dependencies with '.pth' files to exact versions, only update manually!
# https://github.com/Azure/azure-kusto-python/ -> '.pth' files removed with >=5.0.5
# https://github.com/xolox/python-coloredlogs -> unmaintained
Expand Down
8 changes: 5 additions & 3 deletions script/gen_requirements_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@
# https://github.com/home-assistant/core/pull/67046
multidict>=6.0.2

# Version 2.0 added typing, prevent accidental fallbacks
backoff>=2.0

# Brotli 1.2.0 fixes CVE and is required for aiohttp 3.13.3 compatibility
Brotli>=1.2.0

Expand Down Expand Up @@ -219,6 +216,11 @@
# Setuptools >=82.0.0 doesn't contain pkg_resources anymore
setuptools<82.0.0

# backoff and python-backoff share the same package name
# pin versions which are mostly compatible to each other
backoff==2.2.1
python-backoff<2.4.0
Comment on lines +220 to +222

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be a transition period where we can't avoid having both in the dependency tree. With the dep resolution, it will depend which package gets installed last. That's exactly why compatible versions need to be pinned here / in package_constraints.txt.


Comment thread
cdce8p marked this conversation as resolved.
# Pin dependencies with '.pth' files to exact versions, only update manually!
# https://github.com/Azure/azure-kusto-python/ -> '.pth' files removed with >=5.0.5
# https://github.com/xolox/python-coloredlogs -> unmaintained
Expand Down
29 changes: 28 additions & 1 deletion script/hassfest/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
FORBIDDEN_PACKAGES = {
# Not longer needed, as we could use the standard library
"async-timeout": "be replaced by asyncio.timeout (Python 3.11+)",
# backoff is archived / unmaintained
# it imports asyncio.iscoroutinefunction scheduled for removal in 3.16
"backoff": "be replaced with python-backoff (it will break in Python 3.16)",
Comment thread
cdce8p marked this conversation as resolved.
# Only needed for tests
"codecov": "not be a runtime dependency",
# Coloredlogs is unmaintained and contains a '.pth' file
Expand Down Expand Up @@ -119,11 +122,14 @@
"airthings": {"airthings-cloud": {"async-timeout"}},
"ampio": {"asmog": {"async-timeout"}},
"apache_kafka": {"aiokafka": {"async-timeout"}},
"aseko_pool_live": {"gql": {"backoff"}},
"blackbird": {
# https://github.com/koolsb/pyblackbird/issues/12
# pyblackbird > pyserial-asyncio
"pyblackbird": {"pyserial-asyncio"}
},
"bsblan": {"python-bsblan": {"backoff"}},
"coinbase": {"coinbase-advanced-py": {"backoff"}},
"cmus": {
# https://github.com/mtreinish/pycmus/issues/4
# pycmus > pbr > setuptools
Expand All @@ -137,6 +143,7 @@
"pyefergy": {"codecov", "types-pytz"}
},
"emulated_kasa": {"sense-energy": {"async-timeout"}},
"energyid": {"energyid-webhooks": {"backoff"}},
"entur_public_transport": {"enturclient": {"async-timeout"}},
"escea": {"pescea": {"async-timeout"}},
"evil_genius_labs": {"pyevilgenius": {"async-timeout"}},
Expand All @@ -150,18 +157,24 @@
},
"flux_led": {"flux-led": {"async-timeout"}},
"foobot": {"foobot-async": {"async-timeout"}},
"geocaching": {"geocachingapi": {"backoff"}},
"github": {"aiogithubapi": {"backoff"}},
"google_maps": {"locationsharinglib": {"coloredlogs"}},
"harmony": {"aioharmony": {"async-timeout"}},
"here_travel_time": {
"here-routing": {"async-timeout"},
"here-transit": {"async-timeout"},
},
"homeassistant_hardware": {"universal-silabs-flasher": {"coloredlogs"}},
"homewizard": {"python-homewizard-energy": {"async-timeout"}},
"homewizard": {"python-homewizard-energy": {"async-timeout", "backoff"}},
"hydrawise": {"gql": {"backoff"}},
"imeon_inverter": {"imeon-inverter-api": {"async-timeout"}},
"ipp": {"pyipp": {"backoff"}},
"iqvia": {"pyiqvia": {"backoff"}},
"izone": {"python-izone": {"async-timeout"}},
"kef": {"aiokef": {"async-timeout"}},
"kodi": {"jsonrpc-websocket": {"async-timeout"}},
"lametric": {"demetriek": {"backoff"}},
"ld2410_ble": {"ld2410-ble": {"async-timeout"}},
"led_ble": {"flux-led": {"async-timeout"}},
"lektrico": {"lektricowifi": {"async-timeout"}},
Expand All @@ -184,22 +197,34 @@
# pymochad > pbr > setuptools
"pbr": {"setuptools"}
},
"modern_forms": {"aiomodernforms": {"backoff"}},
"monarch_money": {"gql": {"backoff"}},
"nibe_heatpump": {"nibe": {"async-timeout"}},
"norway_air": {"pymetno": {"async-timeout"}},
"opengarage": {"open-garage": {"async-timeout"}},
"opensensemap": {"opensensemap-api": {"async-timeout"}},
"overkiz": {"pyoverkiz": {"backoff"}},
"prosegur": {"pyprosegur": {"backoff"}},
"pvpc_hourly_pricing": {"aiopvpc": {"async-timeout"}},
"radio_browser": {"radios": {"backoff"}},
"remote_rpi_gpio": {
# https://github.com/waveform80/colorzero/issues/9
# gpiozero > colorzero > setuptools
"colorzero": {"setuptools"}
},
"ring": {"ring-doorbell": {"async-timeout"}},
"rmvtransport": {"pyrmvtransport": {"async-timeout"}},
"roku": {"rokuecp": {"backoff"}},
"screenlogic": {"screenlogicpy": {"async-timeout"}},
"sense": {"sense-energy": {"async-timeout"}},
"simplisafe": {"simplisafe-python": {"backoff"}},
"slimproto": {"aioslimproto": {"async-timeout"}},
"surepetcare": {"surepy": {"async-timeout"}},
"tailwind": {"gotailwind": {"backoff"}},
"technove": {"python-technove": {"backoff"}},
"tesla_wall_connector": {"tesla-wall-connector": {"backoff"}},
"tibber": {"gql": {"backoff"}},
"toon": {"toonapi": {"backoff"}},
"travisci": {
# https://github.com/menegazzo/travispy seems to be unmaintained
# and unused https://www.home-assistant.io/integrations/travisci
Expand All @@ -208,7 +233,9 @@
# travispy > pytest
"travispy": {"pytest"},
},
"velbus": {"velbus-aio": {"backoff"}},
"volkszaehler": {"volkszaehler": {"async-timeout"}},
"wled": {"wled": {"backoff"}},
"whirlpool": {"whirlpool-sixth-sense": {"async-timeout"}},
"zamg": {"zamg": {"async-timeout"}},
"zha": {
Expand Down
Loading