diff --git a/hugr-py/src/hugr/hugr.py b/hugr-py/src/hugr/hugr.py index 7e74fe0b4..b4f70050a 100644 --- a/hugr-py/src/hugr/hugr.py +++ b/hugr-py/src/hugr/hugr.py @@ -4,7 +4,6 @@ from enum import Enum from typing import ( Iterable, - Self, Sequence, Protocol, Generic, @@ -14,6 +13,8 @@ ClassVar, ) +from typing_extensions import Self + from hugr.serialization.serial_hugr import SerialHugr from hugr.serialization.ops import BaseOp, OpType as SerialOp import hugr.serialization.ops as sops diff --git a/poetry.lock b/poetry.lock index 24e529051..3112b9dd0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -589,13 +589,13 @@ files = [ [[package]] name = "typing-extensions" -version = "4.11.0" +version = "4.12.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.12.0-py3-none-any.whl", hash = "sha256:b349c66bea9016ac22978d800cfff206d5f9816951f12a7d0ec5578b0a819594"}, + {file = "typing_extensions-4.12.0.tar.gz", hash = "sha256:8cbcdc8606ebcb0d95453ad7dc5065e6237b6aa230a31e81d0f440c30fed5fd8"}, ] [[package]] @@ -621,4 +621,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "487ddc7148ab4801c38871d976104e32eb884e91342ea1cdc05d2aa090489a0c" +content-hash = "1238f0887779cfa07a16819569dcc29377cdf936b5e8c227fd5959250d1977f3" diff --git a/pyproject.toml b/pyproject.toml index 3138b5893..a67f62af5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,9 @@ toml = "^0.10.0" [tool.poetry.group.hugr.dependencies] hugr = { path = "hugr-py", develop = true } + +[tool.poetry.dependencies] +typing-extensions = "^4.12.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"