File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
113of environment modules. Going forward, users should ensure @initdir@ is on
124their PYTHONPATH, then have their Python code include `from env_modules import
135module`.
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 *
2722del _Path
2823del _sys
2924del _init_dir
30- del _warning
31- del _warnings
32- del _fill
You can’t perform that action at this time.
0 commit comments