#12137 closed defect (fixed)
Trac 1.1.2 support: get_db_cnx() no longer available
Reported by: | jouvin | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
Hi,
I tried to update my 1.0.2 installation to 1.1.2, including the plugins I use with TracHacks among them. I got an error when trying to access a (upgraded) project complaining about the absence of a get_db_cnx() method.
A quick find in the sources of the plugins I use tended to show that most plugin continues to rely on get_db_cnx() to access the database, despite it has been declared obsolete a while ago and seems to have been removed in 1.1.x serie.
Any plan to move to the new transaction-based db access method?
Michel
Attachments (1)
Change History (11)
comment:1 Changed 10 years ago by
comment:2 follow-up: 3 Changed 10 years ago by
Not yet... but I'll let you know if I manage to find the time to look at it.
comment:3 Changed 10 years ago by
Replying to jouvin:
Not yet... but I'll let you know if I manage to find the time to look at it.
Would be great to get you assistance with this. It would help me a lot for review, if the first shot would be done by someone else.
Changed 10 years ago by
Attachment: | tagsplugin-trac-1.1.4.patch added |
---|
Added patch for TagsPlugin (tested with Trac 1.1.4)
comment:4 Changed 10 years ago by
I've posted my own patch to get the TagsPlugin working under Trac v1.1.4
I really like this plugin, and am using it both in my lab and at work, so rather than wait it out I thought I'd take a few moments to contribute.
NOTE: The patch does not included updates to any of the tests (it's late where I am) and has only been tested briefly. If I end up making additional changes I'll try to post them here (unless there's a better place to put these, in which case hopefully someone can point me in the right direction). Thanks!
comment:5 Changed 10 years ago by
The patch looks pretty good. When using the context manager it's not necessary to call db.commit()
or db.rollback()
, so some of the transaction blocks should be modified accordingly.
comment:7 Changed 9 years ago by
Owner: | changed from Steffen Hoffmann to Ryan J Ollos |
---|---|
Status: | new → accepted |
I'll commit changes to adapt to Trac 1.0 API. I implemented the changes pretty quickly, so I won't be surprised if there are issues that have not been exposed by the light testing I've done and existing unit test coverage. If you find any issues, please open a new ticket.
I appreciate any feedback on the changes, as positive feedback will lead to a quick release and greater confidence to deploy the changes to trac-hacks.org.
This change has been hold back for continuing support of Trac 0.11 installations on Python2.4 and giving precedence to other developments.
After
tags-0.8
release I'll move to the current Trac 1.0 db API immediately, skipping intermediate 0.12 db API. Did you already make an effort to patch locally? Patch proposals welcomed.