[issue37755] pydoc topics, keywords and symbols always use pager instead of output
New submission from Enrico Tröger : I noticed a probably unintended behavior in help() usage: when an output is set on pydoc.Helper(), most of its methods use this output instead of a pager. But 'True', 'False' and 'None' as well as all topics, keywords and symbols always use a pager instead of the configured output. My use case is to use the pydoc help system to display help contents in Geany (a text editor) in a graphical manner (and so I cannot make any use of a pager). Example code: #!/usr/bin/env python3 # -*- coding: utf-8 -*- from io import StringIO import pydoc import sys if __name__ == '__main__': help_text = StringIO() helper = pydoc.Helper(output=help_text) # help contents are written to help_text as expected helper.help('pydoc') # the following calls each show the help contents in a pager instead # of using the configured output helper.help('True') helper.help('False') helper.help('None') helper.help('**') # symbol example helper.help('SEQUENCES') # topic example helper.help('await') # keyword example Tested against Python 3.7.3. -- components: Library (Lib) messages: 348983 nosy: eht16 priority: normal severity: normal status: open title: pydoc topics, keywords and symbols always use pager instead of output type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue37755> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37755] pydoc topics, keywords and symbols always use pager instead of output
Change by Enrico Tröger : -- keywords: +patch pull_requests: +14847 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15105 ___ Python tracker <https://bugs.python.org/issue37755> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23166] urllib2 ignores opener configuration under certain circumstances
Enrico Tröger added the comment: I got the same error suddenly with Python 2.7.9. I think this is quite unfortunate because it somewhat breaks existing behaviour, especially that SSL certificate verification is enabled by default. Don't get me wrong, this is the right thing in general and it is important. Still, adding this feature in a 2.7 patch level release and enabling it by default feels quite hard. I guess this will break many scripts and applications which rely on non-verification of SSL certs (which is bad but it was the exisiting behaviour). Anyway, attached is my use case where I use a HTTPS request coupled with HTTP basic authentication and disabled SSL cert verification. As described above, passing a context to urlopen() will override previously configured handlers, unfortunately. In the attached script there is also a workaround which works for me by not using urlopen() but instead calling opener.open() manually after adding the necessary handlers myself. Not nice but works for the moment. -- nosy: +eht16 Added file: http://bugs.python.org/file37810/urllib_ssl_auth_test.py ___ Python tracker <http://bugs.python.org/issue23166> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com