Opened 2 months ago

Last modified 2 months ago

#11948 new defect

Use of get_db_cnx will be incompatible with Trac 1.1.2

Reported by: rjollos Owned by: rjollos
Priority: normal Component: VotePlugin
Severity: normal Keywords:
Cc: hasienda Trac Release: 1.2


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)

t11948-compat-1.1.2.diff (18.9 KB) - added by jun66j5 2 months ago.

Download all attachments as: .zip

Change History (2)

Changed 2 months ago by jun66j5

comment:1 Changed 2 months ago by jun66j5

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 with with_transaction decorator, which is still available in 1.1.2. If transaction isn't needed, it would replace with Environment.get_read_db.

See t11948-compat-1.1.2.diff.

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.