Modify

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#10365 closed enhancement (fixed)

check 1.0 compatibility

Reported by: falkb Owned by: falkb
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords: planned
Cc: Christopher Paredes, thomasd, Ryan J Ollos, Steffen Hoffmann Trac Release: 1.0

Description

all necessary activities of porting to Trac-1.0

Attachments (0)

Change History (16)

comment:1 Changed 12 years ago by falkb

Status: newassigned

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 Changed 12 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 12 years ago by falkb

Cc: Ryan J Ollos Steffen Hoffmann 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 12 years ago by Steffen Hoffmann

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 Changed 12 years ago by Ryan J Ollos

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 12 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 12 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 12 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 Changed 12 years ago by falkb

Keywords: testing added

seems it works now with Trac-1.0

comment:10 in reply to:  9 Changed 12 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 12 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 12 years ago by falkb

Keywords: testing added

comment:13 in reply to:  2 ; Changed 12 years 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 12 years ago by falkb

Keywords: testing removed
Resolution: fixed
Status: assignedclosed

tested and acknowledged by cnig

comment:15 in reply to:  13 Changed 12 years 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 11 years ago by falkb

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain falkb.
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.