diff --git a/hugr-py/src/hugr/passes/_composable_pass.py b/hugr-py/src/hugr/passes/_composable_pass.py new file mode 100644 index 000000000..bad625bc3 --- /dev/null +++ b/hugr-py/src/hugr/passes/_composable_pass.py @@ -0,0 +1,20 @@ +"""A Protocol for a composable pass. + +Deprecated module alias for `hugr.passes.composable_pass`. +""" + +from .composable_pass import ( + ComposablePass, + ComposedPass, + PassName, + PassResult, + implement_pass_run, +) + +__all__ = [ + "PassName", + "PassResult", + "ComposedPass", + "ComposablePass", + "implement_pass_run", +] diff --git a/hugr-py/src/hugr/passes/composable_pass.py b/hugr-py/src/hugr/passes/composable_pass.py index 5990c6347..b3cb49474 100644 --- a/hugr-py/src/hugr/passes/composable_pass.py +++ b/hugr-py/src/hugr/passes/composable_pass.py @@ -1,7 +1,4 @@ -"""A Protocol for a composable pass. - -Currently unstable. -""" +"""A Protocol for a composable pass.""" from __future__ import annotations diff --git a/hugr-py/tests/test_passes.py b/hugr-py/tests/test_passes.py index 5df6464ae..426bda68d 100644 --- a/hugr-py/tests/test_passes.py +++ b/hugr-py/tests/test_passes.py @@ -6,9 +6,14 @@ import pytest from hugr.hugr.base import Hugr -from hugr.passes.composable_pass import ( + +# Import some items from the deprecated module and some from the stable +# version to ensure the deprecated module is still functional. +from hugr.passes._composable_pass import ( ComposablePass, ComposedPass, +) +from hugr.passes.composable_pass import ( PassResult, implement_pass_run, )