
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2012-11-16 10:46 bymgedmin, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue16484_python2.7.patch | sean.rodman,2014-02-26 22:33 | fixed patch for python 2.7 | review | |
| issue16484_python3.2.patch | sean.rodman,2014-02-26 22:56 | patch for pydoc module docs link (python 3.2 version) | review | |
| issue16484_python3.3.patch | sean.rodman,2014-02-26 22:56 | patch for pydoc module docs link (python 3.3 version) | review | |
| Issue16484_rev_python3.6.patch | kau8hik,2016-06-03 19:02 | patch for pydoc module docs link with tests(python 3.6 version) | review | |
| issue16484_test_python3.6.patch | kau8hik,2016-06-12 02:58 | patch for pydoc module tests(python 3.6 version) | review | |
| Messages (33) | |||
|---|---|---|---|
| msg175675 -(view) | Author: Marius Gedminas (mgedmin)* | Date: 2012-11-16 10:46 | |
Do this: pydoc2.7 xml.etree.ElementTreethen click on the MODULE DOCS link, which ishttp://docs.python.org/library/xml.etree.ElementTreeYou're redirected tohttp://docs.python.org/2/library/xml.etree.ElementTree which is a 404 page. | |||
| msg175706 -(view) | Author: Georg Brandl (georg.brandl)*![]() | Date: 2012-11-16 19:15 | |
The redirect is not the problem. The page never existed. | |||
| msg175713 -(view) | Author: Marius Gedminas (mgedmin)* | Date: 2012-11-16 20:25 | |
A working link ishttp://docs.python.org/2/library/xml.etree.elementtree.html orhttp://docs.python.org/2/library/xml.etree.elementtree (with no .html at the end).Looks like capitalization is causing a problem.Did these pydoc links ever work?Would it be possible to make them work?There's a limited number of standard library modules with names that contain capital letters. find /usr/lib/python2.7 -name dist-packages -prune -o -name '*[A-Z]*' | wc -l gives me 211 names, but this is an imprecise upper bound because it includes files like 'distutils/README' that aren't modules or packages.Can I do anything to help? | |||
| msg175784 -(view) | Author: Éric Araujo (eric.araujo)*![]() | Date: 2012-11-17 17:30 | |
A patch and test making sure that pydoc generates the right URIs for upper-case modules would help. | |||
| msg177029 -(view) | Author: Marius Gedminas (mgedmin)* | Date: 2012-12-06 06:55 | |
Considering many existing Python installations out there would it be possible to fix this on the server side? I.e. lowercase the URL while redirecting? | |||
| msg177035 -(view) | Author: Georg Brandl (georg.brandl)*![]() | Date: 2012-12-06 10:26 | |
Adding a redirect should be easy, yes. | |||
| msg212155 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-25 01:17 | |
I could try to create the patch for pydoc if you would like for me to. | |||
| msg212156 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-25 02:20 | |
To display my ignorance, I have run the pydoc command listed in the original message but I can't actually see where it lists the url. Or even where it has a link. | |||
| msg212220 -(view) | Author: Marius Gedminas (mgedmin)* | Date: 2014-02-25 21:53 | |
Near the top:Help on module xml.etree.ElementTree in xml.etree:NAME xml.etree.ElementTreeFILE /usr/lib/python2.7/xml/etree/ElementTree.pyMODULE DOCShttp://docs.python.org/library/xml.etree.ElementTreeDESCRIPTION ... | |||
| msg212297 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-26 20:16 | |
Here is a working patch for python 2.7. all it does is lowercase the module name, but once I did that and clicked the link it worked correctly. | |||
| msg212298 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-26 20:17 | |
Note: It doesn't change the actual module name. Just how it is represented in the link. | |||
| msg212309 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-26 21:49 | |
Here is the patch for python 3.2. It implements the same fix that the 2.7 patch does. | |||
| msg212317 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-26 22:33 | |
Sorry guys, I missed a place I needed to add the lower() fuction to the module.__name__. Here is a fixed patch for python2.7. | |||
| msg212321 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-02-26 22:56 | |
Here are the python3.2 and python3.3 patches. Please let me know if there is anything I need to change on these. | |||
| msg213601 -(view) | Author: Sean Rodman (sean.rodman)* | Date: 2014-03-14 23:30 | |
Is there anything else I can do for this? | |||
| msg214819 -(view) | Author: Éric Araujo (eric.araujo)*![]() | Date: 2014-03-25 12:48 | |
It would be nice to have unit tests for this change.Did you get an email from the review system? If not, follow the “review” link on the right of the list of files on this page. | |||
| msg216663 -(view) | Author: Martin Panter (martin.panter)*![]() | Date: 2014-04-17 06:49 | |
I don’t think these ones could be so easily fixed, but on my computer “pydoc” references:* library/importlib.machinery.html (ideally should be library/importlib.html#module-importlib.machinery)* library/tkinter.font.html (not in Python documentation at all that I am aware, except for brief mention in §25.1.1) | |||
| msg216706 -(view) | Author: Éric Araujo (eric.araujo)*![]() | Date: 2014-04-17 16:05 | |
Brett, any opposition to moving the doc about importlib submodules to separate files? | |||
| msg216709 -(view) | Author: Brett Cannon (brett.cannon)*![]() | Date: 2014-04-17 16:43 | |
No, I have no objections. | |||
| msg266970 -(view) | Author: Kaushik Nadikuditi (kau8hik)* | Date: 2016-06-02 22:05 | |
Applied patch from sean.rodman.Created a test. | |||
| msg267137 -(view) | Author: Kaushik Nadikuditi (kau8hik)* | Date: 2016-06-03 19:02 | |
Applied patch from sean.rodman.Created a tests.Incorporated comments from rdmurray | |||
| msg267174 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2016-06-03 22:10 | |
This patch looks good to me. Note that the reason for the basedir change is that the test would fail if run from a build directory which hadn't been installed. An implication of this is that 'doc_loc' is None most of the time when the other tests are run, meaning that this new test is the only one that consistently tests the body of getdocloc. I think that method could use some more tests, but that is a separate issue. | |||
| msg267186 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-06-03 23:29 | |
New changeset64e7c8531131 by R David Murray in branch '3.5':#16484: Fix pydoc doc links to modules whose names are mixed case.https://hg.python.org/cpython/rev/64e7c8531131New changeset912b9aad0b45 by R David Murray in branch 'default':Merge:#16484: Fix pydoc doc links to modules whose names are mixed case.https://hg.python.org/cpython/rev/912b9aad0b45 | |||
| msg267188 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2016-06-03 23:34 | |
Thanks Sean and Kaushik.The final patch didn't apply to 2.7. If someone wants to port the patch I'll apply it, but I'm going to close the issue. | |||
| msg267242 -(view) | Author: Martin Panter (martin.panter)*![]() | Date: 2016-06-04 08:00 | |
It seems the test is broken on Windows:http://buildbot.python.org/all/builders/x86%20Windows7%203.5/builds/915/steps/test/logs/stdio======================================================================ERROR: test_mixed_case_module_names_are_lower_cased (test.test_pydoc.PydocDocTest)----------------------------------------------------------------------Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.5.bolen-windows7\build\lib\test\test_pydoc.py", line 458, in test_mixed_case_module_names_are_lower_cased self.assertIn('xml.etree.elementtree', doc_link) File "D:\cygwin\home\db3l\buildarea\3.5.bolen-windows7\build\lib\unittest\case.py", line 1076, in assertIn if member not in container:TypeError: argument of type 'NoneType' is not iterable | |||
| msg268090 -(view) | Author: Martin Panter (martin.panter)*![]() | Date: 2016-06-10 05:44 | |
Kaushik or David (or anyone else), does you have an idea of how to fix the Windows tests? It would be good to make the buildbots healthy again, then it is easier to see new failures in Windows. | |||
| msg268166 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2016-06-10 23:10 | |
Those are the only failures on 2 of the 4 buildbots running gui tests. | |||
| msg268188 -(view) | Author: Martin Panter (martin.panter)*![]() | Date: 2016-06-11 06:03 | |
My guess is the file.startswith(basedir) in the getdocloc() method is getting tricked by non-canonical paths (e.g. lowercase vs uppercase C: drive?). Would it help to use something like os.path.normcase(), or maybe os.path.commonpath(), pathlib.PurePath.parts or PurePath.relative_to()?file = inspect.getabsfile(object)...basedir = os.path.normcase(basedir)if (... (file.startswith(basedir) and ...Also, in the new get_pydoc_link() function, is that os.path.join() call meant to be there?basedir = os.path.join(dirname(dirname(__file__))) | |||
| msg268315 -(view) | Author: Kaushik Nadikuditi (kau8hik)* | Date: 2016-06-12 02:58 | |
- fixed broken test - test_mixed_case_module_names_are_lower_cased- tested on Windows, Mac, Ubuntu- thank you Martin Panter for suggestions. | |||
| msg268321 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-06-12 04:38 | |
New changesetd84268ed62ac by Martin Panter in branch '3.5':Issue#16484: Fix pydoc link and test on Windows, by Kaushik Nadikuditihttps://hg.python.org/cpython/rev/d84268ed62acNew changeset84d1e5a4b1c5 by Martin Panter in branch 'default':Issue#16484: Merge pydoc Windows fixes from 3.5https://hg.python.org/cpython/rev/84d1e5a4b1c5 | |||
| msg268323 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-06-12 04:49 | |
New changesetc60d2e4f4f96 by Martin Panter in branch '2.7':Issue#16484: PYTHONDOCS still uses “http:” in Python 2https://hg.python.org/cpython/rev/c60d2e4f4f96 | |||
| msg268331 -(view) | Author: Martin Panter (martin.panter)*![]() | Date: 2016-06-12 06:00 | |
Thanks Kaushik. I also changed the https:// detection to also detect http://, to maintain backwards compatibility.I am porting these changes to 2.7. | |||
| msg268333 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-06-12 06:28 | |
New changesetede10138327e by Martin Panter in branch '2.7':#16484: Change PYTHONDOCS to "https:", and fix links to use lowercasehttps://hg.python.org/cpython/rev/ede10138327e | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:38 | admin | set | github: 60688 |
| 2016-06-12 08:00:55 | martin.panter | set | status: open -> closed |
| 2016-06-12 06:28:46 | python-dev | set | messages: +msg268333 |
| 2016-06-12 06:00:43 | martin.panter | set | messages: +msg268331 versions: + Python 2.7 |
| 2016-06-12 05:11:04 | berker.peksag | set | type: compile error -> behavior |
| 2016-06-12 04:49:23 | python-dev | set | messages: +msg268323 |
| 2016-06-12 04:38:21 | python-dev | set | messages: +msg268321 |
| 2016-06-12 02:58:01 | kau8hik | set | files: +issue16484_test_python3.6.patch type: compile error messages: +msg268315 components: + Tests, - Documentation |
| 2016-06-11 06:03:21 | martin.panter | set | messages: +msg268188 |
| 2016-06-10 23:10:03 | terry.reedy | set | nosy: +terry.reedy messages: +msg268166 |
| 2016-06-10 05:44:44 | martin.panter | set | priority: normal -> high messages: +msg268090 |
| 2016-06-04 08:00:31 | martin.panter | set | status: closed -> open messages: +msg267242 versions: + Python 3.6, - Python 2.7, Python 3.4 |
| 2016-06-03 23:34:18 | r.david.murray | set | status: open -> closed type: behavior -> (no value) messages: +msg267188 resolution: fixed stage: test needed -> resolved |
| 2016-06-03 23:29:58 | python-dev | set | nosy: +python-dev messages: +msg267186 |
| 2016-06-03 22:10:35 | r.david.murray | set | nosy: +r.david.murray messages: +msg267174 |
| 2016-06-03 19:02:22 | kau8hik | set | files: +Issue16484_rev_python3.6.patch messages: +msg267137 |
| 2016-06-03 19:00:17 | kau8hik | set | files: -Issue16484_python3.6.patch |
| 2016-06-02 22:05:34 | kau8hik | set | files: +Issue16484_python3.6.patch nosy: +kau8hik messages: +msg266970 |
| 2014-04-17 19:25:21 | eric.snow | set | nosy: +eric.snow |
| 2014-04-17 16:43:03 | brett.cannon | set | messages: +msg216709 |
| 2014-04-17 16:05:23 | eric.araujo | set | nosy: +brett.cannon messages: +msg216706 versions: + Python 3.5, - Python 3.3 |
| 2014-04-17 06:49:56 | martin.panter | set | nosy: +martin.panter messages: +msg216663 |
| 2014-03-25 12:48:05 | eric.araujo | set | messages: +msg214819 |
| 2014-03-14 23:30:01 | sean.rodman | set | messages: +msg213601 |
| 2014-03-07 10:39:26 | eric.araujo | set | stage: needs patch -> test needed |
| 2014-02-27 14:39:44 | berker.peksag | set | versions: + Python 3.4, - Python 3.2 |
| 2014-02-26 22:56:38 | sean.rodman | set | files: +issue16484_python3.3.patch |
| 2014-02-26 22:56:15 | sean.rodman | set | files: +issue16484_python3.2.patch messages: +msg212321 |
| 2014-02-26 22:33:46 | sean.rodman | set | files: +issue16484_python2.7.patch messages: +msg212317 |
| 2014-02-26 22:32:40 | sean.rodman | set | files: -issue16484.patch |
| 2014-02-26 22:31:33 | sean.rodman | set | files: -issue16484_python3.2.patch |
| 2014-02-26 21:49:38 | sean.rodman | set | files: +issue16484_python3.2.patch messages: +msg212309 |
| 2014-02-26 20:17:36 | sean.rodman | set | messages: +msg212298 |
| 2014-02-26 20:16:44 | sean.rodman | set | files: +issue16484.patch keywords: +patch messages: +msg212297 |
| 2014-02-25 21:53:37 | mgedmin | set | messages: +msg212220 |
| 2014-02-25 02:20:41 | sean.rodman | set | messages: +msg212156 |
| 2014-02-25 01:17:42 | sean.rodman | set | nosy: +sean.rodman messages: +msg212155 |
| 2014-02-25 00:41:37 | ned.deily | link | issue20146 superseder |
| 2012-12-06 10:26:24 | georg.brandl | set | messages: +msg177035 |
| 2012-12-06 06:55:27 | mgedmin | set | messages: +msg177029 |
| 2012-11-17 17:30:03 | eric.araujo | set | assignee:docs@python -> type: behavior title: Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree -> pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules nosy: +eric.araujo, -docs@python versions: + Python 3.2, Python 3.3 messages: +msg175784 stage: needs patch |
| 2012-11-16 20:25:47 | mgedmin | set | messages: +msg175713 |
| 2012-11-16 19:15:13 | georg.brandl | set | nosy: +georg.brandl messages: +msg175706 |
| 2012-11-16 10:46:29 | mgedmin | create | |