]> granicus.if.org Git - python/commitdiff
Add dead imports of modules that are "magically" imported.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 31 Jul 2001 08:54:55 +0000 (08:54 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 31 Jul 2001 08:54:55 +0000 (08:54 +0000)
Lib/codecs.py
Lib/xml/sax/__init__.py

index b3c2f71efd6aa5faad522ae16ac8e7291e44863c..ebcec1c2e86924c6d3923275fa3e6aa104e9b0ed 100644 (file)
@@ -575,6 +575,12 @@ def make_encoding_map(decoding_map):
             m[v] = None
     return m
 
+# Tell modulefinder that using codecs probably needs the encodings
+# package
+_false = 0
+if _false:
+    import encodings
+
 ### Tests
 
 if __name__ == '__main__':
index 0375e5deb8c6f52a4e4e74e18c7c92a2864dfbe0..f119d8419e434c31ce0a7f0478b6ef7a83fcfe74 100644 (file)
@@ -53,6 +53,11 @@ def parseString(string, handler, errorHandler=ErrorHandler()):
 
 default_parser_list = ["xml.sax.expatreader"]
 
+# tell modulefinder that importing sax potentially imports expatreader
+_false = 0
+if _false:
+    import xml.sax.expatreader
+
 import os, string, sys
 if os.environ.has_key("PY_SAX_PARSER"):
     default_parser_list = string.split(os.environ["PY_SAX_PARSER"], ",")