Skip to content

Commit eea68ae

Browse files
Add deprecation warning for nutils.SI, nutils.unit
1 parent f35575c commit eea68ae

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/nutils/SI.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@
125125
import typing
126126
import numpy
127127
from functools import partial, partialmethod, reduce
128-
from . import function, topology, sample
128+
from . import function, topology, sample, warnings
129+
130+
warnings.deprecation("nutils.SI is deprecated and will be removed in Nutils 11; please use the externally installable nutils.units instead (pip install nutils-units)")
129131

130132

131133
class DimensionError(TypeError):

src/nutils/unit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
'''
4040

4141
import re
42+
from . import warnings
43+
44+
warnings.deprecation("nutils.unit is deprecated and will be removed in Nutils 11; please use the externally installable nutils.units instead (pip install nutils-units)")
4245

4346

4447
def create(_typename='unit', **units):

0 commit comments

Comments
 (0)