[Python-checkins] cpython: Issue #11186: pydoc ignores a module if its name contains a surrogate character
victor.stinner
python-checkins at python.org
Tue Apr 12 23:44:44 CEST 2011
http://hg.python.org/cpython/rev/506cab8fc329
changeset: 69276:506cab8fc329
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue Apr 12 23:41:50 2011 +0200
summary:
Issue #11186: pydoc ignores a module if its name contains a surrogate character
in the index of modules.
files:
Lib/pydoc.py | 3 +++
Misc/NEWS | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -952,6 +952,9 @@
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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,9 @@
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.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list