Load the specified module into sys.modules and return it. This method is deprecated. Use loader.exec_module() instead.
(self, fullname)
| 523 | |
| 524 | # Typically used by loader classes as a method replacement. |
| 525 | def _load_module_shim(self, fullname): |
| 526 | """Load the specified module into sys.modules and return it. |
| 527 | |
| 528 | This method is deprecated. Use loader.exec_module() instead. |
| 529 | |
| 530 | """ |
| 531 | msg = ("the load_module() method is deprecated and slated for removal in " |
| 532 | "Python 3.15; use exec_module() instead") |
| 533 | _warnings.warn(msg, DeprecationWarning) |
| 534 | spec = spec_from_loader(fullname, self) |
| 535 | if fullname in sys.modules: |
| 536 | module = sys.modules[fullname] |
| 537 | _exec(spec, module) |
| 538 | return sys.modules[fullname] |
| 539 | else: |
| 540 | return _load(spec) |
| 541 | |
| 542 | # Module specifications ####################################################### |
| 543 |
no test coverage detected