From 501246cd0b01668d0d423bcbcb6085f42dbabb4c Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 14 Jul 2026 15:41:17 +0500 Subject: [PATCH] rule_compiler: fix error running on Python 3.14 Example error: ``` ast.Str(s=node.attr), ^^^^^^^ AttributeError: module 'ast' has no attribute 'Str' ``` `ast.Str` was deprecated since 3.8 and was removed in 3.14, see https://docs.python.org/3/whatsnew/3.14.html#id9 --- src/ifcopenshell-python/ifcopenshell/express/rule_compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/express/rule_compiler.py b/src/ifcopenshell-python/ifcopenshell/express/rule_compiler.py index 38fa867778..44c7922758 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rule_compiler.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rule_compiler.py @@ -741,7 +741,7 @@ class AttributeGetattrTransformer(ast.NodeTransformer): func=ast.Name(id="express_getattr", ctx=ast.Load()), args=[ new_value, - ast.Str(s=node.attr), + ast.Constant(value=node.attr), ast.Name(id="INDETERMINATE", ctx=ast.Load()), ], keywords=[],