Issue 21431: 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type "bytes" not "str" (original) (raw)

Created on 2014-05-04 20:10 by ned.deily, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (12)
msg217887 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-05-04 20:10
Something went wrong with the update of pydoc_data topics for 3.4.1rc1. As can be seen in http://hg.python.org/releasing/3.4.1/rev/c67a19e11a71, the values for the topics dict should be strings but were updated as bytes. This causes pydoc topics searches to fail. The process problem needs to be fixed for 3.4.1 final. An example: $ /usr/local/bin/pydoc3.4 def Traceback (most recent call last): File "/usr/local/bin/pydoc3.4", line 5, in pydoc.cli() File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py", line 2580, in cli help.help(arg) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py", line 1860, in help elif request in self.keywords: self.showtopic(request) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py", line 1941, in showtopic pager(doc.strip() + '\n') TypeError: can't concat bytes to str
msg217889 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-05-04 20:30
3.4.1rc1 is the first release I've cut where the makefile didn't auto-download Sphinx. And then the makefile used "python" and "sphinx-build" straight off the path, rather than finding the local ones. To generate pydoc-topics, I had to do the following: % ./configure --prefix=`pwd`/release && make % ./release/bin/pip install sphinx % cd Doc % make pydoc-topics PYTHON=../release/bin/python SPHINXBUILD=../release/bin/sphinx-build And apparently this didn't work. Maybe there should be a "smoke test" to make sure pydoc-topics is okay? And... maybe "make pydoc-topics" should copy the data file itself, rather than making me cut and paste paths out of PEP 101? And *then* automatically test it?
msg217890 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-05-04 20:33
From a first quick look, it appears that the problem occurs when using a Python 3 version of sphinx-build. With Python 2, the topics appear to be generated correctly.
msg217898 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-05-04 22:06
The problem is in PydocTopicsBuilder in Doc/tools/sphinxext/pyspecific.py. It needs to be smarter so that ideally it should continue to work with any Python >= 2.5 and independent of the Python being built.
msg217899 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-05-04 23:15
Well, surely working with the current python is sufficient? I'd be happy if it was only guaranteed to run with the python tree it's a part of.
msg227296 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-09-22 19:22
New changeset d71c351a6a0f by Georg Brandl in branch '3.4': Closes #21431: make docs depend on Sphinx 1.2 and fix pydoc-topics builder to https://hg.python.org/cpython/rev/d71c351a6a0f
msg227297 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-09-22 19:22
Should be fixed now. I didn't merge into default since someone (cough) has to null-merge all the release related stuff first.
msg227311 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-09-22 21:45
New changeset 1248796b7945 by Ned Deily in branch 'default': Issue #21431: merge from 3.4 https://hg.python.org/cpython/rev/1248796b7945
msg227312 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-09-22 21:48
To expedite matters, I did the almost-null post-release cleanup merge and then merged the fix for this issue. So I think this issue is now complete.
msg227313 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-09-22 22:11
If this is fixed, then how come I hit it again today?
msg227314 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-09-22 22:12
It was just fixed today, after the release.
msg227315 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-09-22 22:21
Oh, because it was only fixed today. As Emily Litella used to say... never mind!
History
Date User Action Args
2022-04-11 14:58:03 admin set github: 65630
2014-09-22 22:21:09 larry set messages: +
2014-09-22 22:12:21 ned.deily set messages: +
2014-09-22 22:11:31 larry set messages: +
2014-09-22 21:48:24 ned.deily set messages: +
2014-09-22 21:45:27 python-dev set messages: +
2014-09-22 19:22:57 georg.brandl set messages: +
2014-09-22 19:22:30 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: needs patch -> resolved
2014-09-22 18:54:26 zach.ware set nosy: + zach.ware
2014-09-22 18:01:32 georg.brandl link issue22461 superseder
2014-05-04 23:15:04 larry set messages: +
2014-05-04 22:06:49 ned.deily set versions: + Python 2.7, Python 3.5nosy: + benjamin.petersonmessages: + assignee: larry -> georg.brandlstage: needs patch
2014-05-04 20:33:44 ned.deily set messages: +
2014-05-04 20:30:40 larry set messages: +
2014-05-04 20:10:51 ned.deily create