Rename sys_path_hacks/ to import_shims/

The old folder name is somewhat confusing, because the
folder contains shims to _compensate for the removal
of sys.path hacks_, but does not contain the sys.path
hacks themselves.

Furthermore, this import_shims/ system could also be
used for other import path changes, such as turning
the locally-installed packages in common/lib/
into regular, importable modules
(e.g. `from common.lib.xmodule import abc` instead of
`from xmodule import abc`). So, a name that is not
specific to the sys.path hacks may be better
in the medium-to-long term.

Along the same lines, we also rename SysPathHackWarning
to DeprecatedEdxPlatformImportWarning.
This commit is contained in:
Kyle McCormick
2020-10-27 15:43:22 -04:00
committed by Kyle McCormick
parent 644963255c
commit 090e10683c
11 changed files with 111 additions and 107 deletions

View File

@@ -13,7 +13,7 @@ from path import Path
# TODO: Remove the rest of the sys.path modification here and in (cms|lms)/envs/common.py
REPO_ROOT = Path(__file__).abspath().dirname().dirname().dirname() # /edx-platform/
sys.path.append(REPO_ROOT / 'common' / 'djangoapps')
sys.path.append(REPO_ROOT / 'sys_path_hacks' / 'lms')
sys.path.append(REPO_ROOT / 'import_shims' / 'lms')
ALL_LANGUAGES = []