collective/pas.plugins.sqlalchemy — Issue #7: cyclic dependency using collective.saconnect
Author: auspex
Created: 2011-10-20 13:07:45+00:00
State: open

While using collective.saconnect to configure pas.plugins.sqlalchemy is admirable, it doesn't actually seem workable.

collective.saconnect needs to be *correctly* configured before almost anything can be done on the site.

I got this from trying to install pps, z3c.saconfig and collective.saconnect at the same time:
```
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.BaseRequest, line 596, in traverse
Module Products.PluggableAuthService.PluggableAuthService, line 226, in validate
Module Products.PluggableAuthService.PluggableAuthService, line 599, in _extractUserIds
Module pas.plugins.sqlalchemy.plugin, line 92, in wrapper
Module pas.plugins.sqlalchemy.plugin, line 247, in authenticateCredentials
Module sqlalchemy.orm.scoping, line 53, in __call__
Module sqlalchemy.util._collections, line 840, in __call__
Module z3c.saconfig.scopedsession, line 34, in
Module z3c.saconfig.scopedsession, line 19, in scopefunc
Module zope.component._api, line 169, in getUtility
ComponentLookupError: (, 'pas.plugins.sqlalchemy')
```

And any attempt to look at a Plone page, or even the ZMI, fails with a *We’re sorry, but there seems to be an error…*

At first glance, it seems that the problem is that the @graceful_recovery decorator ... doesn't.

I'm going to take a look to see if catching _ComponentLookupError_ as well as SQLAlchemyError would be helpful.