diff --git a/pyproject.toml b/pyproject.toml
index c1c04f2310..8c02ff2ca4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -76,7 +76,6 @@ ignore = [
"UP030", # implicit references for positional format fields
"UP031", # Replace % with .format
"UP032", # Replace .format with f-string
- "UP035", # List -> list
# Deprecated Ruff rules.
"UP038", # Use X | Y in isinstance
diff --git a/src/bcf/bcf/v2/visinfo.py b/src/bcf/bcf/v2/visinfo.py
index 359fbc0ab9..d0056ec407 100644
--- a/src/bcf/bcf/v2/visinfo.py
+++ b/src/bcf/bcf/v2/visinfo.py
@@ -1,6 +1,7 @@
import uuid
import zipfile
-from typing import Any, Iterable, Optional, Literal, Union
+from typing import Any, Optional, Literal, Union
+from collections.abc import Iterable
import numpy as np
from ifcopenshell import entity_instance
diff --git a/src/bcf/bcf/v3/visinfo.py b/src/bcf/bcf/v3/visinfo.py
index 6fb2be6a39..1cb442aa83 100644
--- a/src/bcf/bcf/v3/visinfo.py
+++ b/src/bcf/bcf/v3/visinfo.py
@@ -1,6 +1,7 @@
import uuid
import zipfile
-from typing import Any, Iterable, Optional, Literal, Union
+from typing import Any, Optional, Literal, Union
+from collections.abc import Iterable
import numpy as np
from ifcopenshell import entity_instance
diff --git a/src/bonsai/bonsai/__init__.py b/src/bonsai/bonsai/__init__.py
index 829f859332..ea0c4ca753 100644
--- a/src/bonsai/bonsai/__init__.py
+++ b/src/bonsai/bonsai/__init__.py
@@ -40,7 +40,8 @@ import uuid
import shutil
from collections import deque
from pathlib import Path
-from typing import Union, Any, Generator
+from typing import Union, Any
+from collections.abc import Generator
last_commit_hash = "8888888"
diff --git a/src/bonsai/bonsai/bim/__init__.py b/src/bonsai/bonsai/bim/__init__.py
index 5743c245c7..f004d3024b 100644
--- a/src/bonsai/bonsai/bim/__init__.py
+++ b/src/bonsai/bonsai/bim/__init__.py
@@ -22,7 +22,8 @@ import bpy.utils.previews
import importlib
from bpy_extras.io_utils import ImportHelper, ExportHelper
from . import handler, ui, prop, operator
-from typing import Callable, Union
+from typing import Union
+from collections.abc import Callable
try:
from bonsai.translations import translations_dict
diff --git a/src/bonsai/bonsai/bim/handler.py b/src/bonsai/bonsai/bim/handler.py
index 3026aa66ec..9e6a5529f4 100644
--- a/src/bonsai/bonsai/bim/handler.py
+++ b/src/bonsai/bonsai/bim/handler.py
@@ -33,7 +33,8 @@ from bonsai.bim.module.model.decorator import WallAxisDecorator, SlabDirectionDe
from bonsai.bim.module.nest.decorator import NestDecorator
from mathutils import Vector
from math import cos
-from typing import Union, Callable
+from typing import Union
+from collections.abc import Callable
cwd = os.path.dirname(os.path.realpath(__file__))
diff --git a/src/bonsai/bonsai/bim/helper.py b/src/bonsai/bonsai/bim/helper.py
index 824aa91818..0a7cb1e325 100644
--- a/src/bonsai/bonsai/bim/helper.py
+++ b/src/bonsai/bonsai/bim/helper.py
@@ -27,7 +27,8 @@ import ifcopenshell.util.element
import ifcopenshell.util.unit
from ifcopenshell.util.doc import get_attribute_doc, get_predefined_type_doc, get_property_doc
import bonsai.tool as tool
-from typing import Optional, Callable, Any, Union, Iterable, TYPE_CHECKING
+from typing import Optional, Any, Union, TYPE_CHECKING
+from collections.abc import Callable, Iterable
if TYPE_CHECKING:
import bonsai.bim.prop
diff --git a/src/bonsai/bonsai/bim/ifc.py b/src/bonsai/bonsai/bim/ifc.py
index de5133fccd..b5aa7df820 100644
--- a/src/bonsai/bonsai/bim/ifc.py
+++ b/src/bonsai/bonsai/bim/ifc.py
@@ -34,7 +34,8 @@ import bonsai.tool as tool
from ifcopenshell.file import UndoSystemError
from pathlib import Path
from bonsai.tool.brick import BrickStore
-from typing import Union, Optional, TypedDict, Callable, NotRequired, Literal
+from typing import Union, Optional, TypedDict, NotRequired, Literal
+from collections.abc import Callable
IFC_CONNECTED_TYPE = Union[bpy.types.Material, bpy.types.Object]
diff --git a/src/bonsai/bonsai/bim/import_ifc.py b/src/bonsai/bonsai/bim/import_ifc.py
index e67f22a2fc..0251b19c94 100644
--- a/src/bonsai/bonsai/bim/import_ifc.py
+++ b/src/bonsai/bonsai/bim/import_ifc.py
@@ -38,7 +38,8 @@ import ifcopenshell.util.shape
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore, IFC_CONNECTED_TYPE
from bonsai.tool.loader import OBJECT_DATA_TYPE
-from typing import Union, Optional, Any, Literal, Iterable
+from typing import Union, Optional, Any, Literal
+from collections.abc import Iterable
from ifcopenshell.util.shape import MatrixType
diff --git a/src/bonsai/bonsai/bim/module/alignment/operator.py b/src/bonsai/bonsai/bim/module/alignment/operator.py
index c11f8ca718..0bd9a25acc 100644
--- a/src/bonsai/bonsai/bim/module/alignment/operator.py
+++ b/src/bonsai/bonsai/bim/module/alignment/operator.py
@@ -38,8 +38,6 @@ import ifcopenshell.util.selector
from datetime import datetime
from dateutil import parser, relativedelta
from bpy_extras.io_utils import ImportHelper
-from typing import get_args, TYPE_CHECKING
-from typing_extensions import assert_never
class ImportAlignmentCSV(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
diff --git a/src/bonsai/bonsai/bim/module/bcf/prop.py b/src/bonsai/bonsai/bim/module/bcf/prop.py
index 17a15597a7..6a01115821 100644
--- a/src/bonsai/bonsai/bim/module/bcf/prop.py
+++ b/src/bonsai/bonsai/bim/module/bcf/prop.py
@@ -31,9 +31,6 @@ from bpy.props import (
FloatVectorProperty,
CollectionProperty,
)
-from functools import partial
-from typing import Literal
-from typing_extensions import assert_never
from bcf.agnostic.extensions import get_extensions_attributes
from typing import TYPE_CHECKING, Union
diff --git a/src/bonsai/bonsai/bim/module/clash/ui.py b/src/bonsai/bonsai/bim/module/clash/ui.py
index 561bdc7893..f0ad45baa3 100644
--- a/src/bonsai/bonsai/bim/module/clash/ui.py
+++ b/src/bonsai/bonsai/bim/module/clash/ui.py
@@ -22,8 +22,7 @@ import bonsai.tool as tool
import bonsai.bim.helper
from bpy.types import Panel
from bonsai.bim.module.clash.data import ClashData
-from typing import TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import TYPE_CHECKING, assert_never
if TYPE_CHECKING:
from bonsai.bim.module.clash.prop import BIMClashProperties, ClashSet, SmartClashGroup, Clash
diff --git a/src/bonsai/bonsai/bim/module/drawing/decoration.py b/src/bonsai/bonsai/bim/module/drawing/decoration.py
index 948e19a1fc..fad54c3059 100644
--- a/src/bonsai/bonsai/bim/module/drawing/decoration.py
+++ b/src/bonsai/bonsai/bim/module/drawing/decoration.py
@@ -38,7 +38,8 @@ from bonsai.bim.module.drawing.shaders import add_verts_sequence, add_offsets
from bonsai.bim.module.drawing.helper import format_distance
from timeit import default_timer as timer
from functools import cache
-from typing import Optional, Iterator, Union
+from typing import Optional, Union
+from collections.abc import Iterator
UNSPECIAL_ELEMENT_COLOR = (0.2, 0.2, 0.2, 1) # GREY
diff --git a/src/bonsai/bonsai/bim/module/drawing/prop.py b/src/bonsai/bonsai/bim/module/drawing/prop.py
index e942c08abb..3a2fbe7fa7 100644
--- a/src/bonsai/bonsai/bim/module/drawing/prop.py
+++ b/src/bonsai/bonsai/bim/module/drawing/prop.py
@@ -46,7 +46,8 @@ from bpy.props import (
CollectionProperty,
BoolVectorProperty,
)
-from typing import TYPE_CHECKING, Literal, Any, Callable, get_args, Union
+from typing import TYPE_CHECKING, Literal, Any, get_args, Union
+from collections.abc import Callable
diagram_scales_enum = []
diff --git a/src/bonsai/bonsai/bim/module/drawing/svgwriter.py b/src/bonsai/bonsai/bim/module/drawing/svgwriter.py
index f9cc874e26..da8050cd44 100644
--- a/src/bonsai/bonsai/bim/module/drawing/svgwriter.py
+++ b/src/bonsai/bonsai/bim/module/drawing/svgwriter.py
@@ -38,7 +38,8 @@ from bonsai.bim.module.drawing.data import DrawingsData
from bonsai.bim.module.drawing.data import DecoratorData
from math import pi, ceil, atan, degrees, acos
from mathutils import geometry, Vector
-from typing import Optional, Self, Union, Sequence, Callable
+from typing import Optional, Self, Union
+from collections.abc import Callable, Sequence
from pathlib import Path
diff --git a/src/bonsai/bonsai/bim/module/geometry/decorator.py b/src/bonsai/bonsai/bim/module/geometry/decorator.py
index cf4a067f78..14f48d8eec 100644
--- a/src/bonsai/bonsai/bim/module/geometry/decorator.py
+++ b/src/bonsai/bonsai/bim/module/geometry/decorator.py
@@ -27,7 +27,7 @@ from bpy.types import SpaceView3D
from mathutils import Vector, Matrix
from gpu_extras.batch import batch_for_shader
from bpy_extras.view3d_utils import location_3d_to_region_2d
-from typing import Sequence
+from collections.abc import Sequence
class ItemDecorator:
diff --git a/src/bonsai/bonsai/bim/module/light/operator.py b/src/bonsai/bonsai/bim/module/light/operator.py
index bf709b0222..bc7c571d9d 100644
--- a/src/bonsai/bonsai/bim/module/light/operator.py
+++ b/src/bonsai/bonsai/bim/module/light/operator.py
@@ -28,7 +28,8 @@ from datetime import datetime
import bpy
import bonsai.tool as tool
from pathlib import Path
-from typing import Union, Optional, Sequence
+from typing import Union, Optional
+from collections.abc import Sequence
import json
import math
import time
diff --git a/src/bonsai/bonsai/bim/module/misc/operator.py b/src/bonsai/bonsai/bim/module/misc/operator.py
index 657724da1b..6f9aa60a7b 100644
--- a/src/bonsai/bonsai/bim/module/misc/operator.py
+++ b/src/bonsai/bonsai/bim/module/misc/operator.py
@@ -27,8 +27,7 @@ import bonsai.core.misc as core
import bonsai.core.geometry as core_geometry
import bonsai.core.root
from mathutils import Vector, Matrix, Euler
-from typing import TYPE_CHECKING, Literal, get_args
-from typing_extensions import assert_never
+from typing import TYPE_CHECKING, Literal, get_args, assert_never
class SetOverrideColour(bpy.types.Operator):
diff --git a/src/bonsai/bonsai/bim/module/model/opening.py b/src/bonsai/bonsai/bim/module/model/opening.py
index 9ec168662d..fb4e39ed81 100644
--- a/src/bonsai/bonsai/bim/module/model/opening.py
+++ b/src/bonsai/bonsai/bim/module/model/opening.py
@@ -45,7 +45,8 @@ from bpy.types import SpaceView3D
from bpy.props import FloatProperty
from bpy_extras.object_utils import AddObjectHelper, object_data_add
from gpu_extras.batch import batch_for_shader
-from typing import Union, Optional, Any, cast, Sequence
+from typing import Union, Optional, Any, cast
+from collections.abc import Sequence
class FilledOpeningGenerator:
diff --git a/src/bonsai/bonsai/bim/module/project/prop.py b/src/bonsai/bonsai/bim/module/project/prop.py
index fcab17143b..68f70a87d7 100644
--- a/src/bonsai/bonsai/bim/module/project/prop.py
+++ b/src/bonsai/bonsai/bim/module/project/prop.py
@@ -35,8 +35,8 @@ from bpy.props import (
IntProperty,
StringProperty,
)
-from typing import TYPE_CHECKING, Literal, Union, get_args, Generator
-from typing_extensions import assert_never
+from typing import TYPE_CHECKING, Literal, Union, get_args, assert_never
+from collections.abc import Generator
def get_export_schema(self: "BIMProjectProperties", context: bpy.types.Context) -> list[tuple[str, str, str]]:
diff --git a/src/bonsai/bonsai/bim/module/pset/ui.py b/src/bonsai/bonsai/bim/module/pset/ui.py
index 53e0ea45e9..9f559b4556 100644
--- a/src/bonsai/bonsai/bim/module/pset/ui.py
+++ b/src/bonsai/bonsai/bim/module/pset/ui.py
@@ -35,8 +35,7 @@ from bonsai.bim.module.pset.data import (
WorkSchedulePsetsData,
)
from bonsai.bim.module.material.data import ObjectMaterialData
-from typing import Any, Optional, TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import Any, Optional, TYPE_CHECKING, assert_never
if TYPE_CHECKING:
from bonsai.bim.module.pset.prop import IfcProperty, PsetProperties
diff --git a/src/bonsai/bonsai/bim/module/qto/calculator.py b/src/bonsai/bonsai/bim/module/qto/calculator.py
index b5f851d7ba..7a8affb45f 100644
--- a/src/bonsai/bonsai/bim/module/qto/calculator.py
+++ b/src/bonsai/bonsai/bim/module/qto/calculator.py
@@ -29,8 +29,7 @@ from mathutils import Vector, Matrix
from mathutils.bvhtree import BVHTree
from shapely.geometry import Polygon
from shapely.ops import unary_union
-from typing import Literal, Union, Optional
-from typing_extensions import assert_never
+from typing import Literal, Union, Optional, assert_never
AxisType = Literal["x", "y", "z"]
diff --git a/src/bonsai/bonsai/bim/module/qto/helper.py b/src/bonsai/bonsai/bim/module/qto/helper.py
index 4b45d5113c..50253cbb63 100644
--- a/src/bonsai/bonsai/bim/module/qto/helper.py
+++ b/src/bonsai/bonsai/bim/module/qto/helper.py
@@ -19,7 +19,7 @@
import bpy
import bmesh
import bonsai.tool as tool
-from typing import Callable
+from collections.abc import Callable
def calculate_height(obj: bpy.types.Object) -> float:
diff --git a/src/bonsai/bonsai/bim/module/search/operator.py b/src/bonsai/bonsai/bim/module/search/operator.py
index 310c9377c0..9956f1270d 100644
--- a/src/bonsai/bonsai/bim/module/search/operator.py
+++ b/src/bonsai/bonsai/bim/module/search/operator.py
@@ -39,8 +39,7 @@ from bpy.props import (
FloatVectorProperty,
CollectionProperty,
)
-from typing import TYPE_CHECKING, Literal, get_args
-from typing_extensions import assert_never
+from typing import TYPE_CHECKING, Literal, get_args, assert_never
class AddFilterGroup(Operator):
diff --git a/src/bonsai/bonsai/bim/module/sequence/operator.py b/src/bonsai/bonsai/bim/module/sequence/operator.py
index eeec20972f..90b7203149 100644
--- a/src/bonsai/bonsai/bim/module/sequence/operator.py
+++ b/src/bonsai/bonsai/bim/module/sequence/operator.py
@@ -33,8 +33,7 @@ import ifcopenshell.util.selector
from datetime import datetime
from dateutil import parser, relativedelta
from bpy_extras.io_utils import ImportHelper, ExportHelper
-from typing import get_args, TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import get_args, TYPE_CHECKING, assert_never
class EnableStatusFilters(bpy.types.Operator):
diff --git a/src/bonsai/bonsai/bim/module/structural/decorator.py b/src/bonsai/bonsai/bim/module/structural/decorator.py
index 43b665db0f..2bcc90c647 100644
--- a/src/bonsai/bonsai/bim/module/structural/decorator.py
+++ b/src/bonsai/bonsai/bim/module/structural/decorator.py
@@ -24,7 +24,8 @@ import blf
import bonsai.tool as tool
from bpy.types import SpaceView3D
from gpu_extras.batch import batch_for_shader
-from typing import Iterable, Union
+from typing import Union
+from collections.abc import Iterable
from bonsai.bim.module.structural.load_decoration_data import ShaderInfo
diff --git a/src/bonsai/bonsai/bim/module/structural/load_decoration_data.py b/src/bonsai/bonsai/bim/module/structural/load_decoration_data.py
index c02f0b643e..7df67e82d4 100644
--- a/src/bonsai/bonsai/bim/module/structural/load_decoration_data.py
+++ b/src/bonsai/bonsai/bim/module/structural/load_decoration_data.py
@@ -28,7 +28,8 @@ import ifcopenshell.util.unit
import ifcopenshell.util.unit as ifcunit
import bonsai.tool as tool
from bonsai.bim.module.structural.shader import DecorationShader
-from typing import Literal, TypedDict, Iterable
+from typing import Literal, TypedDict
+from collections.abc import Iterable
class MemberInfo(TypedDict):
diff --git a/src/bonsai/bonsai/bim/module/void/data.py b/src/bonsai/bonsai/bim/module/void/data.py
index 43a6f27d12..a1999e8d21 100644
--- a/src/bonsai/bonsai/bim/module/void/data.py
+++ b/src/bonsai/bonsai/bim/module/void/data.py
@@ -19,7 +19,8 @@
import bpy
import ifcopenshell
import bonsai.tool as tool
-from typing import Any, Generator, Union
+from typing import Any, Union
+from collections.abc import Generator
def refresh():
diff --git a/src/bonsai/bonsai/bim/operator.py b/src/bonsai/bonsai/bim/operator.py
index 117489084d..fc17184faf 100644
--- a/src/bonsai/bonsai/bim/operator.py
+++ b/src/bonsai/bonsai/bim/operator.py
@@ -42,7 +42,8 @@ from mathutils import Vector, Euler
from math import radians
from pathlib import Path
from collections import namedtuple
-from typing import Iterable, Union, TYPE_CHECKING
+from typing import Union, TYPE_CHECKING
+from collections.abc import Iterable
if TYPE_CHECKING:
from bonsai.bim.prop import MultipleFileSelect
diff --git a/src/bonsai/bonsai/bim/prop.py b/src/bonsai/bonsai/bim/prop.py
index 145e2de920..fd42e56cee 100644
--- a/src/bonsai/bonsai/bim/prop.py
+++ b/src/bonsai/bonsai/bim/prop.py
@@ -45,8 +45,7 @@ from bpy.props import (
FloatVectorProperty,
CollectionProperty,
)
-from typing import Any, Union, Literal, get_args, TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import Any, Union, Literal, get_args, TYPE_CHECKING, assert_never
cwd = os.path.dirname(os.path.realpath(__file__))
diff --git a/src/bonsai/bonsai/core/geometry.py b/src/bonsai/bonsai/core/geometry.py
index b5fcd61285..fc6fc73274 100644
--- a/src/bonsai/bonsai/core/geometry.py
+++ b/src/bonsai/bonsai/core/geometry.py
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see .
from __future__ import annotations
-from typing import TYPE_CHECKING, Optional, Sequence, Union
+from typing import TYPE_CHECKING, Optional, Union
+from collections.abc import Sequence
if TYPE_CHECKING:
import bpy
diff --git a/src/bonsai/bonsai/core/model.py b/src/bonsai/bonsai/core/model.py
index f162768b0b..5372e662b2 100644
--- a/src/bonsai/bonsai/core/model.py
+++ b/src/bonsai/bonsai/core/model.py
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see .
from __future__ import annotations
-from typing import TYPE_CHECKING, Optional, Literal, Iterable
+from typing import TYPE_CHECKING, Optional, Literal
if TYPE_CHECKING:
import bpy
diff --git a/src/bonsai/bonsai/core/resource.py b/src/bonsai/bonsai/core/resource.py
index 5a470094d0..9729fbd84f 100644
--- a/src/bonsai/bonsai/core/resource.py
+++ b/src/bonsai/bonsai/core/resource.py
@@ -19,7 +19,8 @@
# ############################################################################ #
from __future__ import annotations
-from typing import TYPE_CHECKING, Optional, Union, Iterable
+from typing import TYPE_CHECKING, Optional
+from collections.abc import Iterable
if TYPE_CHECKING:
import bpy
diff --git a/src/bonsai/bonsai/tool/blender.py b/src/bonsai/bonsai/tool/blender.py
index 022ef95b96..5fcde49d0c 100644
--- a/src/bonsai/bonsai/tool/blender.py
+++ b/src/bonsai/bonsai/tool/blender.py
@@ -42,8 +42,16 @@ from mathutils import Vector
from pathlib import Path
from functools import lru_cache, cache
from bonsai.bim.ifc import IFC_CONNECTED_TYPE
-from typing import Any, Optional, Union, Literal, Iterable, Callable, TypeVar, Generator, TYPE_CHECKING, Sequence, Sized
-from typing_extensions import assert_never
+from typing import (
+ Any,
+ Optional,
+ Union,
+ Literal,
+ TypeVar,
+ TYPE_CHECKING,
+ assert_never,
+)
+from collections.abc import Iterable, Callable, Generator, Sequence, Sized
if TYPE_CHECKING:
import bpy.stub_internal.rna_enums as rna_enums
diff --git a/src/bonsai/bonsai/tool/boundary.py b/src/bonsai/bonsai/tool/boundary.py
index 1d13151473..d09ebcbee1 100644
--- a/src/bonsai/bonsai/tool/boundary.py
+++ b/src/bonsai/bonsai/tool/boundary.py
@@ -22,7 +22,8 @@ import mathutils
import bonsai.core.tool
import bonsai.tool as tool
from mathutils import Matrix, Vector
-from typing import Any, Sequence, TYPE_CHECKING
+from typing import Any, TYPE_CHECKING
+from collections.abc import Sequence
if TYPE_CHECKING:
from bonsai.bim.module.boundary.prop import BIMBoundaryProperties, BIMObjectBoundaryProperties
diff --git a/src/bonsai/bonsai/tool/brick.py b/src/bonsai/bonsai/tool/brick.py
index a28afebd10..9da53f4413 100644
--- a/src/bonsai/bonsai/tool/brick.py
+++ b/src/bonsai/bonsai/tool/brick.py
@@ -30,7 +30,8 @@ import bonsai.core.tool
import bonsai.tool as tool
from pathlib import Path
from contextlib import contextmanager
-from typing import Generator, Any, Union, TYPE_CHECKING
+from typing import Any, Union, TYPE_CHECKING
+from collections.abc import Generator
try:
import brickschema
diff --git a/src/bonsai/bonsai/tool/classification.py b/src/bonsai/bonsai/tool/classification.py
index 1fc8b6f6f8..113c69b480 100644
--- a/src/bonsai/bonsai/tool/classification.py
+++ b/src/bonsai/bonsai/tool/classification.py
@@ -22,8 +22,7 @@ import ifcopenshell.api
import ifcopenshell.util.classification
import bonsai.core.tool
import bonsai.tool as tool
-from typing import Any, Optional, Union, Literal, Iterable, Callable
-from typing_extensions import assert_never
+from typing import Union, assert_never
class Classification(bonsai.core.tool.Classification):
diff --git a/src/bonsai/bonsai/tool/cost.py b/src/bonsai/bonsai/tool/cost.py
index 26e48399cc..d947b07349 100644
--- a/src/bonsai/bonsai/tool/cost.py
+++ b/src/bonsai/bonsai/tool/cost.py
@@ -28,8 +28,8 @@ import ifcopenshell.util.unit
import bonsai.bim.helper
import json
from pathlib import Path
-from typing import Optional, Any, Generator, Union, Literal, TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import Optional, Any, Union, Literal, TYPE_CHECKING, assert_never
+from collections.abc import Generator
if TYPE_CHECKING:
from bonsai.bim.module.cost.prop import BIMCostProperties, CostItemQuantity
diff --git a/src/bonsai/bonsai/tool/debug.py b/src/bonsai/bonsai/tool/debug.py
index 5638436c8f..5fe25c4681 100644
--- a/src/bonsai/bonsai/tool/debug.py
+++ b/src/bonsai/bonsai/tool/debug.py
@@ -31,7 +31,8 @@ import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from mathutils import Vector
from collections import defaultdict
-from typing import Iterable, Literal, TYPE_CHECKING
+from typing import Literal, TYPE_CHECKING
+from collections.abc import Iterable
if TYPE_CHECKING:
from bonsai.bim.module.debug.prop import BIMDebugProperties
diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py
index fefbbdc3ff..021a474c2a 100644
--- a/src/bonsai/bonsai/tool/drawing.py
+++ b/src/bonsai/bonsai/tool/drawing.py
@@ -51,7 +51,8 @@ from shapely.ops import unary_union
from lxml import etree
from mathutils import Vector, Matrix
from fractions import Fraction
-from typing import Optional, Union, Iterable, Any, Literal, Sequence, TYPE_CHECKING, NamedTuple, get_args
+from typing import Optional, Union, Any, Literal, TYPE_CHECKING, NamedTuple
+from collections.abc import Iterable, Sequence
from pathlib import Path
if TYPE_CHECKING:
diff --git a/src/bonsai/bonsai/tool/feature.py b/src/bonsai/bonsai/tool/feature.py
index 84a12591c0..a24ddeabc1 100644
--- a/src/bonsai/bonsai/tool/feature.py
+++ b/src/bonsai/bonsai/tool/feature.py
@@ -24,7 +24,8 @@ import bonsai.bim.helper
import bonsai.core.geometry
import ifcopenshell
import ifcopenshell.util.representation
-from typing import Iterable, TYPE_CHECKING
+from typing import TYPE_CHECKING
+from collections.abc import Iterable
if TYPE_CHECKING:
from bonsai.bim.module.void.prop import BIMBooleanProperties
diff --git a/src/bonsai/bonsai/tool/geometry.py b/src/bonsai/bonsai/tool/geometry.py
index 23140613e1..c27b803c6b 100644
--- a/src/bonsai/bonsai/tool/geometry.py
+++ b/src/bonsai/bonsai/tool/geometry.py
@@ -59,17 +59,15 @@ from mathutils.bvhtree import BVHTree
from bonsai.bim.ifc import IfcStore
from typing import (
Union,
- Iterable,
Optional,
Literal,
- Iterator,
TYPE_CHECKING,
get_args,
- Generator,
cast,
TypeGuard,
Any,
)
+from collections.abc import Iterable, Iterator, Generator
from typing_extensions import TypeIs
if TYPE_CHECKING:
diff --git a/src/bonsai/bonsai/tool/material.py b/src/bonsai/bonsai/tool/material.py
index dde9cc53d8..e6e6b16c23 100644
--- a/src/bonsai/bonsai/tool/material.py
+++ b/src/bonsai/bonsai/tool/material.py
@@ -27,8 +27,7 @@ import bonsai.bim.helper
import ifcopenshell.util.unit
import ifcopenshell.util.element
from collections import defaultdict
-from typing import Union, Any, TYPE_CHECKING, Optional, Literal
-from typing_extensions import assert_never
+from typing import Union, Any, TYPE_CHECKING, Optional
if TYPE_CHECKING:
# Avoid circular imports.
diff --git a/src/bonsai/bonsai/tool/model.py b/src/bonsai/bonsai/tool/model.py
index ca2c009feb..7ecd510c85 100644
--- a/src/bonsai/bonsai/tool/model.py
+++ b/src/bonsai/bonsai/tool/model.py
@@ -49,7 +49,8 @@ from bonsai.bim import import_ifc
from bonsai.bim.module.model.data import AuthoringData, RailingData, RoofData, WindowData, DoorData
from bonsai.bim.module.model.opening import FilledOpeningGenerator
from ifcopenshell.util.shape_builder import ShapeBuilder, np_to_3d
-from typing import Optional, Union, TypeVar, Any, Iterable, Literal, TYPE_CHECKING, Sequence, TypedDict
+from typing import Optional, Union, TypeVar, Any, Literal, TYPE_CHECKING, TypedDict
+from collections.abc import Iterable, Sequence
T = TypeVar("T")
V_ = tool.Blender.V_
diff --git a/src/bonsai/bonsai/tool/owner.py b/src/bonsai/bonsai/tool/owner.py
index 46a23004d3..19747c985c 100644
--- a/src/bonsai/bonsai/tool/owner.py
+++ b/src/bonsai/bonsai/tool/owner.py
@@ -22,8 +22,7 @@ import bonsai.core.tool
import bonsai.tool as tool
import bonsai.bim.helper
import ifcopenshell
-from typing import Union, Any, TYPE_CHECKING, Literal
-from typing_extensions import assert_never
+from typing import Union, Any, TYPE_CHECKING, Literal, assert_never
if TYPE_CHECKING:
from bonsai.bim.module.owner.prop import BIMOwnerProperties
diff --git a/src/bonsai/bonsai/tool/project.py b/src/bonsai/bonsai/tool/project.py
index ed24d2fd7c..860771c3e2 100644
--- a/src/bonsai/bonsai/tool/project.py
+++ b/src/bonsai/bonsai/tool/project.py
@@ -35,7 +35,7 @@ from collections import defaultdict
from bonsai.bim.ifc import IfcStore
from ifcopenshell.api.project.append_asset import APPENDABLE_ASSET_TYPES
from pathlib import Path
-from typing import Optional, Union, TYPE_CHECKING, Generator
+from typing import Optional, Union, TYPE_CHECKING
if TYPE_CHECKING:
from bonsai.bim.module.project.prop import BIMProjectProperties
diff --git a/src/bonsai/bonsai/tool/pset.py b/src/bonsai/bonsai/tool/pset.py
index 851c756461..94b6c21d8d 100644
--- a/src/bonsai/bonsai/tool/pset.py
+++ b/src/bonsai/bonsai/tool/pset.py
@@ -26,8 +26,7 @@ import bonsai.bim.helper
import bonsai.core.tool
import bonsai.tool as tool
import bonsai.bim.schema
-from typing import Union, Literal, Any, TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import Union, Literal, Any, TYPE_CHECKING, assert_never
if TYPE_CHECKING:
diff --git a/src/bonsai/bonsai/tool/pset_template.py b/src/bonsai/bonsai/tool/pset_template.py
index da34e99b82..4cbaf7f808 100644
--- a/src/bonsai/bonsai/tool/pset_template.py
+++ b/src/bonsai/bonsai/tool/pset_template.py
@@ -25,8 +25,7 @@ import ifcopenshell.util.element
import bonsai.core.tool
import bonsai.tool as tool
from pathlib import Path
-from typing import Union, Literal, Any, final
-from typing_extensions import assert_never, TYPE_CHECKING
+from typing import Literal, final, TYPE_CHECKING
from bonsai.bim.ifc import IfcStore
if TYPE_CHECKING:
diff --git a/src/bonsai/bonsai/tool/sequence.py b/src/bonsai/bonsai/tool/sequence.py
index eb8dd03277..ab6e4969be 100644
--- a/src/bonsai/bonsai/tool/sequence.py
+++ b/src/bonsai/bonsai/tool/sequence.py
@@ -38,7 +38,8 @@ import bonsai.bim.helper
from dateutil import parser
from datetime import datetime
from datetime import time as datetime_time
-from typing import Optional, Any, Union, Literal, TYPE_CHECKING, Iterable
+from typing import Optional, Any, Union, Literal, TYPE_CHECKING
+from collections.abc import Iterable
from mathutils import Color
if TYPE_CHECKING:
diff --git a/src/bonsai/bonsai/tool/spatial.py b/src/bonsai/bonsai/tool/spatial.py
index b90b3cb8bb..6577f02d6d 100644
--- a/src/bonsai/bonsai/tool/spatial.py
+++ b/src/bonsai/bonsai/tool/spatial.py
@@ -42,7 +42,8 @@ import numpy as np
from math import pi
from mathutils import Vector, Matrix
from shapely import Polygon
-from typing import Generator, Optional, Union, Literal, Any, Iterable, TYPE_CHECKING
+from typing import Optional, Union, Literal, Any, TYPE_CHECKING
+from collections.abc import Generator, Iterable
from collections import defaultdict
from natsort import natsorted
diff --git a/src/bonsai/bonsai/tool/style.py b/src/bonsai/bonsai/tool/style.py
index 631f3b01f6..0694aec9ca 100644
--- a/src/bonsai/bonsai/tool/style.py
+++ b/src/bonsai/bonsai/tool/style.py
@@ -28,7 +28,8 @@ import bonsai.core.tool
import bonsai.tool as tool
import bonsai.bim.helper
from mathutils import Color
-from typing import Union, Any, Optional, Literal, TYPE_CHECKING, Sequence
+from typing import Union, Any, Optional, Literal, TYPE_CHECKING
+from collections.abc import Sequence
if TYPE_CHECKING:
from bonsai.bim.prop import Attribute
diff --git a/src/bonsai/bonsai/tool/unit.py b/src/bonsai/bonsai/tool/unit.py
index 808ea5ead0..f296a29500 100644
--- a/src/bonsai/bonsai/tool/unit.py
+++ b/src/bonsai/bonsai/tool/unit.py
@@ -24,8 +24,7 @@ import ifcopenshell
import bonsai.bim.helper
import bonsai.core.tool
import bonsai.tool as tool
-from typing import Union, Literal, Any, TYPE_CHECKING
-from typing_extensions import assert_never
+from typing import Union, Literal, Any, TYPE_CHECKING, assert_never
if TYPE_CHECKING:
from bonsai.bim.module.unit.prop import BIMUnitProperties
diff --git a/src/bonsai/bonsai/tool/web.py b/src/bonsai/bonsai/tool/web.py
index e37911b75e..a4b1dcd7c7 100644
--- a/src/bonsai/bonsai/tool/web.py
+++ b/src/bonsai/bonsai/tool/web.py
@@ -26,7 +26,7 @@ import bonsai.core.tool
import bonsai.tool as tool
import ifcopenshell.api.sequence
import ifcopenshell.api.cost
-from typing import Any, Dict, Optional
+from typing import Any, Optional
import time
import socket
import sys
diff --git a/src/bonsai/test/core/bootstrap.py b/src/bonsai/test/core/bootstrap.py
index 0d7664b990..1e25d2efe6 100644
--- a/src/bonsai/test/core/bootstrap.py
+++ b/src/bonsai/test/core/bootstrap.py
@@ -20,8 +20,7 @@ import sys
import json
import pytest
import bonsai.core.tool
-from typing import Any, Optional, TypedDict, Literal
-from typing_extensions import Self
+from typing import Any, Optional, TypedDict, Literal, Self
@pytest.fixture
diff --git a/src/ifc5d/ifc5d/qto.py b/src/ifc5d/ifc5d/qto.py
index 0694708b6f..37c21a5ec2 100644
--- a/src/ifc5d/ifc5d/qto.py
+++ b/src/ifc5d/ifc5d/qto.py
@@ -31,7 +31,8 @@ import ifcopenshell.util.representation
import ifcopenshell.util.type
import multiprocessing
from collections import defaultdict
-from typing import Any, Literal, get_args, Union, Iterable, NamedTuple
+from typing import Any, Literal, get_args, Union, NamedTuple
+from collections.abc import Iterable
class Function(NamedTuple):
diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py
index 743cae0936..557d21727b 100755
--- a/src/ifccsv/ifccsv.py
+++ b/src/ifccsv/ifccsv.py
@@ -29,7 +29,8 @@ import ifcopenshell.util.selector
import ifcopenshell.util.element
import ifcopenshell.util.schema
from statistics import mean
-from typing import Optional, Union, Literal, Iterable
+from typing import Optional, Union, Literal
+from collections.abc import Iterable
try:
from odf.namespaces import OFFICENS
diff --git a/src/ifcfm/ifcfm/cobie24.py b/src/ifcfm/ifcfm/cobie24.py
index 8eed8f801a..778d49de79 100644
--- a/src/ifcfm/ifcfm/cobie24.py
+++ b/src/ifcfm/ifcfm/cobie24.py
@@ -26,7 +26,8 @@ import ifcopenshell.util.placement
import ifcopenshell.util.shape
import ifcopenshell.util.system
from ifcopenshell.util.shape_builder import np_matrix_to_euler
-from typing import Any, Union, Optional, Generator
+from typing import Any, Union, Optional
+from collections.abc import Generator
# The original BIMServer plugin has a function called ifcToCOBie:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_segment_to_layout.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_segment_to_layout.py
index c92e475106..420fa2be60 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_segment_to_layout.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_segment_to_layout.py
@@ -20,7 +20,6 @@ import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
from ifcopenshell import entity_instance
-from typing import Sequence
def add_segment_to_layout(file: ifcopenshell.file, alignment: entity_instance, segment: entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_alignment_by_pi_method.py
index 67d55f70dc..3d9fbf1440 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_alignment_by_pi_method.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_alignment_by_pi_method.py
@@ -19,7 +19,7 @@
import ifcopenshell
import ifcopenshell.api.alignment.add_vertical_alignment
from ifcopenshell import entity_instance
-from typing import Sequence
+from collections.abc import Sequence
def add_vertical_alignment_by_pi_method(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_by_pi_method.py
index dab4dae4fd..1dfba543e3 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_by_pi_method.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_by_pi_method.py
@@ -21,7 +21,7 @@ import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
from ifcopenshell import entity_instance
-from typing import Sequence
+from collections.abc import Sequence
def create_alignment_by_pi_method(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_from_csv.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_from_csv.py
index 8643ea1405..31fca7ccdb 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_from_csv.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment_from_csv.py
@@ -30,7 +30,6 @@ from ifcopenshell import entity_instance
from ifcopenshell.api.alignment import get_axis_subcontext
import math
-from typing import Sequence
import csv
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_geometric_representation.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_geometric_representation.py
index 8f38d7b2b0..aa4adcbcc1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_geometric_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_geometric_representation.py
@@ -22,7 +22,7 @@ import ifcopenshell.api.geometry
from ifcopenshell import entity_instance
import math
-from typing import Sequence
+from collections.abc import Sequence
def create_geometric_representation(file: ifcopenshell.file, alignment: entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_horizontal_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_horizontal_alignment_by_pi_method.py
index e7d15c942f..88da4eff15 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_horizontal_alignment_by_pi_method.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_horizontal_alignment_by_pi_method.py
@@ -21,7 +21,7 @@ import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
import math
-from typing import Sequence
+from collections.abc import Sequence
def create_horizontal_alignment_by_pi_method(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_vertical_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_vertical_alignment_by_pi_method.py
index 42652fc9b7..227988833c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_vertical_alignment_by_pi_method.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_vertical_alignment_by_pi_method.py
@@ -21,7 +21,7 @@ import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
import math
-from typing import Sequence
+from collections.abc import Sequence
def create_vertical_alignment_by_pi_method(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py
index 929634f6b9..897ab22da8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py
@@ -19,7 +19,7 @@
import ifcopenshell
import ifcopenshell.util
from ifcopenshell import entity_instance
-from typing import Sequence
+from collections.abc import Sequence
import ifcopenshell.util.representation
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py
index b59d623f26..6986c10182 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py
@@ -19,7 +19,6 @@
import ifcopenshell
import ifcopenshell.util
from ifcopenshell import entity_instance
-from typing import Sequence
import ifcopenshell.util.representation
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py
index 7e80477a03..2833dfa883 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py
@@ -19,7 +19,7 @@
import ifcopenshell
import ifcopenshell.util
from ifcopenshell import entity_instance
-from typing import Sequence
+from collections.abc import Sequence
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py
index c2889bdc3f..7365bbeec8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py
@@ -19,7 +19,6 @@
import ifcopenshell
import ifcopenshell.util
from ifcopenshell import entity_instance
-from typing import Sequence
import ifcopenshell.util.representation
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py
index dfd6fb8629..5115f9e37a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py
@@ -19,7 +19,6 @@
import ifcopenshell
import ifcopenshell.util
from ifcopenshell import entity_instance
-from typing import Sequence
import ifcopenshell.util.representation
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py
index 90f72972dd..4371ba18e1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py
@@ -19,7 +19,7 @@
import ifcopenshell
from ifcopenshell import entity_instance
from ifcopenshell.api.alignment import get_axis_subcontext
-from typing import Sequence
+from collections.abc import Sequence
import math
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_horizontal_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_horizontal_segment.py
index a51fcd6808..2df95f8e88 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_horizontal_segment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_horizontal_segment.py
@@ -19,7 +19,7 @@
import ifcopenshell
from ifcopenshell import entity_instance
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
-from typing import Sequence
+from collections.abc import Sequence
import math
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_segments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_segments.py
index f668fc5010..68eb217c67 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_segments.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_segments.py
@@ -19,7 +19,6 @@
import ifcopenshell
import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
-from typing import Sequence
def map_alignment_segments(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_vertical_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_vertical_segment.py
index d02a389106..f2f654cf7c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_vertical_segment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_vertical_segment.py
@@ -19,7 +19,7 @@
import ifcopenshell
from ifcopenshell import ifcopenshell_wrapper
from ifcopenshell import entity_instance
-from typing import Sequence
+from collections.abc import Sequence
import math
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py
index 41d6ff968f..cb6d6f93f4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py
@@ -18,7 +18,6 @@
import ifcopenshell
from ifcopenshell import entity_instance
-from typing import Sequence
def name_segments(prefix: str, alignment: entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_curve_segment_transition_code.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_curve_segment_transition_code.py
index 2eae483eb2..6f99f9a40f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_curve_segment_transition_code.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_curve_segment_transition_code.py
@@ -21,7 +21,6 @@ import ifcopenshell.api
from ifcopenshell import ifcopenshell_wrapper
import ifcopenshell.geom
from ifcopenshell import entity_instance
-from typing import Sequence
import numpy as np
import math
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py
index 0a07c8a328..6be41f57bf 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py
@@ -19,7 +19,6 @@
import ifcopenshell
import ifcopenshell.api.alignment
import math
-from typing import Sequence
import numpy as np
diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py
index 162bc867e8..f3af61a81c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
import ifcopenshell
-from typing import Union, Literal, Sequence
+from typing import Union, Literal
+from collections.abc import Sequence
IfcLogical = Union[bool, Literal["UNKNOWN"]]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py
index c72cca657e..3637dcaca7 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py
@@ -18,7 +18,7 @@
import ifcopenshell.api.style
import ifcopenshell.util.element
-from typing import Iterable
+from collections.abc import Iterable
def remove_style(file: ifcopenshell.file, style: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py
index 8c915646bc..576a35459b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py
@@ -22,7 +22,7 @@ import ifcopenshell.api.owner
import ifcopenshell.api.material
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union, Iterable, Any
+from typing import Union
def assign_type(
diff --git a/src/ifcopenshell-python/ifcopenshell/draw.py b/src/ifcopenshell-python/ifcopenshell/draw.py
index 40c7fce7e0..8a21789db1 100644
--- a/src/ifcopenshell-python/ifcopenshell/draw.py
+++ b/src/ifcopenshell-python/ifcopenshell/draw.py
@@ -29,7 +29,7 @@ import ifcopenshell.geom
from xml.dom.minidom import parseString
from dataclasses import dataclass, fields, field
-from typing import Callable, Sequence
+from collections.abc import Callable, Sequence
import numpy
diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py
index 8380670806..d125e77373 100644
--- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py
+++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py
@@ -25,7 +25,8 @@ import operator
import subprocess
import sys
import time
-from typing import Union, Any, Callable, TypeVar, overload, Iterable, Sequence
+from typing import Union, Any, TypeVar, overload
+from collections.abc import Callable, Sequence
from . import ifcopenshell_wrapper
from . import settings
diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py
index 81503185ab..739c545fbf 100644
--- a/src/ifcopenshell-python/ifcopenshell/file.py
+++ b/src/ifcopenshell-python/ifcopenshell/file.py
@@ -24,15 +24,8 @@ import zipfile
import functools
import ifcopenshell
from pathlib import Path
-from typing import Any
-from typing import Callable
-from typing import Generator
-from typing import Optional
-from typing import TYPE_CHECKING
-from typing import Union
-from typing import overload
-from typing import Literal
-from typing import TypedDict
+from typing import Any, Optional, TYPE_CHECKING, Union, overload, Literal, TypedDict
+from collections.abc import Callable, Generator
# py39 compat: re-enable when support is dropped
# from typing_extensions import assert_never
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/app.py b/src/ifcopenshell-python/ifcopenshell/geom/app.py
index fa79fdb3ed..aa11f18c1f 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/app.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/app.py
@@ -34,11 +34,7 @@ except ImportError:
USE_OCCT_HANDLE = True
from collections import defaultdict, OrderedDict
-
-try: # python 3.3+
- from collections.abc import Iterable
-except ModuleNotFoundError: # python 2
- from collections import Iterable
+from collections.abc import Iterable
try:
QString = unicode
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py
index 27b72e8297..927597996d 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/main.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py
@@ -28,7 +28,8 @@ from ..entity_instance import entity_instance
from . import has_occ
-from typing import TypeVar, Union, Optional, Generator, Any, Literal, overload, TYPE_CHECKING, Iterable, cast, TypedDict
+from typing import TypeVar, Union, Optional, Any, Literal, overload, TYPE_CHECKING, cast
+from collections.abc import Generator, Iterable
if TYPE_CHECKING:
from OCC.Core import TopoDS
diff --git a/src/ifcopenshell-python/ifcopenshell/util/cost.py b/src/ifcopenshell-python/ifcopenshell/util/cost.py
index 9c434d6ce3..3027897520 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/cost.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/cost.py
@@ -18,7 +18,8 @@
import lark
import ifcopenshell
-from typing import Optional, Union, Literal, Generator, Any
+from typing import Optional, Union, Literal, Any
+from collections.abc import Generator
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
from ifcopenshell.util.doc import get_predefined_type_doc
from ifcopenshell.util.element import get_psets
diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py
index 371e5b8661..042d46c751 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/element.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/element.py
@@ -20,7 +20,8 @@ import ifcopenshell
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.representation
-from typing import Any, Callable, Optional, Union, Literal, overload, Sequence, Generator
+from typing import Any, Callable, Optional, Union, Literal, overload
+from collections.abc import Generator, Sequence
from collections import namedtuple
diff --git a/src/ifcopenshell-python/ifcopenshell/util/placement.py b/src/ifcopenshell-python/ifcopenshell/util/placement.py
index 51572561a1..98cd98b5ef 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/placement.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/placement.py
@@ -19,8 +19,8 @@
import numpy as np
import numpy.typing as npt
import ifcopenshell
-from typing import Literal, Iterable, Optional
-
+from typing import Literal, Optional
+from collections.abc import Iterable
MatrixType = npt.NDArray[np.float64]
"""`npt.NDArray[np.float64]`"""
diff --git a/src/ifcopenshell-python/ifcopenshell/util/representation.py b/src/ifcopenshell-python/ifcopenshell/util/representation.py
index 3d6e7a9da2..10743294b0 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/representation.py
@@ -22,7 +22,8 @@ import ifcopenshell
import ifcopenshell.util.representation
import ifcopenshell.util.placement
import ifcopenshell.util.shape
-from typing import Optional, Union, TypedDict, Literal, Generator, Sequence
+from typing import Optional, Union, TypedDict, Literal
+from collections.abc import Generator, Sequence
CONTEXT_TYPE = Literal["Model", "Plan", "NotDefined"]
diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py
index 95576c447a..100cd70403 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/selector.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py
@@ -35,7 +35,8 @@ import ifcopenshell.util.shape
import ifcopenshell.util.system
import ifcopenshell.util.unit
from decimal import Decimal
-from typing import Optional, Any, Union, Iterable
+from typing import Optional, Any, Union
+from collections.abc import Iterable
if sys.version_info >= (3, 10):
from types import EllipsisType
diff --git a/src/ifcopenshell-python/ifcopenshell/util/sequence.py b/src/ifcopenshell-python/ifcopenshell/util/sequence.py
index 121c4d2273..d1ebcea393 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/sequence.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/sequence.py
@@ -20,7 +20,8 @@ import datetime
import ifcopenshell.util.date
from math import floor
from functools import cache
-from typing import Union, Literal, Optional, Iterator
+from typing import Union, Literal, Optional
+from collections.abc import Iterator
DURATION_TYPE = Literal["ELAPSEDTIME", "WORKTIME", "NOTDEFINED"]
diff --git a/src/ifcopenshell-python/ifcopenshell/util/shape.py b/src/ifcopenshell-python/ifcopenshell/util/shape.py
index 2047de1834..06d5af3fd3 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/shape.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/shape.py
@@ -27,7 +27,7 @@ import ifcopenshell.util.representation
from ifcopenshell.util.shape_builder import VectorType
from math import radians, cos
from ifcopenshell.geom import ShapeElementType, ShapeType
-from typing import Optional, Literal, Union, Iterable
+from typing import Optional, Literal, Union
tol = 1e-6
AXIS_LITERAL = Literal["X", "Y", "Z"]
diff --git a/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py b/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py
index 4eab7844c5..af9c3c5146 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py
@@ -28,7 +28,8 @@ import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.unit
from math import cos, sin, pi, tan, radians, degrees, atan, sqrt
-from typing import Union, Optional, Literal, Any, Sequence, TYPE_CHECKING
+from typing import Union, Optional, Literal, Any, TYPE_CHECKING
+from collections.abc import Sequence
from itertools import chain
PRECISION = 1.0e-5
diff --git a/src/ifcopenshell-python/ifcopenshell/util/unit.py b/src/ifcopenshell-python/ifcopenshell/util/unit.py
index d712eb365a..fbebb799d0 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/unit.py
@@ -18,10 +18,8 @@
from fractions import Fraction
from math import pi
-from typing import Literal
-from typing import Optional
-from typing import Union
-from typing import Generator
+from typing import Literal, Optional, Union
+from collections.abc import Generator
import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
diff --git a/src/ifcopenshell-python/ifcopenshell/validate.py b/src/ifcopenshell-python/ifcopenshell/validate.py
index 7b90478583..330bf0b226 100644
--- a/src/ifcopenshell-python/ifcopenshell/validate.py
+++ b/src/ifcopenshell-python/ifcopenshell/validate.py
@@ -50,7 +50,8 @@ import types
import argparse
from collections import namedtuple
-from typing import Union, Iterator, Any, Optional
+from typing import Union, Any, Optional
+from collections.abc import Iterator
from logging import Logger, Handler
if sys.version_info >= (3, 10):
diff --git a/src/ifcpatch/ifcpatch/__init__.py b/src/ifcpatch/ifcpatch/__init__.py
index 211041cd87..91acba3bd4 100644
--- a/src/ifcpatch/ifcpatch/__init__.py
+++ b/src/ifcpatch/ifcpatch/__init__.py
@@ -30,8 +30,9 @@ import importlib
import importlib.util
import re
from pathlib import Path
-from typing import Union, Iterable, Optional, Any, TypedDict, Literal, Sequence
+from typing import Union, Optional, Any, TypedDict
from typing_extensions import NotRequired
+from collections.abc import Sequence
__version__ = version = "0.0.0"
diff --git a/src/opencdeserver/api/app/api/logging.py b/src/opencdeserver/api/app/api/logging.py
index 8090ae9c7d..49131c0ce1 100644
--- a/src/opencdeserver/api/app/api/logging.py
+++ b/src/opencdeserver/api/app/api/logging.py
@@ -3,7 +3,7 @@ from starlette.background import BackgroundTask
from starlette.responses import StreamingResponse
from fastapi.routing import APIRoute
from starlette.types import Message
-from typing import Callable, Dict, Any
+from typing import Callable
import logging
import httpx