summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2023-05-11 10:30:15 +0200
committerStefan Behnel <stefan_ml@behnel.de>2023-05-11 10:30:15 +0200
commitc6b7e621e4696c02bf8f6ea423ffbbf2109748ab (patch)
treef840bbfeb84f399fd9d3288e253de02029c2dca0
parent07db761f9f027d1814a43686cda6fca26e37a931 (diff)
downloadpython-lxml-c6b7e621e4696c02bf8f6ea423ffbbf2109748ab.tar.gz
Avoid using the deprecated "imp" module.HEADmaster
Closes https://bugs.launchpad.net/lxml/+bug/2018137
-rw-r--r--src/lxml/html/tests/test_html5parser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lxml/html/tests/test_html5parser.py b/src/lxml/html/tests/test_html5parser.py
index bcf7f1b1..57878a5e 100644
--- a/src/lxml/html/tests/test_html5parser.py
+++ b/src/lxml/html/tests/test_html5parser.py
@@ -44,7 +44,8 @@ except ImportError:
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)