[Repoze-dev] TurboGears transaction middleware and repoze.tm

Chris McDonough chrism at plope.com
Wed Dec 19 06:09:02 UTC 2007


On Dec 18, 2007, at 9:58 PM, Mark Ramm wrote:

> Does repoze.tm still require all of ZODB to be 1) installed and 2)
> loaded into memory in order to function?

repoze.tm still has ZODB as an installation requirement, but it  
doesn't actually *use* any of ZODB except for the "transaction" package.

The reasons for this are twofold (and equally stupid):

1) At the time when repoze.tm was packaged, the transaction package  
was not available by itself (it had dependencies on ZODB).

2) The primary consumers of repoze.tm have been ZODB folks (Zope  
folks, actually), and ZODB is picky about which version of the  
transaction package it will work with (it wants to use "the version it  
ships with", for lack of a better term).

1 is solved now, because a "broken out" version of the transaction  
package is now available (see http://pypi.python.org/pypi/transaction/1.0a1) 
.  2 is not yet solved because released versions of Zope (e.g. the one  
that ships with repoze.zope2) depend on ZODB 3.7, and the broken out  
transaction module is actually branched from the ZODB head (3.8-ish),  
and they are not known to be compatible with each other.  As a result,  
if I went ahead and just made a new repoze.tm release that depended on  
"transaction" instead of "ZODB3", and did nothing else, new  
installations of repoze.zope2 would likely stop working (as it has a  
dependency on "repoze.tm").

All that said, I suspect we should package up "repoze.tm" as something  
that depends on "transaction" only, and package up another  
"repoze.zodb" module (which will include a compatible "transaction"  
module) for repoze.zope2 people.

Packaging up repoze.tm as something that depends only on the  
"transaction" module (and a few ancillary, hopefully-benign modules)  
is dead-simple: I'll just change the install_requires dependencies to  
depend on "transaction" rather than "ZODB3".  Doing the work to keep  
repoze.zope2 going is only slightly harder.

I should have time to do both this week.  Perhaps when that's done,  
I'll release "repoze.tm" to the cheeseshop, so you'll be able to  
"easy_install repoze.tm" and get bare-minimum package dependencies.

> Some TG2 users will use zodb (perhaps quite a few, if we can help
> people past some negative perceptions) but I think it's safe to say
> that most will use a RDBMS and SQLAlchemy.   I would like to have
> transaction middleware with support for two phase commit, and all the
> other nifty features of the zope transaction manager, but I don't
> think I can get away with making all TG2 users install and run ZODB.

Yes, definitely.

That said, FWIW, besides the noise and time of installation, just  
installing repoze.tm just as it is today probably won't cause anybody  
much of a problem *unless* they actually also use ZODB or other Zopish  
things in the same sandbox already (if they use ZODB, it might  
conflict).  The ZODB software that is installed (but not used) via the  
current repoze.tm dependencies is basically inert.  I wouldn't let it  
scare you off from trying it if you're interested in it, and you just  
want to play around with it.  If you're worried that installing it  
will hose something in your Python installation, or removing dead  
dependencies once we get it repackaged will be too hard, you can run  
it in a throwaway virtualenv.  All the code you write will still work  
once you start using the new package with slimmed-down deps in a new  
virtualenv.  If it helps, you can think of it as a "technology  
preview" ;-)

> p.s. Getting the tm to work with TG2, will definitely encourage it's
> use in both the TurboGears and Pylons communities, which would bring
> us a lot closer to my dream of TurboGears, Pylons, Zope, Paste, and
> others "working together on the web."  I think Zope brings a lot of
> maturaty and experince to the Python web community, but we need some
> clear integration points so that we can start getting people to "cross
> the gap."

For sure!  That's definitely the goal here.  I'm pretty excited about  
this sort of prospect.

Thanks,

- C



More information about the Repoze-dev mailing list