Message207319
I'm guessing this is a very seldom (never?) used code path. I've included a patch to test and fix the problem. The patch includes several related tests for pydoc.
$ py3 -c 'import pydoc; pydoc.synopsis("/opt/python3.4/lib/python3.4/lib-dynload/time.cpython-34m.so")'
Traceback (most recent call last):
File "/opt/python3.4/lib/python3.4/tokenize.py", line 368, in find_cookie
line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 96: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/python3.4/lib/python3.4/pydoc.py", line 229, in synopsis
file = tokenize.open(filename)
File "/opt/python3.4/lib/python3.4/tokenize.py", line 429, in open
encoding, lines = detect_encoding(buffer.readline)
File "/opt/python3.4/lib/python3.4/tokenize.py", line 409, in detect_encoding
encoding = find_cookie(first)
File "/opt/python3.4/lib/python3.4/tokenize.py", line 373, in find_cookie
raise SyntaxError(msg)
SyntaxError: invalid or missing encoding declaration for '/opt/python3.4/lib/python3.4/lib-dynload/time.cpython-34m.so' |
|
Date |
User |
Action |
Args |
2014-01-04 22:27:05 | eric.snow | set | recipients:
+ eric.snow, larry |
2014-01-04 22:27:05 | eric.snow | set | messageid: <1388874425.94.0.221860493391.issue20123@psf.upfronthosting.co.za> |
2014-01-04 22:27:05 | eric.snow | link | issue20123 messages |
2014-01-04 22:27:05 | eric.snow | create | |
|