Skip to content

Commit

Permalink
🐛 fix deprecated Loader.load_module() (#9078) (#9114)
Browse files Browse the repository at this point in the history
* 🐛 fix deprecated `Loader.load_module()`

* 📝add docstring to please linter

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit ee0b036)

Co-authored-by: Lukas Burgholzer <[email protected]>
  • Loading branch information
mergify[bot] and burgholzer authored Nov 11, 2022
1 parent 7b4afa5 commit 93791df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qiskit/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def __init__(self, new_package, old_namespace):
def module_repr(self, module):
return repr(module)

def create_module(self, spec):
return self.load_module(spec.name)

def exec_module(self, module):
"""Executes the module. Not needed in Qiskit."""
pass

def load_module(self, fullname):
old_name = fullname
fullname = _new_namespace(fullname, self.old_namespace, self.new_package)
Expand Down

0 comments on commit 93791df

Please sign in to comment.