Modify

Opened 4 months ago

Closed 11 days ago

#11948 closed defect (duplicate)

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

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 jun66j5 4 months ago.

Download all attachments as: .zip

Change History (8)

Changed 4 months ago by jun66j5

comment:1 Changed 4 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.

comment:2 Changed 7 weeks ago by cboos

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

comment:3 in reply to: ↑ description Changed 7 weeks ago by hasienda

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: Changed 7 weeks ago by 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.

comment:5 in reply to: ↑ 4 Changed 7 weeks ago by hasienda

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 2 weeks ago by rjollos

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 11 days ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.