Modify

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)

t11948-compat-1.1.2.diff (18.9 KB) - added by Jun Omae 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by Jun Omae

Attachment: t11948-compat-1.1.2.diff added

comment:1 Changed 10 years ago by Jun Omae

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.

comment:2 Changed 10 years ago by Christian Boos

See also #12048 for a Trac 1.1.x-only version.

comment:3 in reply to:  description Changed 10 years ago by Steffen Hoffmann

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 Changed 10 years ago by Jun Omae

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 in reply to:  4 Changed 10 years ago by Steffen Hoffmann

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:6 Changed 10 years ago by Ryan J Ollos

In 14318:

Create 0.11 branch for supporting Trac < 1.0. Trunk will support Trac 1.0 and later. Refs #11948, #12048.

comment:7 Changed 10 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

The branch created in [14318] supports Trac 0.11 - 1.0. We should cut a final release soon. The trunk now supports Trac 1.0 and later.

Closing as a duplicate of #12048.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.