Hide Forgot
Description of problem: nils@gibraltar:~> pydoc turbogears problem in turbogears - <class 'pkg_resources.VersionConflict'>: (CherryPy 3.0.3 (/usr/lib/python2.5/site-packages), Requirement.parse('CherryPy<3.0')) Version-Release number of selected component (if applicable): TurboGears-1.0.4.4-2.fc9.noarch How reproducible: Always Steps to Reproduce: 1. "pydoc turbogears" or any component thereunder Actual results: See above Expected results: Docs are shown Additional info: This might need the pkg_resources/requires dance in all turbogears modules (just a WAG).
Created attachment 306305 [details] "tg_doc" -- pydoc wrapper/replacement that works with turbogears A small wrapper/replacement which uses pkg_resources to setup TurboGears for inclusion by pydoc.
Yep, that'll work. So the question is, what's the bug? If we ship a tg_doc wrapper, that let's the user get to the turbogears documentation from the command line but it doesn't help the user who already knows about pydoc turbogears to discover the new command. OTOH, this might be the best we can do short of porting pydoc to know about eggs (which it has its own special problems since the egg name and the module import name are seldom the same.) If we ship this, tg-pydoc seems like a better name. We could also look into integrating this with tg-admin. tg-admin doc turbogears; tg-admin doc fas; for instance.
That script was only meant as a proof-of-concept -- I wasn't suggesting to replace pydoc, but to fix TG for it. The real fix has to be done in the TG modules (i.e. copy the 2 requirement lines or something along that line).
That won't work. By the time you've imported TurboGeats, it's already too late to specify __requires__.
That won't work. By the time you've imported TurboGears, it's already too late to specify __requires__.
(In reply to comment #5) > That won't work. By the time you've imported TurboGears, it's already too late > to specify __requires__. I could be wrong, but wouldn't it be sufficient if TG used __requires__ etc. for importing the correct cherrypy version to make pydoc work again?
In my testing yesterday it failed when I added the __requires__ line to turbogears/__init__.py. To be a bit more thorough I just did this: yum install -y python-cherrypy python-cherrypy2 turbogears sudo sed -i "s/import pkg_resources/__requires__='CherryPy < 3.0'\nimport pkg_resources\nimport cherrypy\nprint cherrypy.__version__\n/" /usr/lib/python2.5/site-packages/turbogears/__init__.py pydoc turbogears 3.0.3 problem in turbogears - <class 'pkg_resources.VersionConflict'>: (CherryPy 3.0.3 (/usr/lib/python2.5/site-packages), Requirement.parse('CherryPy<3.0')) So that seems to confirm that setting __requires__ after turbogears has been imported will be too late.
Hmm, it seems to me that this has to be solved in pydoc, therefore I'll change the component to python. I'm not privy to how pydoc works in detail, but it seems to be unaware of the egg concept, importing the wrong (new) cherrypy version which makes importing turbogears fail. Despite that, if one module throws errors when imported, "pydoc -k" etc. don't work (see bug #246212).
Argh. Changing assignee as well.
I seem to have a knot in my fingers. One more attempt to change the component.
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
*** This bug has been marked as a duplicate of bug 461419 ***