Skip to content

Commit bf59dda

Browse files
committed
Deprecate galgebra.utils
1 parent 4c91c3a commit bf59dda

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

doc/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Changelog
33
=========
44

5+
- :support:`280` The ``galgebra.utils`` module, which provided Python 2 compatibility helpers, has been deprecated.
6+
57
- :support:`245` (also :issue:`248`) The following attributes have been deprecated to reduce the number of similar members in :class:`~galgebra.ga.Ga`.
68

79
* Unified into :attr:`galgebra.ga.Ga.blade_expansion_dict`:

galgebra/utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44

55
import sys
66
import collections
7+
import warnings
78

89
from io import StringIO # noqa: F401
910

11+
# galgebra 0.5.0
12+
warnings.warn(
13+
"galgebra.utils is deprecated and will be removed. "
14+
"If you need python 2 compatibility helpers, use a decdicated module like "
15+
"`six`.", DeprecationWarning, stacklevel=2)
16+
1017
# From https://github.com/benjaminp/six/blob/master/six.py
1118
PY2 = sys.version_info[0] == 2
1219
PY3 = sys.version_info[0] == 3

test/test_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,3 +475,6 @@ def test_deprecations(self):
475475
# all derived from
476476
ga.blade_expansion_dict
477477
ga.base_expansion_dict
478+
479+
with pytest.warns(DeprecationWarning):
480+
import galgebra.utils

0 commit comments

Comments
 (0)