Ticket #10365 (closed enhancement: fixed)

Opened 8 months ago

Last modified 5 months ago

check 1.0 compatibility

Reported by: falkb Assigned to: falkb
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords: planned
Cc: crossroad, thomasd, rjollos, hasienda Trac Release: 1.0

Description

all necessary activities of porting to Trac-1.0

Attachments

Change History

09/25/12 11:13:20 changed by falkb

  • status changed from new to assigned.

I tried that already, and it seems the plugin comes up properly; but as I tried to add a new milestone it failed at /simplemultiprojectplugin/trunk/simplemultiproject/model.py#L59 with AttributeError in self.db.commit()

    def __start_transacction(self):
        self.db.commit()
        self.db.close()

I digged through the internet and have found evident things that this must be ported, but haven't found clear information what's exactly to do here. I keep on searching...

(follow-up: ↓ 13 ) 09/25/12 17:23:01 changed by cnig

We do get the same error Message, if we you try to delete any project.

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/trac/admin/web_ui.py", line 125, in process_request
    path_info)
  File "build/bdist.linux-x86_64/egg/simplemultiproject/admin.py", line 113, in render_admin_panel
    self.__SmpModel.delete_project(sel)
  File "build/bdist.linux-x86_64/egg/simplemultiproject/model.py", line 134, in delete_project
    self.__start_transacction()
  File "build/bdist.linux-x86_64/egg/simplemultiproject/model.py", line 59, in __start_transacction
    self.db.commit()
  File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 107, in __getattr__
    raise AttributeError
AttributeError

09/25/12 17:43:24 changed by falkb

  • cc changed from crossroad,thomasd to crossroad, thomasd, rjollos, hasienda.

hmm... looking at #7262 it seems to me I shell not close the db at all in 0.12 (and likely 1.0), is this true? I'm asking the gurus now. Thanks in advance.

09/25/12 22:51:42 changed by hasienda

The gurus answering (huh, a bit scary - maybe we just spend more time with trial-n-error yet?):

Yes, all kinds of nastiness springs from forcing to close a db connection, and you shouldn’t need to do that. According to my experience Trac can manage that good enough on it's own. t:wiki:TracDev/DatabaseApi has most relevant references, staring with the old (0.11) db API, that is supported until Trac 1.0, but may soon be gone. At this very same place you'll see repeated recommendation like this: "again, don't call commit() by yourself." with reference to the recent db API.

I would always skip the intermediate design and use the new API for something like a 1.0 branch these days.

(follow-up: ↓ 6 ) 09/26/12 08:59:21 changed by rjollos

It's mainly a rehash of t:wiki:TracDev/DatabaseApi that Steffen pointed out, but there was also recently a discussion of this on the trac-dev mailing list (last few posts).

(in reply to: ↑ 5 ) 09/26/12 10:22:43 changed by falkb

Replying to rjollos:

... recently a discussion ... on ... trac-dev mailing list...

Thanks, that should help now. I skipped that mails since I triage by mail subject. Actually, that Dirk was in the same situation as I am now, I read the DatabaseApi? page but after that felt more stupid than before. :)

09/26/12 14:02:16 changed by falkb

(In [12060]) bugfix (refs #10112, refs #10365): now I also experienced that unicode decode error (with new Trac-1.0), fixed with patch of AdrianFritz. Thanks

09/26/12 14:05:04 changed by falkb

(In [12061]) bugfix (refs #10365): Trac < 0.12 must commit and close db transactions by itself. Newer versions should not at all.

(follow-up: ↓ 10 ) 09/26/12 14:19:31 changed by falkb

  • keywords changed from planned to planned testing.

seems it works now with Trac-1.0

(in reply to: ↑ 9 ) 09/26/12 16:19:20 changed by falkb

  • keywords changed from planned testing to planned.

Replying to falkb:

seems it works now with Trac-1.0

no, I can see milestone progress bars of width=0 on the roadmap page

09/27/12 09:22:08 changed by falkb

(In [12068]) Refs #10365: progress bar style (which is different in Trac-1.0) fixed in div tag. Patch by thomasd, thanks.

09/27/12 09:22:31 changed by falkb

  • keywords changed from planned to planned testing.

(in reply to: ↑ 2 ; follow-up: ↓ 15 ) 10/10/12 12:48:58 changed by cnig

Replying to cnig:

We do get the same error Message, if we you try to delete any project.

It works very smooth with patches in simplemultiprojectplugin-r12139.zip and trac 1.0. Thank you very much!

10/10/12 13:09:19 changed by falkb

  • keywords changed from planned testing to planned.
  • status changed from assigned to closed.
  • resolution set to fixed.

tested and acknowledged by cnig

(in reply to: ↑ 13 ) 10/10/12 13:16:13 changed by falkb

Replying to cnig:

It works very smooth with patches in simplemultiprojectplugin-r12139.zip and trac 1.0. Thank you very much!

cnig, thank you for your feedback!

12/21/12 11:39:58 changed by falkb

(In [12453]) Refs #10365: ported editing of version completion time to Trac 1.0


Add/Change #10365 (check 1.0 compatibility)




Change Properties
Action