From 0708f38855153d2980b7faf88876d5c442d15265 Mon Sep 17 00:00:00 2001 From: Mark Broadbent Date: Tue, 28 Feb 2023 12:10:42 +0000 Subject: [PATCH] Revert orjson to v3.8.3 The orjson package has a number of issues that result in segmentation faults in the versions 3.8.4 through 3.8.6 on musl based builds. Rather than incrementing up the versions, revert back to the last known good version (v3.8.3) until the outstanding issues are resolved. --- homeassistant/package_constraints.txt | 7 ++++++- pyproject.toml | 2 +- requirements.txt | 2 +- script/gen_requirements_all.py | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 16b1969f61beb0..048decc2996eb0 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -30,7 +30,7 @@ ifaddr==0.1.7 janus==1.0.0 jinja2==3.1.2 lru-dict==1.1.8 -orjson==3.8.6 +orjson==3.8.3 paho-mqtt==1.6.1 pillow==9.4.0 pip>=21.0,<23.1 @@ -49,6 +49,11 @@ voluptuous==0.13.1 yarl==1.8.1 zeroconf==0.47.3 +# Constrain to v3.8.3 due to segmentation faults in v3.8.4 to at least v3.8.6 +# on musl builds. +# See: https://github.com/home-assistant/core/issues/87283 +orjson==3.8.3 + # Constrain pycryptodome to avoid vulnerability # see https://github.com/home-assistant/core/pull/16238 pycryptodome>=3.6.6 diff --git a/pyproject.toml b/pyproject.toml index a3d6d2f2446f7f..4835d666396107 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ "cryptography==39.0.1", # pyOpenSSL 23.0.0 is required to work with cryptography 39+ "pyOpenSSL==23.0.0", - "orjson==3.8.6", + "orjson==3.8.3", "pip>=21.0,<23.1", "python-slugify==4.0.1", "pyyaml==6.0", diff --git a/requirements.txt b/requirements.txt index aa6e85d15200fb..7a373c6554f30c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ lru-dict==1.1.8 PyJWT==2.5.0 cryptography==39.0.1 pyOpenSSL==23.0.0 -orjson==3.8.6 +orjson==3.8.3 pip>=21.0,<23.1 python-slugify==4.0.1 pyyaml==6.0 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 9f08f0b62890ab..199e78aa2f674c 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -57,6 +57,11 @@ os.path.dirname(__file__), "../homeassistant/package_constraints.txt" ) CONSTRAINT_BASE = """ +# Constrain to v3.8.3 due to segmentation faults in v3.8.4 to at least v3.8.6 +# on musl builds. +# See: https://github.com/home-assistant/core/issues/87283 +orjson==3.8.3 + # Constrain pycryptodome to avoid vulnerability # see https://github.com/home-assistant/core/pull/16238 pycryptodome>=3.6.6