Skip to content

Commit

Permalink
Avoid using the deprecated "imp" module.
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed May 11, 2023
1 parent 07db761 commit c6b7e62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lxml/html/tests/test_html5parser.py
Expand Up @@ -44,7 +44,8 @@ def find_module(self, fullname, path=None):
return None

def load_module(self, fullname):
fake_module = object()
class Cls: pass
fake_module = Cls()
fake_module.__qualname__ = fullname
fake_module.__name__ = fullname.rsplit('.', 1)[-1]
mod = sys.modules.setdefault(fullname, fake_module)
Expand Down

0 comments on commit c6b7e62

Please sign in to comment.