TurboGears / tgext.pluggable

Pluggable applications support for TurboGears2
11 stars 13 forks source link

transaction egg missing with paster quickstart-pluggable #5

Closed ltrillaud closed 11 years ago

ltrillaud commented 11 years ago

Steps to reproduce :

Quick and dirty workaround :

You should use Turbogears2Frozen instead of Turbogears2 into your setup.py. It have transaction dependency.

amol- commented 11 years ago

3d591169909235f3c5d8ef9f40eb818d2133d59f should provide a fix for the issue.

Enforcing the transaction module as a dependency was not the case as it is possible to create turbogears projects that don't use the transaction module and the transaction dependency is actually a dependency of your project, not of TurboGears itself.

In that case the developer doesn't want to use transaction module it is left to him to commit changes to the database layer for example using autocommit=True

marians commented 11 years ago

I had the same issue following the tutorial and initiating an app with

paster quickstart --ming
...
python setup.py develop
paster setup-app development.ini
paster serve development.ini

When calling my http://localhost:8080 URL I was greeted with an error message.

amol- commented 11 years ago

Hi @marians that was a bug in TurboGears2, not related to tgext.pluggable. The issue is caused by the fact that TG2 sets up the transaction manager even when quickstarting with ming which doesn't use it.

It got resolved for upcoming 2.2.1 release, in the meanwhile you can solve it by adding to your config/app_cfg.py:

base_config.use_transaction_manager = False
marians commented 11 years ago

Thanks for the info! In fact, that config line was already present. Seems as if the import for the transaction module happens anyway.

amol- commented 11 years ago

@marians ah, I found the issue, is related to a recent tgext.crud release that added the transaction dependency. I'm going to open a bug in tgext.crud and make a new release that fixes it today.