Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1201 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

run_with_transaction to use MultiorderGenericFunction

Reported by: Dennis Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version: 1.0b2
Severity: normal Keywords:


run_with_transaction is a generic function. It is difficult to customize it though because the _use_sa() function will evaluate to true on at least one of the pre-defined rules. (so_rwt and sa_rwt). In order to have your own customized function run, you need to be able to specify a higher priority with MultiorderGenericFunction?.

Here is the patch:

Index: turbogears/database.py =================================================================== --- turbogears/database.py (revision 2078) +++ turbogears/database.py (working copy) @@ -13,6 +13,7 @@

import turbogears from turbogears import config, errorhandling

+from turbogears.genericfunctions import MultiorderGenericFunction?

log = logging.getLogger("turbogears.database")

@@ -231,7 +232,7 @@

for hub in hub_registry:


-[dispatch.generic()] +[dispatch.generic(MultiorderGenericFunction?)]

def run_with_transaction(func, *args, kw):


Change History

comment:1 Changed 13 years ago by alberto

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

commited at [1226]. Thanks!

Note: See TracTickets for help on using tickets.