grok is not compatible with martian 0.9.4 and up.

Bug #238109 reported by Andreas Kostyrka
2
Affects Status Importance Assigned to Milestone
grok
Invalid
Undecided
Brandon Rhodes

Bug Description

Please check http://pypi.python.org/pypi/martian/0.9.4
the change log explicitly mentions that the methods mentioned in the
traceback below has been removed.

Highly, amusing:

>> import grok
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/andreas/customers/gsc/lib/python2.5/site-packages/grok-0.12.1-py2.5.egg/grok/__init__.py", line 33, in <module>
    from grok.components import Model, Adapter, MultiAdapter, View
  File "/home/andreas/customers/gsc/lib/python2.5/site-packages/grok-0.12.1-py2.5.egg/grok/components.py", line 56, in <module>
    from grok import interfaces, formlib, util
  File "/home/andreas/customers/gsc/lib/python2.5/site-packages/grok-0.12.1-py2.5.egg/grok/util.py", line 28, in <module>
    from martian.util import class_annotation, methods_from_class, scan_for_classes
ImportError: cannot import name class_annotation

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 238109] [NEW] grok is not compatible with martian 0.9.4 and up.

On 7 Jun 2008, at 14:04 , Andreas Kostyrka wrote:
>>> import grok
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/andreas/customers/gsc/lib/python2.5/site-packages/
> grok-0.12.1-py2.5.egg/grok/__init__.py", line 33, in <module>
> from grok.components import Model, Adapter, MultiAdapter, View
> File "/home/andreas/customers/gsc/lib/python2.5/site-packages/
> grok-0.12.1-py2.5.egg/grok/components.py", line 56, in <module>
> from grok import interfaces, formlib, util
> File "/home/andreas/customers/gsc/lib/python2.5/site-packages/
> grok-0.12.1-py2.5.egg/grok/util.py", line 28, in <module>
> from martian.util import class_annotation, methods_from_class,
> scan_for_classes
> ImportError: cannot import name class_annotation

Right, grok 0.12.x isn't compatible with martian >= 0.9.4, which is
why it pins down the martian version to 0.9.3 (see http://grok.zope.org/releaseinfo/grok-0.12.1.cfg)
.

 From your traceback above I deduct you installed grok into site-
packages, probably using easy_install. This is not the typical way to
install grok! As you can read at http://grok.zope.org/documentation/
book, the recommended way is to easy_install grokproject and then
create a new sandbox with grokproject. This will also download the
most recent grok *and* the correct versions according to the version
file (see link above).

Revision history for this message
Martijn Faassen (faassen) wrote :

Andreas, I am curious how you got Grok working from site-packages in
the first place. What did you do exactly to install it?

Note that I wouldn't just release a new version of Martian if I knew
it would break people's installation of Grok. We do quite a bit of
work to prevent exactly this kind of problem however.

Revision history for this message
Andreas Kostyrka (andreas-kostyrka) wrote :

Well, my setup has one speciality, because I need to seperate workspaces for different customers, the first level is a virtualenv, which means that I've got a private python binary and a private lib/python2.5.

My personal guess is that I've run python setup.py develop on the package, which made the thing install all dependencies via easy_install ;)

I think some howto/tutorial made me do that *scratch head*

Andreas

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 238109] Re: grok is not compatible with martian 0.9.4 and up.

On 9 Jun 2008, at 23:18 , Andreas Kostyrka wrote:
> Well, my setup has one speciality, because I need to seperate
> workspaces
> for different customers, the first level is a virtualenv, which means
> that I've got a private python binary and a private lib/python2.5.

That's not a problem, grokproject can easily work out of a virtualenv.

> My personal guess is that I've run python setup.py develop on the
> package, which made the thing install all dependencies via
> easy_install
> ;)

Right... not a good idea :(

> I think some howto/tutorial made me do that *scratch head*

I coudln't have been a Grok tutorial ;)

Revision history for this message
Andreas Kostyrka (andreas-kostyrka) wrote :

No, something googled about z3c.testsetup I think.

Perhaps then grokproject should not create a setup.py if it's broken?

Or the setup.py (of grok?) should specify the required version of martion
(martian==0.9.3 would solve the problem)

And how does one update a grok project then?

Andreas

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

On 10 Jun 2008, at 23:01 , Andreas Kostyrka wrote:
> No, something googled about z3c.testsetup I think.

Unless you can tell us what it was, it's hard for us to fix it or put
it into perspective :)

> Perhaps then grokproject should not create a setup.py if it's broken?

grokproject's setup.py isn't broken. Not all grok versions are
compatible with all Martian versions, though. THat's a completely
different problem. A problem that can be alleviated with zc.buildout's
version pinning though. That's why grokproject also generated a
buildout.cfg and runs buildout. This is documented.

> Or the setup.py (of grok?) should specify the required version of
> martion
> (martian==0.9.3 would solve the problem)

The preferred way to pin versions for us is not in setup.py but in
buildout.cfg.

> And how does one update a grok project then?

Look at buildout.cfg, it should include a versions file specific to a
certain Grok release. If you want to upgrade to a newer Grok version,
simply change the reference to the versions file. You can also
specifically override certain versions locally in your buildout.cfg

todd (todd-infrae)
Changed in grok:
assignee: nobody → brandon-rhodes
milestone: none → 1.0
Revision history for this message
Brandon Rhodes (brandon-rhodes) wrote :

I myself am sympathetic towards the view of the bug reporter that setup.py should pin versions, and that if developers need more flexibility than this allows, then they should improve setuptools. But until that view is widely shared, it is the policy of Grok to only support "grokproject"-based installs. Any attempt to install grok with "easy_install" creates a complete mess, and we're well aware of that fact, and try to document it everywhere we can. This ticket, therefore, does not represent an actual problem with Grok, and I am marking it Invalid.

Thank you, Andreas, for alerting us to the fact that people are still getting tripped up by this. We will keep our eyes open for any documentation that tries to suggest people should "easy_install" Grok.

Changed in grok:
status: New → Invalid
Revision history for this message
Andreas Kostyrka (andreas-kostyrka) wrote : Re: [Bug 238109] Re: grok is not compatible with martian 0.9.4 and up.

On Wed, Dec 10, 2008 at 09:32:33PM -0000, Brandon Craig Rhodes wrote:
> getting tripped up by this. We will keep our eyes open for any
> documentation that tries to suggest people should "easy_install" Grok.

The problem is that more advanced python users will try to install it via setuptools by themselves,
so you need to warn everywhere that this is broken. Not just leave out the option in the documentation.

Andreas

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.