core: move split compat/legacy modules into hpi_compat and compat

This commit is contained in:
Dima Gerasimov 2023-10-28 17:23:26 +01:00
parent 70bf51a125
commit 412eed0eaf
9 changed files with 72 additions and 62 deletions

View file

@ -19,7 +19,7 @@ REQUIRES = [
]
from my.core.legacy import handle_legacy_import
from my.core.hpi_compat import handle_legacy_import
is_legacy_import = handle_legacy_import(
parent_module_name=__name__,
legacy_submodule_name='rexport',

View file

@ -67,7 +67,7 @@ config = make_config(reddit, migration=migration)
try:
from rexport import dal
except ModuleNotFoundError as e:
from my.core.compat import pre_pip_dal_handler
from my.core.hpi_compat import pre_pip_dal_handler
dal = pre_pip_dal_handler('rexport', e, config, requires=REQUIRES)
# TODO ugh. this would import too early