[issue36754] Remove smart quotes in pydoc text

New submission from Steve Dower <steve.dower@python.org>: Not all console configurations can correctly render smart quotes in help() text. See the "Æ" in "superclass's" below. When building for pydoc-topics, it would be ideal to disable smart quotes. (I'm assuming from issue31793 that this can be done in configuration, though I'm not entirely sure how - it's not clear to me from those PRs) ---
help("BASICMETHODS") Basic customization
object.__new__(cls[, ...]) ... Typical implementations create a new instance of the class by invoking the superclassÆs "__new__()" method using "super().__new__(cls[, ...])" with appropriate arguments and then modifying the newly-created instance as necessary before returning it. ---------- assignee: docs@python components: Documentation messages: 341107 nosy: docs@python, steve.dower priority: normal severity: normal stage: needs patch status: open title: Remove smart quotes in pydoc text type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36754> _______________________________________

Steven D'Aprano <steve+python@pearwood.info> added the comment:
Not all console configurations can correctly render smart quotes in help() text. See the "Æ" in "superclass's" below.
That suggests to me a mismatch in encodings, rather than inability to render curly quotes at all. It's 2019 and surely we don't have to target ASCII as the lowest common denominator any more? ---------- nosy: +steven.daprano _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36754> _______________________________________

Steve Dower <steve.dower@python.org> added the comment:
mismatch in encodings
Also likely. I haven't looked into how pydoc does its rendering, but certainly Python 3.7 on Windows should be able to print regular Unicode. Perhaps it's not going through stdout for some reason? ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36754> _______________________________________

Change by Dustin Mendoza <penguindustin@gmail.com>: ---------- keywords: +patch pull_requests: +13041 stage: needs patch -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36754> _______________________________________

Dustin Mendoza <penguindustin@gmail.com> added the comment: In my editor (VSCode) on windows it outputs correctly as a smart quote but if I write the output to a file or the console I get the "Æ" effect. A sent a PR to replace the smart quotes with escaped quotes but I wonder if we should also do a scan across everything to see if there are more smart quote instances (I'm still pretty new to the entire codebase so I can't say for sure if this is would even be necessary) ---------- nosy: +Giant_Robato _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36754> _______________________________________

Steve Dower <steve.dower@python.org> added the comment: So pydoc_topics.py is an auto-generated file, which means we need to fix the generator as well if we decide to go that route. However, I suspect there's a problem somewhere else causing the console output to not go through stdout correctly. I'm not familiar enough with how help() works to know where. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36754> _______________________________________
participants (3)
-
Dustin Mendoza
-
Steve Dower
-
Steven D'Aprano