Opened 10 years ago
Closed 10 years ago
#12109 closed defect (fixed)
Not working RoadMap in Trac 1.1.2 - obsolete db API
Reported by: | Owned by: | falkb | |
---|---|---|---|
Priority: | normal | Component: | SimpleMultiProjectPlugin |
Severity: | major | Keywords: | RoadMap, get_db_cnx |
Cc: | Trac Release: | 1.2 |
Description
Because of the change in database API - obsolete function get_db_cnx() is now not supported - plugin fails to show roadmap. Other procedures seem to work. Most of the source code is already fixed, but Version.py was not updated yet, so it might be the reason of the bug. Direct copy of if VERSION
statement from updated files to Version.py did not help, but I'm not python coder.
Attachments (0)
Change History (9)
comment:1 Changed 10 years ago by
Status: | new → accepted |
---|
comment:2 Changed 10 years ago by
Hint: After changing the code you must call 'python setup.py bdist_egg' in the plugin source directory where setup.py is (in a Trac environment command line shell). Then copy the .egg file from the 'dist' directory to Trac's plugin directory, and restart the Trac server application.
comment:3 Changed 10 years ago by
Thank you for reaction. I have taken your update from SVN and built it. Unfortunatelly now it says:
TypeError: select() takes exactly 2 arguments (3 given)
in:
File "build/bdist.win32/egg/simplemultiproject/version.py", line 171, in post_process_request versions, version_stats = self._versions_and_stats(req, filter_projects) File "build/bdist.win32/egg/simplemultiproject/version.py", line 460, in _versions_and_stats versions = Version.select(self.env, db = db)
It is far beyond my understanding, because Version.select command in code takes 2 arguments
comment:4 Changed 10 years ago by
Methods of classes internally pass the self-Pointer of the calling object as additional "invisible" parameter also. You said in the ticket header you have Trac-1.2, right? Maybe they have changed the API, not sure... (?) ... at the moment I cannot find docs explaining the Version class API... :-( ... maybe someone can help here?
comment:5 Changed 10 years ago by
db
parameter has been deprecated since Trac 1.0 and was removed in 1.1.2. Most likely you don't need to pass the parameter even in earlier versions of Trac. It is optional and only needed for transaction nesting.
comment:7 Changed 10 years ago by
Thanks, Ryan for the hint. Vaclav, please test my blind commit, it works with 1.0.1, anyway.
Thanks for your report!
What happens if you apply this patch?:
simplemultiprojectplugin/trunk/simplemultiproject/version.py