Files
odysseus/routes/research_routes.py
T
Tal.Yuan bb2148db73 refactor(routes): move research domain into routes/research/ subpackage
Move the research route domain into the canonical routes/research/ subpackage while preserving the legacy routes.research_routes import path through a sys.modules compatibility shim.

The moved canonical module is behavior-preserving, app wiring now imports the canonical route setup function, source-introspection tests point at the new canonical path, and shim regression coverage pins legacy/canonical same-object behavior plus string-targeted monkeypatch reach-through.

Refs #4082.
Refs #4071.
2026-06-28 14:34:11 +01:00

18 lines
761 B
Python

"""Backward-compat shim — canonical location is routes/research/research_routes.py.
This module is replaced in ``sys.modules`` by the canonical module object so
that ``import routes.research_routes``, ``from routes.research_routes import X``,
``importlib.import_module("routes.research_routes")``, and
``monkeypatch.setattr("routes.research_routes.ATTR", ...)`` (string-targeted
patch used by ``test_research_owner_scope_routes.py``) all operate on the
*same* object the application actually uses. Keeps existing import paths
working after slice 2b (#4082/#4071). Source-introspection tests read the
canonical file by path.
"""
import sys as _sys
from routes.research import research_routes as _canonical # noqa: F401
_sys.modules[__name__] = _canonical