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.

classification
Title: Non-ascii in non-unicode __credits__ in Lib/pydoc.py
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: cben, georg.brandl, loewis, mwh, ping
Priority: normal Keywords: patch

Created on 2004-08-15 01:35 by cben, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
PYDOC-CREDITS-UNICODE.diff cben, 2004-08-15 01:35 A Right Thing that breaks help(pydoc) no some locales!
Messages (7)
msg46703 - (view) Author: Cherniavsky Beni (cben) * Date: 2004-08-15 01:35
There are non-ASCII chars in pydoc.__credits__ (the
"o/" in "Mynd you, mo/o/se bites Kan be pretty
nasti...").  In 2.3, a locale declaration of Latin-1
was added to pydoc.py.  So now Python does not complain
-- but a string object (carrying no encoding info) with
Latin-1 bytes is still created and anynoby running in a
non-Latin-1 locale will not interpret the string correctly.
The patch fixes it by making pydoc.__credits__ a
Unicode string.  *Note that this may break code* that
prints pydoc.__credits__ (in locales that can't encode
it) or otherwise assumes it's a string.  Not that such
code exists anywhere...
Wait, ``import pydoc; help(pydoc)`` in "C" locale now
crashes <wink>!  This is too ironic, IMHO, *don't
commit* until pydoc learns to handle unicode robustly...
msg46704 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-22 16:08
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as pydoc.py 1.96.
msg46705 - (view) Author: Cherniavsky Beni (cben) * Date: 2004-11-14 01:39
Logged In: YES 
user_id=36166

I told you not to commit!  Now ``pydoc.py pydoc`` crashes.
Patch 1065986 fixes this.
msg46706 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-11-14 10:21
Logged In: YES 
user_id=21627

Ok, I have now backed-out the patch again.
msg46707 - (view) Author: Ka-Ping Yee (ping) * (Python committer) Date: 2004-11-17 11:44
Logged In: YES 
user_id=45338

I'm so sorry this has caused so much trouble.
The silly moose comment is my fault; it can just be removed.
msg46708 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-03-03 15:05
Logged In: YES 
user_id=1188172

The moose comment has been removed; the patch should be
closed as "out of date".
msg46709 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-03-03 15:31
Logged In: YES 
user_id=6656

Done!
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40760
2004-08-15 01:35:41cbencreate

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant