From: Victor Stinner Date: Tue, 12 Apr 2011 21:41:50 +0000 (+0200) Subject: Issue #11186: pydoc ignores a module if its name contains a surrogate character X-Git-Tag: v3.3.0a1~2611 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d65224f68c73373587c2ea69ac91ad6dd4fd95c;p=python Issue #11186: pydoc ignores a module if its name contains a surrogate character in the index of modules. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 739b440696..8e14ee757d 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -952,6 +952,9 @@ class HTMLDoc(Doc): modpkgs = [] if shadowed is None: shadowed = {} for importer, name, ispkg in pkgutil.iter_modules([dir]): + if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name): + # ignore a module if its name contains a surrogate character + continue modpkgs.append((name, '', ispkg, name in shadowed)) shadowed[name] = 1 diff --git a/Misc/NEWS b/Misc/NEWS index 25dfd910c8..9a12912e8a 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -103,6 +103,9 @@ Core and Builtins Library ------- +- Issue #11186: pydoc ignores a module if its name contains a surrogate + character in the index of modules. + - Issue #11815: Use a light-weight SimpleQueue for the result queue in concurrent.futures.ProcessPoolExecutor.