Skip to content

Commit f5df7b8

Browse files
committed
[tools/version_converter] Use warnings deprecation
1 parent 46309de commit f5df7b8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

odml/tools/version_converter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
This module provides backwards compatibility for the VersionConverter class.
33
It is deprecated and will be removed in future versions.
44
"""
5+
import warnings
56

67
from .converters import VersionConverter
78

8-
print("[DEPRECATION WARNING] The VersionConverter file has been moved to "
9-
"'odml.tools.converters' and will be removed from 'odml.tools' in future "
10-
"odML releases. Please update the imports in your code accordingly.")
9+
_MSG = "The VersionConverter file has been moved to "\
10+
"'odml.tools.converters' and will be removed from 'odml.tools' in future "\
11+
"odML releases. Please update the imports in your code accordingly."
12+
warnings.warn(_MSG, category=DeprecationWarning, stacklevel=2)

0 commit comments

Comments
 (0)