From 6cd441d129ca9b3ba4d13af5494303edbcd02b22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 31 Jul 2001 08:54:55 +0000 Subject: [PATCH] Add dead imports of modules that are "magically" imported. --- Lib/codecs.py | 6 ++++++ Lib/xml/sax/__init__.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/Lib/codecs.py b/Lib/codecs.py index b3c2f71efd..ebcec1c2e8 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -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__': diff --git a/Lib/xml/sax/__init__.py b/Lib/xml/sax/__init__.py index 0375e5deb8..f119d8419e 100644 --- a/Lib/xml/sax/__init__.py +++ b/Lib/xml/sax/__init__.py @@ -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"], ",") -- 2.49.0