get_compat_module
Retrieves or creates a compatibility module for a given package and name by either importing an existing module or dynamically constructing one from a predefined attribute mapping.
def get_compat_module(
pkg: module,
name: string
) - > module
Retrieves or constructs a compatibility module for a given package, facilitating backward compatibility by mapping legacy module names to new implementations.
Parameters
| Name | Type | Description |
|---|---|---|
| pkg | module | The parent package object where the compatibility module should be registered or associated. |
| name | string | The name of the compatibility module to retrieve or create within the package namespace. |
Returns
| Type | Description |
|---|---|
module | A module object containing the mapped attributes or a proxy to the imported compatibility module. |