From b58af167a2bd091eb769551d6d0bef5af9a6699c Mon Sep 17 00:00:00 2001
From: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Date: Fri, 17 Nov 2023 13:01:06 +0100
Subject: [PATCH] Update RestrictedPython to 7.0 (#104117)

---
 homeassistant/components/python_script/manifest.json | 5 +----
 pyproject.toml                                       | 2 --
 requirements_all.txt                                 | 5 +----
 requirements_test_all.txt                            | 5 +----
 4 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/homeassistant/components/python_script/manifest.json b/homeassistant/components/python_script/manifest.json
index bd034053a34..dcc0e38c737 100644
--- a/homeassistant/components/python_script/manifest.json
+++ b/homeassistant/components/python_script/manifest.json
@@ -5,8 +5,5 @@
   "documentation": "https://www.home-assistant.io/integrations/python_script",
   "loggers": ["RestrictedPython"],
   "quality_scale": "internal",
-  "requirements": [
-    "RestrictedPython==6.2;python_version<'3.12'",
-    "RestrictedPython==7.0a1.dev0;python_version>='3.12'"
-  ]
+  "requirements": ["RestrictedPython==7.0"]
 }
diff --git a/pyproject.toml b/pyproject.toml
index 67657586ea5..b7adf946223 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -505,8 +505,6 @@ filterwarnings = [
     "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
diff --git a/requirements_all.txt b/requirements_all.txt
index 558b77468c6..03a12b59131 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -121,10 +121,7 @@ PyXiaomiGateway==0.14.3
 RachioPy==1.0.3
 
 # homeassistant.components.python_script
-RestrictedPython==6.2;python_version<'3.12'
-
-# homeassistant.components.python_script
-RestrictedPython==7.0a1.dev0;python_version>='3.12'
+RestrictedPython==7.0
 
 # homeassistant.components.remember_the_milk
 RtmAPI==0.7.2
diff --git a/requirements_test_all.txt b/requirements_test_all.txt
index 9c911580938..538ec4e2e9f 100644
--- a/requirements_test_all.txt
+++ b/requirements_test_all.txt
@@ -106,10 +106,7 @@ PyXiaomiGateway==0.14.3
 RachioPy==1.0.3
 
 # homeassistant.components.python_script
-RestrictedPython==6.2;python_version<'3.12'
-
-# homeassistant.components.python_script
-RestrictedPython==7.0a1.dev0;python_version>='3.12'
+RestrictedPython==7.0
 
 # homeassistant.components.remember_the_milk
 RtmAPI==0.7.2
-- 
GitLab