From 0c86a9b6ba2c5ef0cebd6382b1133b0ea15e7002 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Tue, 23 Jul 2024 15:05:29 +0200 Subject: [PATCH] Re-export and deprecate typing and bit_masks modules --- src/pystencils/bit_masks.py | 9 +++++++++ src/pystencils/typing.py | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/pystencils/bit_masks.py create mode 100644 src/pystencils/typing.py diff --git a/src/pystencils/bit_masks.py b/src/pystencils/bit_masks.py new file mode 100644 index 000000000..95a59e1ff --- /dev/null +++ b/src/pystencils/bit_masks.py @@ -0,0 +1,9 @@ +from .sympyextensions.bit_masks import flag_cond as _flag_cond + +from warnings import warn +warn( + "Importing the `pystencils.bit_masks` module is deprecated. " + "Import `flag_cond` from `pystencils.sympyextensions` instead." +) + +flag_cond = _flag_cond diff --git a/src/pystencils/typing.py b/src/pystencils/typing.py new file mode 100644 index 000000000..22f8f673e --- /dev/null +++ b/src/pystencils/typing.py @@ -0,0 +1,11 @@ +from .sympyextensions import TypedSymbol as _TypedSymbol +from .types import create_type as _create_type + +from warnings import warn +warn( + "Importing `TypedSymbol` and `create_type` from `pystencils.typing` is deprecated. " + "Import from `pystencils` instead." +) + +TypedSymbol = _TypedSymbol +create_type = _create_type -- GitLab