Opened 10 years ago
Closed 10 years ago
#11948 closed defect (duplicate)
Use of get_db_cnx will be incompatible with Trac 1.1.2
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | VotePlugin |
Severity: | normal | Keywords: | |
Cc: | Steffen Hoffmann | Trac Release: | 1.2 |
Description
The Environment.get_db_cnx
method was removed in trac:milestone:1.1.2: trac:wiki:TracDev/ApiChanges/1.1.2#get_db_cnx. t.e.o runs the latest version of Trac, upgrading the site a few times per year. We'll need to make a new release of VotePlugin for use on t.e.o before the site can be upgraded.
Attachments (1)
Change History (8)
Changed 10 years ago by
Attachment: | t11948-compat-1.1.2.diff added |
---|
comment:1 Changed 10 years ago by
comment:3 Changed 10 years ago by
Replying to rjollos:
We'll need to make a new release of VotePlugin for use on t.e.o before the site can be upgraded.
Actually yesterday it happened the other way-round. But it is good for increasing pressure for resolving the issue in order to upgrade and re-enable this plugin soonish. So thank you for the contribution.
I've just outlined my view on how to proceed in #12048, and after Christian already made a suggestion I'd appreciate hearing you opinion as well.
comment:4 follow-up: 5 Changed 10 years ago by
If the maintainers will create a new branch for Trac 1.0 and later, it would be good to use Christian's patch in #12048 rather than t11948-compat-1.1.2.diff.
comment:5 Changed 10 years ago by
Replying to jun66j5:
If the maintainers will create a new branch for Trac 1.0 and later, it would be good to use Christian's patch in #12048 rather than t11948-compat-1.1.2.diff.
Sure, I'll start from current trunk
for both branches and first apply your patch to get (last) 0.11 release, later revert and apply Christian's patch.
comment:7 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
I tried to be compatible with 0.11 through 1.1.2. Unit tests pass with all versions of Trac.
That patch would replace
Environment.get_db_cnx
withwith_transaction
decorator, which is still available in 1.1.2. If transaction isn't needed, it would replace withEnvironment.get_read_db
.See t11948-compat-1.1.2.diff.