diff --git a/hgdemandimport/__init__.py b/hgdemandimport/__init__.py
index c6ed4b359c4cd3a224a6c93f9b5e97750ef539ac_aGdkZW1hbmRpbXBvcnQvX19pbml0X18ucHk=..5713adc51f2a8a0955e28a5c15ac56ff4372e899_aGdkZW1hbmRpbXBvcnQvX19pbml0X18ucHk= 100644
--- a/hgdemandimport/__init__.py
+++ b/hgdemandimport/__init__.py
@@ -63,6 +63,7 @@
     '_weakrefset',
     'warnings',
     'threading',
+    'collections.abc',
 }
 
 _pypy = '__pypy__' in sys.builtin_module_names
diff --git a/tests/test-demandimport.py b/tests/test-demandimport.py
index c6ed4b359c4cd3a224a6c93f9b5e97750ef539ac_dGVzdHMvdGVzdC1kZW1hbmRpbXBvcnQucHk=..5713adc51f2a8a0955e28a5c15ac56ff4372e899_dGVzdHMvdGVzdC1kZW1hbmRpbXBvcnQucHk= 100644
--- a/tests/test-demandimport.py
+++ b/tests/test-demandimport.py
@@ -149,6 +149,6 @@
 assert f(type(re.stderr)) == "<class '_io.TextIOWrapper'>", f(type(re.stderr))
 assert f(re) == "<module 'sys' (built-in)>"
 
-assert 'telnetlib' not in sys.modules
-import telnetlib
+assert 'wsgiref' not in sys.modules
+import wsgiref
 
@@ -154,5 +154,5 @@
 
-assert isinstance(telnetlib, _LazyModule)
-assert f(telnetlib) == "<module 'telnetlib' from '?'>"
+assert isinstance(wsgiref, _LazyModule)
+assert f(wsgiref) == "<module 'wsgiref' from '?'>"
 
 try:
@@ -157,6 +157,6 @@
 
 try:
-    from telnetlib import unknownattr
+    from wsgiref import unknownattr
 
     assert False, (
         'no demandmod should be created for attribute of non-package '
@@ -160,7 +160,7 @@
 
     assert False, (
         'no demandmod should be created for attribute of non-package '
-        'module:\ntelnetlib.unknownattr = %s' % f(unknownattr)
+        'module:\nwsgiref.unknownattr = %s' % f(unknownattr)
     )
 except ImportError as inst:
     assert rsub(r"'", '', str(inst)).startswith(
@@ -177,5 +177,5 @@
 
 
 # test deactivation for issue6725
-del sys.modules['telnetlib']
+del sys.modules['wsgiref']
 with demandimport.deactivated():
@@ -181,4 +181,4 @@
 with demandimport.deactivated():
-    import telnetlib
-assert telnetlib.__loader__ == telnetlib.__spec__.loader
-assert telnetlib.__loader__.get_resource_reader
+    import wsgiref
+assert wsgiref.__loader__ == wsgiref.__spec__.loader
+assert wsgiref.__loader__.get_resource_reader
diff --git a/tests/test-verify-repo-operations.py b/tests/test-verify-repo-operations.py
index c6ed4b359c4cd3a224a6c93f9b5e97750ef539ac_dGVzdHMvdGVzdC12ZXJpZnktcmVwby1vcGVyYXRpb25zLnB5..5713adc51f2a8a0955e28a5c15ac56ff4372e899_dGVzdHMvdGVzdC12ZXJpZnktcmVwby1vcGVyYXRpb25zLnB5 100644
--- a/tests/test-verify-repo-operations.py
+++ b/tests/test-verify-repo-operations.py
@@ -36,7 +36,7 @@
 
 import binascii
 from contextlib import contextmanager
-import pipes
+import shlex
 import shutil
 import silenttestrunner
 import subprocess
@@ -267,7 +267,7 @@
         if os.path.exists(path):
             return
         self.log.append(
-            "$ mkdir -p -- %s" % (pipes.quote(os.path.relpath(path)),)
+            "$ mkdir -p -- %s" % (shlex.quote(os.path.relpath(path)),)
         )
         os.makedirs(path)
 
@@ -276,7 +276,7 @@
         if path == ".":
             return
         os.chdir(path)
-        self.log.append("$ cd -- %s" % (pipes.quote(path),))
+        self.log.append("$ cd -- %s" % (shlex.quote(path),))
 
     def hg(self, *args):
         extra_flags = []
@@ -286,7 +286,7 @@
         self.command("hg", *(tuple(extra_flags) + args))
 
     def command(self, *args):
-        self.log.append("$ " + ' '.join(map(pipes.quote, args)))
+        self.log.append("$ " + ' '.join(map(shlex.quote, args)))
         subprocess.check_output(args, stderr=subprocess.STDOUT)
 
     # Section: Set up basic data
@@ -355,7 +355,7 @@
             )
             % (
                 binascii.hexlify(content),
-                pipes.quote(path),
+                shlex.quote(path),
             )
         )
 
@@ -405,7 +405,7 @@
         if amend:
             errors.append("cannot amend public changesets")
             command.append("--amend")
-        command.append("-m" + pipes.quote(message))
+        command.append("-m" + shlex.quote(message))
         if secret:
             command.append("--secret")
         if close_branch: