[Zope3-Users] Re: zalchemy - default engine?

2008-04-08 Thread Brandon Craig Rhodes
I want to claim that zc.recipe.testrunner should throw up a
traceback when a test hits an import error, since otherwise it's
pretty dratted impossible to tell where the bad import was.  When
trying to figure out why my application was broken this afternoon (it
was because: z3c.zalchemy had been updated to no longer work against
any copy of SQLAlchemy I could find), it didn't help that the errors
from my test suites were as follows.

Trying to run the test suite of my bottom-level module, that imports
my database tables, gave the result:

Running tests at level 1
Test-module import failures:

Module: gatech.mage_database.tests.test_docstrings

AttributeError: 'module' object has no attribute 'class_state_getter'

My next package's test suite, that uses the database tables defined in
the first package to create and destroy combinations of objects and
model their behavior, gave a quite different error message:

Running tests at level 1
Test-module import failures:

Module: gatech.iam.tests.test_docstrings

Traceback (most recent call last):
  File 
/home/brandon/IamAPI/dev/gatech.iam/src/gatech/iam/__init__.py, line 5, in 
module
from .model import (
  File /home/brandon/IamAPI/dev/gatech.iam/src/gatech/iam/model.py, 
line 15, in module
from z3c.zalchemy import getSession
ImportError: cannot import name getSession

Finally, my Grok web application, which presents an XML-RPC interface
through which users can manipulate the objects defined in the second
package described above, gave this error when I tried to run its test
suite:

Running tests at level 1
Test-module import failures:

Module: iamapi.tests.test_docstrings

ImportError: No module named buckets

Thank goodness I saw Christian's quick and helpful response to someone
here on the mailing list!  I would not even have guessed from the
above message that z3c.zalchemy was behind every one of those errors.
When I downgraded z3c.zalchemy to the previous version, *all three* of
the test suites started running again, and succeeded!

All three of the above messages, therefore, were each, in some way,
trying to complain about the same problem.  And yet they look like
completely different errors, and only one of them even mentions
z3c.zalchemy.  I find this somehow depressing, but I'll go eat some
dinner and see if that perks me up.  (Don't tell ANYONE I said this,
but the magic that seems to be involved in the above error messages -
the sheer ability of this problem to masquerade as three different
problems - reminds me of what I've heard people say about Rails!)

-- 
Brandon Craig Rhodes   [EMAIL PROTECTED]   http://rhodesmill.org/brandon

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Getting started with a zope 3 install as eggs

2007-11-04 Thread Brandon Craig Rhodes
Jesper Petersen [EMAIL PROTECTED] writes:

 I've looked a bit at zopeproject, but I'm still wondering if it's
 possible to still install zope as eggs without zopeproject (if that
 even makes sense).

If I understand both zopeproject and your question (and I'm less
confident about whether I understand your question), then this might
be the answer you need: The zopeproject script is *not* designed to
install Zope.  That is, it's not, once you've developed your Zope
project in one place, the way you make Zope appear on the actual
hosting server so that your application can run.

Instead, buildout is how you get Zope installed most of the time.
Your setup.py for your application is what will list Zope as a
dependency, and will result in its being fetched and installed before
you run your application.

So what's the point of zopeproject?  It's just there to write your
first setup.py and buildout.py, to create your src/ directory
for you, and get things set up for development.  But once you've
started your project, you'll never need zopeproject again; you can
immediately uninstall it if you want! :-) So you'll never need it
installed on a production box, only on development boxes where you
first create projects out of nothing.

Let me know whether this answer was helpful, or a statement of the
obvious that is beside the actual point of your question. :-)

-- 
Brandon Craig Rhodes   [EMAIL PROTECTED]   http://rhodesmill.org/brandon

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users