Issue 3314. The sys module is used in an error case.
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index c92b5aa..dbb7c36 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -310,6 +310,10 @@
         self.assertEqual(urllib.parse.urlparse("http://example.com?blahblah=/foo"),
                          ('http', 'example.com', '', '', 'blahblah=/foo', ''))
 
+    def test_usingsys(self):
+        # Issue 3314: sys module is used in the error
+        self.assertRaises(TypeError, urllib.parse.urlencode, "foo")
+
 def test_main():
     support.run_unittest(UrlParseTestCase)