From 0aae57620f61eaa0e9f5f3cd621fb31e60e8bf0c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 2 Jun 2025 08:42:47 +0200 Subject: [PATCH] Temporary Python 3.9 compatibility --- src/ifcopenshell-python/ifcopenshell/file.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index f617f32d9e..8f96a5be18 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -33,7 +33,8 @@ from typing import Union from typing import overload from typing import Literal from typing import TypedDict -from typing_extensions import assert_never +# py39 compat: re-enable when support is dropped +# from typing_extensions import assert_never from . import ifcopenshell_wrapper from .entity_instance import entity_instance @@ -218,7 +219,9 @@ class Transaction: for index, value in data: inverse[index] = self.unserialise_value(inverse, value) else: - assert_never(operation["action"]) + # py39 compat: re-enable when support is dropped + # assert_never(operation["action"]) + pass def commit(self) -> None: for operation in self.operations: @@ -239,7 +242,9 @@ class Transaction: elif operation["action"] == "batch_delete": pass else: - assert_never(operation["action"]) + # py39 compat: re-enable when support is dropped + # assert_never(operation["action"]) + pass file_dict = {}