[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-15 Thread Éric Araujo
Éric Araujo added the comment: > It is really a bad idea to choose an *undecodable* name for a module. > You will not be able to write its name using "import name" syntax. Okay, makes sense that pydoc ignores those. You speak about a user choosing to create such a filename though; is it possi

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-13 Thread STINNER Victor
STINNER Victor added the comment: > If a user unknowingly creates such a module with an unencodable > filename, will they understand why pydoc does not display it? It is really a bad idea to choose an *undecodable* name for a module. You will not be able to write its name using "import name" s

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-13 Thread Éric Araujo
Éric Araujo added the comment: The wording “pydoc ignores a module” is confusing to me: I can’t tell whether it is a description of the bug (“pydoc ignored a module”) or the new, correct behavior (“pydoc now ignores a module”). Regarding the problem and fix itself, I’m wondering. If a user u

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 506cab8fc329 by Victor Stinner in branch 'default': Issue #11186: pydoc ignores a module if its name contains a surrogate character http://hg.python.org/cpython/rev/506cab8fc329 -- nosy: +python-dev ___

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-02-11 Thread STINNER Victor
STINNER Victor added the comment: Oops, my isUndecodableFilename() example is wrong. PEP 383 only uses U+DC80..U+DCFF range: def isUndecodableFilename(filename): return any((0xDC80 <= ord(ch) <= 0xDCFF) for ch in filename) Example of undecodable filename: b'bla\xe9\xff.py' with UTF-8 filesy

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-02-11 Thread STINNER Victor
New submission from STINNER Victor : If you have an undecodable filenames on UNIX, Python 3 escapes undecodable bytes using surrogates. pydoc: HTMLDoc.index() uses indirectly os.listdir() which does such operation, and later filenames are encoded to UTF-8 (the whole HTML content is encoded to