Skip to content

Commit a2dcb3d

Browse files
author
Byron Boulton
committed
Remove warnings from python.py.in
Signed-off-by: Byron Boulton <bboulton@ara.com>
1 parent b173432 commit a2dcb3d

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

init/python.py.in

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
# Note that all variables in this file are prepended with "_" so if someone
2-
# runs `from python import *` they should only really see the `module` function
3-
# coming from `env_modules.py` and not implementation details of this file.
4-
from pathlib import Path as _Path
5-
from textwrap import fill as _fill
6-
import sys as _sys
7-
import warnings as _warnings
8-
9-
_warning = """
1+
"""
102
@initdir@/python.py exists for backwards compatibility with old releases
113
of environment modules. Going forward, users should ensure @initdir@ is on
124
their PYTHONPATH, then have their Python code include `from env_modules import
135
module`.
146
"""
15-
with _warnings.catch_warnings():
16-
_warnings.simplefilter("always")
17-
_warnings.warn('\n' + _fill(_warning), DeprecationWarning)
7+
8+
# Note that all variables in this file are prepended with "_" so if someone
9+
# runs `from python import *` they should only really see the `module` function
10+
# coming from `env_modules.py` and not implementation details of this file.
11+
from pathlib import Path as _Path
12+
import sys as _sys
1813

1914
# Ensure this directory is in import path
2015
_init_dir = str(_Path(@initdir@).parent.absolute())
@@ -27,6 +22,3 @@ from env_modules import *
2722
del _Path
2823
del _sys
2924
del _init_dir
30-
del _warning
31-
del _warnings
32-
del _fill

0 commit comments

Comments
 (0)