Modify

Opened 2 years ago

Closed 23 months ago

Last modified 20 months ago

#10365 closed enhancement (fixed)

check 1.0 compatibility

Reported by: falkb Owned by: 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 (0)

Change History (16)

comment:1 Changed 2 years ago 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...

comment:2 follow-up: Changed 2 years ago 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

comment:3 Changed 2 years ago by falkb

  • Cc rjollos hasienda added

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.

comment:4 Changed 2 years ago 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.

comment:5 follow-up: Changed 2 years ago 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).

comment:6 in reply to: ↑ 5 Changed 2 years ago 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. :)

comment:7 Changed 2 years ago 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

comment:8 Changed 2 years ago by falkb

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

comment:9 follow-up: Changed 2 years ago by falkb

  • Keywords testing added

seems it works now with Trac-1.0

comment:10 in reply to: ↑ 9 Changed 2 years ago by falkb

  • Keywords testing removed

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

comment:11 Changed 2 years ago by falkb

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

comment:12 Changed 2 years ago by falkb

  • Keywords testing added

comment:13 in reply to: ↑ 2 ; follow-up: Changed 23 months ago 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!

comment:14 Changed 23 months ago by falkb

  • Keywords testing removed
  • Resolution set to fixed
  • Status changed from assigned to closed

tested and acknowledged by cnig

comment:15 in reply to: ↑ 13 Changed 23 months ago 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!

comment:16 Changed 20 months ago by falkb

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

Add Comment

Modify Ticket

Action
as closed .
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.