This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月25日 20:14 by tt, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg161618 - (view) | Author: Tuukka Tolvanen (tt) | Date: 2012年05月25日 20:14 | |
LANG=C python3.2 -c 'import urllib.parse; help(urllib.parse)' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.2/site.py", line 477, in __call__ return pydoc.help(*args, **kwds) File "/usr/lib/python3.2/pydoc.py", line 1778, in __call__ self.help(request) File "/usr/lib/python3.2/pydoc.py", line 1828, in help else: doc(request, 'Help on %s:', output=self._output) File "/usr/lib/python3.2/pydoc.py", line 1564, in doc pager(render_doc(thing, title, forceload)) File "/usr/lib/python3.2/pydoc.py", line 1372, in pager pager(text) File "/usr/lib/python3.2/pydoc.py", line 1392, in <lambda> return lambda text: pipepager(text, 'less') File "/usr/lib/python3.2/pydoc.py", line 1413, in pipepager pipe.write(text) UnicodeEncodeError: 'ascii' codec can't encode character '\xab' in position 5495: ordinal not in range(128) presumably the offending part is quote_from_bytes(b'abc def«') -> 'abc%20def%AB' debian python3.2 3.2.3~rc2-1 macports python32 @3.2.3_0 |
|||
| msg161620 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年05月25日 20:21 | |
This works fine for me on Gentoo Linux with both 3.2.3+ (ie: what's in the repo) and 3.2.2. |
|||
| msg161621 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年05月25日 20:21 | |
Ah, I should clarify: Gentoo's 3.2.2. I'm sure they've added some patches, just like Debian. |
|||
| msg161625 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年05月25日 21:39 | |
Serhiy: did you add 3.3 because you can reproduce it on 3.3? |
|||
| msg161633 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年05月26日 01:55 | |
New changeset ea25ce432343 by Senthil Kumaran in branch '3.2': Issue #14920: Fix the help(urllib.parse) failure on locale C terminals. Just have ascii in help msg http://hg.python.org/cpython/rev/ea25ce432343 New changeset cb62c958dd6a by Senthil Kumaran in branch 'default': Issue #14920: Fix the help(urllib.parse) failure on locale C terminals. Just have ascii in help msg http://hg.python.org/cpython/rev/cb62c958dd6a |
|||
| msg161635 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2012年05月26日 02:01 | |
I have fixed the help to include only ascii characters ( represented in hex) so that conversion to bytes is represented in the help and also the terminal whose LANG is C is able to display them too. On Ubuntu, when I had LANG=C, locale gave the following o/p and the previous help, (which broke for the Tuukka Tolvanen) was working fine too. LANG=C LANGUAGE=en_US:en LC_CTYPE=en_US.UTF-8 LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=en_US.UTF-8 LC_MONETARY="C" LC_MESSAGES=en_US.UTF-8 LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL= I guess, the original bug could be related to settings differing on gentoo. Anyways, the help docstring is changed now. |
|||
| msg163903 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月25日 06:17 | |
IMO the right fix would have been to make the docstring a raw string. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59125 |
| 2012年06月25日 06:17:14 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg163903 |
| 2012年05月28日 21:19:23 | vstinner | set | nosy:
+ vstinner |
| 2012年05月26日 02:01:42 | orsenthil | set | status: open -> closed assignee: orsenthil nosy: + orsenthil messages: + msg161635 resolution: fixed stage: resolved |
| 2012年05月26日 01:55:45 | python-dev | set | nosy:
+ python-dev messages: + msg161633 |
| 2012年05月25日 21:39:34 | r.david.murray | set | messages:
+ msg161625 components: + Library (Lib), - None |
| 2012年05月25日 20:42:57 | serhiy.storchaka | set | versions: + Python 3.3 |
| 2012年05月25日 20:21:45 | r.david.murray | set | messages: + msg161621 |
| 2012年05月25日 20:21:00 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg161620 |
| 2012年05月25日 20:14:22 | tt | create | |