<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.web.zope.grok.devel">
    <title>gmane.comp.web.zope.grok.devel</title>
    <link>http://blog.gmane.org/gmane.comp.web.zope.grok.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11511"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11510"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11508"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11507"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11503"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11500"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11498"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11491"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11487"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11484"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11478"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11475"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11473"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11472"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11469"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11468"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11465"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11462"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11461"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11460"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11511">
    <title>zope.app.file/zope.file buildout error</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11511</link>
    <description>&lt;pre&gt;Hi,
I've tried to run Music Tutorial but it doesn't work in song.py section ( http://grok.zope.org/documentation/tutorial/musical-performance-organizer-part-1 ). So I've tried zope.file how-to: http://grok.zope.org/documentation/how-to/uploading-file but it doesn't work too! :(

with a new grokproject test

I've added in buildout.cfg:
[zope_conf]
recipe = collective.recipe.template
input = etc/zope.conf.in
output = ${buildout:parts-directory}/etc/zope.conf
filestorage = ${buildout:directory}/var/filestorage
blobstorage = ${buildout:directory}/var/blobstorage
devmode = on
extra =

#I've added the devmode line to resolve another error.

Then I've added in setup.py:
      install_requires=['setuptools',
                        'grok',
                        'grokui.admin',
                        'fanstatic',
                        'zope.fanstatic',
                        'grokcore.chameleon',
                        'grokcore.startup',
                        # Add extra requirements here
                        'zope.file',
                        'zope.mimetype',
                        ],

bin/buildout run without errors but when grok startup: 

bin/paster serve --reload parts/etc/debug.ini

It raises this error:
ConfigurationError: ('Invalid value for', 'menu', "ImportError: Couldn't import zmi_views, No module named zmi_views")
---
Complete output there: http://pastebin.com/4ttSuCYp


I've tried with zope.app.file part from the same how-to but it raises a different error:
 File "/usr/lib/python2.7/email/mime/image.py", line 9, in &amp;lt;module&amp;gt;
    import imghdr
RuntimeError: sys.path must be a list of directory names
---
Complete output there: http://pastebin.com/ysH1VRA7

Thanks!
Mauro_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Mauro Boschi</dc:creator>
    <dc:date>2012-05-22T15:48:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11510">
    <title>Pickle namespace clash</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11510</link>
    <description>&lt;pre&gt;Dear Grok Devs,

I've got Grok set up on a number of machines, and have started getting some
errors on my Mac OS X Lion machine
I had Grok set up nicely using mod_wsgi and the Enthought Python
Distribution, so that I could take advantage of Enthought's MKL libraries
with numpy, but a recent buildout has somehow killed it.

The end of the paster error is below.


  File 
"/Users/albl500/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/confi
guration/config.py", line 706, in finish
    actions = self.handler(context, **args)
  File 
"/Users/albl500/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclu
de/zcml.py", line 51, in includeDependenciesDirective
    info = DependencyFinder(dist).includableInfo(['configure.zcml',
'meta.zcml'])
  File 
"/Users/albl500/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclu
de/dependency.py", line 24, in includableInfo
    module = resolve(dotted_name)
  File 
"/Users/albl500/.buildout/eggs/zope.dottedname-3.4.6-py2.7.egg/zope/dottedna
me/resolve.py", line 32, in resolve
    found = __import__(used)
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/bimdp/__init__.py", line 82, in &amp;lt;module&amp;gt;
    from binode import (
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/bimdp/binode.py", line 77, in &amp;lt;module&amp;gt;
    import mdp
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/mdp/__init__.py", line 128, in &amp;lt;module&amp;gt;
    numx_rand, numx_version) = configuration.get_numx()
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/mdp/configuration.py", line 179, in get_numx
    import scipy as numx
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/scipy/__init__.py", line 85, in &amp;lt;module&amp;gt;
    from numpy import oldnumeric
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/numpy/oldnumeric/__init__.py", line 14, in &amp;lt;module&amp;gt;
    from compat import *
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/numpy/oldnumeric/compat.py", line 106, in &amp;lt;module&amp;gt;
    class Unpickler(pickle.Unpickler):
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/numpy/oldnumeric/compat.py", line 110, in Unpickler
    dispatch = copy.copy(pickle.Unpickler.dispatch)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"/Library/GrokServer/SoS/server/parts/etc/site.zcml", line 4.2-4.27
    ZopeXMLConfigurationError: File
"/Library/GrokServer/SoS/server/src/SoS/configure.zcml", line 4.2-4.37
    AttributeError: 'builtin_function_or_method' object has no attribute
'dispatch'

I opened up compat.py
(https://github.com/numpy/numpy/blob/master/numpy/oldnumeric/compat.py), and
noticed that the error can be triggered when cPickle is used instead of
pickle. So, I figured an earlier 'import cPickle as pickle' statement could
be the problem. However, I've changed all such lines from my code, and still
get the same error. A grep -r of the egg cache shows that a couple modules
in ZODB3-3.10.5-py2.7 do use the 'import cPickle as pickle' statement ( only
in ZEO/scripts/zeoqueue.py, ZODB/utils.py &amp;amp; ZODB/tests/testUtils.py), but it
doesn't work if I change those either. There's even more

Has anyone got any ideas why this isn't working?
I can tell that pickle.Unpickler is a class, and that cPickle.Unpickler is a
function.
Usually though, if I 'import cPickle as pickle', and then 'import pickle',
pickle.Unpickler is a class.
However, that is exactly what isn't happening here. There is an 'import
pickle' line immediately before the block where this error is raised. Why
then, is it not importing the pure-python version of pickle? Any ideas??

Cheers,
Alex





_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Alex Leach</dc:creator>
    <dc:date>2012-05-21T12:50:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11508">
    <title>pickling of dynamic classes</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11508</link>
    <description>&lt;pre&gt;Dear All,

This seems to be generally a problem with pickle but I hope I will be able
to get some inputs for the problem.

In one function of my grok.Application class I'm dynamically creating a
class

self.VarName = type('class name', (&amp;lt;base class&amp;gt;,), dict())
* &amp;lt;base class&amp;gt; does inherit grok.Container.*

While running this I'm getting following error:

Module ZODB.serialize:*422* in serialize
&amp;lt;http://localhost:8080/bizopine#&amp;gt;
__getstate__*(**)**)*
Module ZODB.serialize:*431* in _dump        &amp;lt;http://localhost:8080/bizopine#&amp;gt;
*PicklingError: Can't pickle &amp;lt;class '&amp;lt;appname&amp;gt;.app.&amp;lt;class name&amp;gt;'&amp;gt;:
attribute lookup **&amp;lt;appname&amp;gt;.app.&amp;lt;class name&amp;gt;** failed*

Pickling documentation does say that :
What can be pickled and unpickledclasses that are defined at the top level
of a module

*But is it the problem here and if yes then what can be the possible
solution for this ?*

Thanks,
Anurag
_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Anurag Sharma</dc:creator>
    <dc:date>2012-05-16T11:24:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11507">
    <title>grokcore.resource</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11507</link>
    <description>&lt;pre&gt;After the recent grok sprint I have spent some hours taking parts of
megrok.resource and putting them in the grokcore.resource package:

svn+ssh://svn.zope.org/repos/main/grokcore.resource/trunk

grokcore.resource helps you use fanstatic resources in your view
components. Instead of `needing` resources in the update method of
your view components, you can use a directive to associate resources
with a view component, so instead of::

class MyView(grok.View):
    def update(self):
        myresource.need()

You write::

class MyView(grok.View):
    grok.resources(myresource)

This removes a lot of one-line update methods from our code base,
which is good. grokcore.resource works for grok.View, grok.Viewlet,
grok.Layout and grok.ContentProvider view components.

Are you ok with making this a part of grok? I created a branch of grok
in which I incorporated grokcore.resource:

svn+ssh://svn.zope.org/repos/main/grok/branches/janjaapdriessen-grokcore-resource

I would like you to try this out in your own applications. Let me know
if you have any questions.

JJ
&lt;/pre&gt;</description>
    <dc:creator>Jan-Jaap Driessen</dc:creator>
    <dc:date>2012-05-14T19:02:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11503">
    <title>Static dir with grok.PageTemplateFile</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11503</link>
    <description>&lt;pre&gt;I have a few forms in separate modules that share the same template. Rather 
than having the template in the &amp;lt;module_name&amp;gt;_templates/ directory, I've got 
this one 'edit-form.pt' template in the bottom, src/ directory.

It worked fine, until I added a (conditional) include in the head of the page 
template, so that it downloads a CSS stylesheet if the form request wasn't 
done through an AJAX call.

So I'm getting an error now, whenever I request one of the forms which use 
this template, as it fails to find the static directory holding the CSS. I've 
tried adding `resource.style.need()` to the forms' update methods, but they 
still don't find the static directory. Part of the traceback shows this:-

Line 5, Column 10
In expression: &amp;lt;PathExpr standard:u'static/css/style.css'&amp;gt;

   - Names:
      {'args': (),
       'context': &amp;lt;server.app.Server object at 0x7f4878033668&amp;gt;,
       'default': &amp;lt;object object at 0x7f4891c0a490&amp;gt;,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': &amp;lt;zope.publisher.browser.BrowserRequest instance 
URL=http://localhost:8080/develop2/addSQLdatabase&amp;gt;,
       'static': None,
       'template': &amp;lt;grokcore.view.components.TrustedFilePageTemplate object at 
0x40bc8d0&amp;gt;,
       'view': &amp;lt;server.BrowseSQL.AddSQLDatabaseForm object at 0x4b246d0&amp;gt;}

I reckon the problem is where it says: 'static' : None, but I don't know how 
to rectify that...

The class declaration I have for this form is:-

class AddSQLDatabaseForm(grok.AddForm):
    grok.context(Server)
    grok.implements(ISQLDatabase)
    grok.name('addSQLdatabase')
    form_fields = grok.AutoFields(ISQLDatabase)
    label = 'Add SQL database'
    template = grok.PageTemplateFile("edit-form.pt")
    &amp;lt; at &amp;gt;grok.action('New SQL database')
    def new_database(self,**kwargs):
        database = SQLDatabase(**kwargs)
        database.creator = self.request.principal.title
        database.creation_date = datetime.datetime.now()
        database.modification_date = datetime.datetime.now()
        dbname = kwargs.pop('database')
        self.context[dbname] = database
    def update(self):
        resource.style.need()



The relevant part of the page template file (edit-form.pt) is:-

&amp;lt;metal:block tal:condition="python:request.get('HTTP_X_REQUESTED_WITH',None) 
!='XMLHttpRequest'" &amp;gt;
    &amp;lt;head&amp;gt;
          &amp;lt;link rel="stylesheet" type="text/css" tal:attributes="href 
static/css/style.css"&amp;gt;
    &amp;lt;/head&amp;gt;
&amp;lt;/metal:block&amp;gt;


Any idea why it can't find the CSS file? That same tal:attributes URL works in 
all the module-specific page templates. Why not with this generic form 
template?

Thanks for any and all help,
Alex
&lt;/pre&gt;</description>
    <dc:creator>Alex Leach</dc:creator>
    <dc:date>2012-05-13T18:05:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11500">
    <title>authentication and authorization</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11500</link>
    <description>&lt;pre&gt;Following link says information is outdated.
http://grok.zope.org/documentation/how-to/authentication-with-grok

Could somebody please point me to latest documentation on this ?

Thanks
Anurag
_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Anurag Sharma</dc:creator>
    <dc:date>2012-05-12T08:07:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11498">
    <title>megrok.rdb setup error</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11498</link>
    <description>&lt;pre&gt;Hi to all,
I'm new with Grok!

As in http://grok.zope.org/documentation/how-to/orm-using-megrok.rdb-and-sqlalchemy

I have added megrok.rdb to setup.py

install_requires=['setuptools',
          ...
          # Add extra requirements here
          'megrok.rdb'
          ],

than run bin/buildout

restarting Grok I see this error:

# bin/paster serve --reload parts/etc/deploy.ini 
Starting subprocess with file monitor
Traceback (most recent call last):
File "bin/paster", line 20, in &amp;lt;module&amp;gt;
  paste.script.command.run()
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
  invoke(command, command_name, options, args[1:])
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke
  exit_code = runner.run(args)
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
  result = self.command()
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 284, in command
  relative_to=base, global_conf=vars)
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 321, in loadapp
  **kw)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 203, in loadapp
  return loadobj(APP, uri, name=name, **kw)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 224, in loadobj
  return context.create()
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 617, in create
  return self.object_type.invoke(self)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 163, in invoke
  app = context.app_context.create()
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 617, in create
  return self.object_type.invoke(self)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 109, in invoke
  return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
  val = callable(*args, **kw)
File "/home/usytis/.buildout/eggs/grokcore.startup-1.2-py2.7.egg/grokcore/startup/startup.py", line 14, in application_factory
  return zope.app.wsgi.getWSGIApplication(zope_conf)
File "/home/usytis/.buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/__init__.py", line 162, in getWSGIApplication
  db = config(configfile, schemafile, features)
File "/home/usytis/.buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/__init__.py", line 150, in config
  appsetup.config(options.site_definition, features=features)
File "/home/usytis/.buildout/eggs/zope.app.appsetup-3.15.0-py2.7.egg/zope/app/appsetup/appsetup.py", line 111, in config
  context = xmlconfig.file(file, context=context, execute=execute)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
  include(context, name, package)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
  processxmlfile(f, context)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
  parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
  xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
  self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
  self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
  self._cont_handler.endElementNS(pair, None)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
  self.context.end()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
  self.stack.pop().finish()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
  actions = self.handler(context, **args)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
  processxmlfile(f, context)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
  parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
  xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
  self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
  self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
  self._cont_handler.endElementNS(pair, None)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
  self.context.end()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
  self.stack.pop().finish()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
  actions = self.handler(context, **args)
File "/home/usytis/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclude/zcml.py", line 51, in includeDependenciesDirective
  info = DependencyFinder(dist).includableInfo(['configure.zcml', 'meta.zcml'])
File "/home/usytis/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclude/dependency.py", line 24, in includableInfo
  module = resolve(dotted_name)
File "/home/usytis/.buildout/eggs/zope.dottedname-3.4.6-py2.7.egg/zope/dottedname/resolve.py", line 38, in resolve
  __import__(used)
File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/__init__.py", line 1, in &amp;lt;module&amp;gt;
  from megrok.rdb.components import Model, Container, QueryContainer
File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", line 46, in &amp;lt;module&amp;gt;
  class Container(MappedCollection):
File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", line 62, in Container
  &amp;lt; at &amp;gt;collection.on_link
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/usytis/second/parts/etc/site.zcml", line 4.2-4.30
  ZopeXMLConfigurationError: File "/home/usytis/second/src/second/configure.zcml", line 4.2-4.37
  AttributeError: type object 'collection' has no attribute 'on_link'

If I try with sqlalchemy it works!

Thanks a lot!_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Mauro Boschi</dc:creator>
    <dc:date>2012-05-10T16:26:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11491">
    <title>PageTemplateFile('path/to/template.cpt') does not workanymore</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11491</link>
    <description>&lt;pre&gt;Hi,

With the new release of grokcore.chameleon it seem the following pattern
does not work anymore:


from grokcore.chameleon.components import PageTemplateFile

class MyView(grok.View):
  template = PageTemplateFile('templates/mytemplate.cpt')
  ....

I guess this is because the template baseclasses in z3c.pt are not used
anymore as such in grokcore.chameleon?

Anyone an idea? I'll look into it as well now...

regards, jw
&lt;/pre&gt;</description>
    <dc:creator>Jan-Wijbrand Kolman</dc:creator>
    <dc:date>2012-05-07T09:38:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11487">
    <title>grokcore.security</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11487</link>
    <description>&lt;pre&gt;Hello all !

it seems that grokcore.security doesn't declare its dependency on
zope.dottedname, needed for :

def api(name):
    from zope.dottedname.resolve import resolve
    from zope.interface import Interface

    try:
        return True, resolve(name)
    except ImportError:
        return False, Interface


Can anyone with release rights fix this ?
Thank you !
&lt;/pre&gt;</description>
    <dc:creator>Souheil CHELFOUH</dc:creator>
    <dc:date>2012-05-06T21:43:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11484">
    <title>grokcore.resource</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11484</link>
    <description>&lt;pre&gt;In the train back home from the grok sprint yesterday I took some
parts of megrok.resource [1] to combine with fanstatic [2] into
grokcore.resource [3].

With grokcore.resource you can make resources part of your View classes like so:

"""
class MyView(grok.View):
    grokcore.resource.include(css_a, css_b)
"""

This is a handsome replacement of the "old" way of declaring resource,
often in the update method of the view:

"""
    def update(self):
        css_a.need()
        css_b.need()
"""

(This "old" way is still supported.)

The "include" directive code looks like this:

"""
class include(martian.Directive):
    scope = martian.CLASS
    store = martian.MULTIPLE
    validate = validateInclusion

    def factory(self, *resources):
        zope.interface.declarations.addClassAdvisor(
            _resources_advice, depth=3)
        return resources

def _resources_advice(cls):
    if include.bind().get(cls):
        if not grokcore.resource.interfaces.IResourcesIncluder.implementedBy(
                cls):
            zope.interface.classImplements(
                cls,
                grokcore.resource.interfaces.IResourcesIncluder)
    return cls
"""

The result of using the "include" directive is that the class which it
is used on will be marked with a marker interface
"IResourcesIncluder".
We add an event listener for IBeforeTraverseEvent that will listen to
this interface and will need the resources at that time::

"""
&amp;lt; at &amp;gt;grokcore.component.subscribe(
    grokcore.resource.interfaces.IResourcesIncluder,
    zope.app.publication.interfaces.IBeforeTraverseEvent)
def handle_inclusion(includer, event):
    includer = zope.security.proxy.removeSecurityProxy(includer)
    needs = set()
    # XXX Need to fix this?
    for class_ in includer.__class__.__mro__:
        if grokcore.resource.interfaces.IResourcesIncluder.implementedBy(class_):
            father = zope.security.proxy.removeSecurityProxy(class_)
            for resources in \
                grokcore.resource.directives.include.bind().get(father):
                needs.update(resources)
    for resource in needs:
        resource.need()
"""

I am not sure whether there is a smarter way of finding all resources
needed by a View if this View subclasses from another View. Maybe it
is just my limited understanding of how martian works. I need a second
pair of eyes here.

At this point, we can use grokcore.resource for grok.View classes, but
not yet for viewlets and on layouts (grokcore.layout).

In the zope.viewlet code, a BeforeUpdateEvent is sent, which we
subscribe to in grokcore.resource and need the resources for viewlets:

"""
&amp;lt; at &amp;gt;grokcore.component.subscribe(
    grokcore.resource.interfaces.IResourcesIncluder,
    zope.contentprovider.interfaces.IBeforeUpdateEvent)
def handle_inclusion(includer, event):
    # Same inclusion code as before.
"""

In order to make this work for Layouts I don't see another way than
emitting an event right before the layout is rendered in
grokcore.layout:

"""
def __call__(self, view):
    self.view = view
    zope.event.notify(BeforeUpdateEvent(self, self.request))
    self.update()
    return self.render()
"""

Is this OK? We could make the event grokcore.layout specific of course.

I would appreciate your feedback on the questions above. Afterwards, I
can finish grokcore.resource (readme, tests for viewlet/layout) and
would like to integrate the directive in grok (the package) under the
name 'resource', so you can write:

"""
class MyView(grok.View):
    grok.resource(css_a, css_b)
"""

Thanks for reading this far,

JJ

1) http://pypi.python.org/pypi/megrok.resource/0.5
2) http://fanstatic.org
3) http://svn.zope.org/grokcore.resource/trunk/
&lt;/pre&gt;</description>
    <dc:creator>Jan-Jaap Driessen</dc:creator>
    <dc:date>2012-05-01T08:42:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11478">
    <title>i18n translation weirdness</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11478</link>
    <description>&lt;pre&gt;We have a couple of grok.Forms where we change the title of some widgets in
the setUpWidgets() callback:

    def setUpWidgets(self, ignore_request=False):
        super(AddProjectForm, self).setUpWidgets(ignore_request)
        self.widgets['city'].label = '1'
        self.widgets['specialty'].label = '2'
        self.widgets['contractor'].label = '2'

        self.widgets['city'].title = _(u'City?')
        self.widgets['specialty'].title = _(u'What you need to do?')
        self.widgets['contractor'].title = _(u'Who you want for you job?')

The problem with this is that, while our translatable strings are
recognized as translations and we have proper translation strings in our
.po files, these strings are never translated.

So, what's the catch?

&lt;/pre&gt;</description>
    <dc:creator>Noe Nieto</dc:creator>
    <dc:date>2012-04-27T17:23:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11475">
    <title>zope.keyreference.interfaces.NotYet is thrown whilerunning tests</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11475</link>
    <description>&lt;pre&gt;Hi,

I have a package homeviva.testing that holds all tests from our aplication.
Inside that package I added a subclass of
zope.app.wsgi.testlayer.BrowserLayer that will add an instance of our grok
application add then add some more dummy data as a way to provide a common
test fixture to all of our integration test.

The layer looks like this:

from zope.app.wsgi.testlayer import BrowserLayer

class HomeVivaIntegrationLayer(BrowserLayer):
    """
    Integration Layer for HomeViva.
    """
    consworks_app = None

    def testSetUp(self):
        super(HomeVivaIntegrationLayer, self).testSetUp()

        #Add test app
        from consworks.app import Consworks
        zodb_root = self.getRootFolder()
        zodb_root['app'] = self.consworks_app = Consworks()

        #Fire up events
        import grok
        grok.notify(grok.ApplicationInitializedEvent(self.consworks_app))

        #... more stuff here

When I run my tests individually all goes fine, but if I try to run all the
tests within the package, no tests are run and a traceback is printed:

$ bin/test -s homeviva.testing
Running homeviva.testing.HomeVivaIntegrationLayer tests:
  Set up homeviva.testing.HomeVivaIntegrationLayer in 4.660 seconds.
  Running:
    2/4 (50.0%)
Traceback (most recent call last):
  File "bin/test", line 222, in &amp;lt;module&amp;gt;
    '--test-path',
'/home/tzicatl/Aplicaciones/Codigo/HomeViva/homeviva_assembla/src/homeviva.reminder',
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/__init__.py",
line 30, in run
    failed = run_internal(defaults, args, script_parts=script_parts)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/__init__.py",
line 43, in run_internal
    runner.run()
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/runner.py",
line 148, in run
    self.run_tests()
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/runner.py",
line 229, in run_tests
    setup_layers, self.failures, self.errors)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/runner.py",
line 390, in run_layer
    return run_tests(options, tests, layer_name, failures, errors)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/runner.py",
line 318, in run_tests
    test(result)
  File "/usr/lib64/python2.7/unittest/case.py", line 391, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.7/unittest/case.py", line 302, in run
    result.startTest(self)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/runner.py",
line 726, in startTest
    self.testSetUp()
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.testrunner-4.0.3-py2.7.egg/zope/testrunner/runner.py",
line 711, in testSetUp
    layer.testSetUp()
  File
"/home/tzicatl/Aplicaciones/Codigo/HomeViva/homeviva_assembla/src/homeviva.testing/homeviva/testing/integration.py",
line 13, in testSetUp
    super(HomeVivaIntegrationLayer, self).testSetUp()
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/testlayer.py",
line 75, in testSetUp
    super(BrowserLayer, self).testSetUp()
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.app.appsetup-3.15.0-py2.7.egg/zope/app/appsetup/testlayer.py",
line 64, in testSetUp
    self.db = createTestDB(self.db_name)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.app.appsetup-3.15.0-py2.7.egg/zope/app/appsetup/testlayer.py",
line 39, in createTestDB
    notify(zope.processlifetime.DatabaseOpened(db))
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.event-3.5.0_1-py2.7.egg/zope/event/__init__.py",
line 23, in notify
    subscriber(event)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/event.py",
line 24, in dispatch
    zope.component.subscribers(event, None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/registry.py",
line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.interface-3.6.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py",
line 583, in subscribers
    subscription(*objects)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.app.appsetup-3.15.0-py2.7.egg/zope/app/appsetup/bootstrap.py",
line 168, in bootStrapSubscriber
    site_manager = site.LocalSiteManager(root_folder)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.site-3.9.2-py2.7.egg/zope/site/site.py",
line 158, in __init__
    self['default'] = folder
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/btree.py",
line 112, in __setitem__
    setitem(self, self._setitemf, key, value)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/contained.py",
line 559, in setitem
    notify(event)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.event-3.5.0_1-py2.7.egg/zope/event/__init__.py",
line 23, in notify
    subscriber(event)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/event.py",
line 24, in dispatch
    zope.component.subscribers(event, None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/registry.py",
line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.interface-3.6.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py",
line 583, in subscribers
    subscription(*objects)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/event.py",
line 32, in objectEventNotify
    zope.component.subscribers((event.object, event), None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/registry.py",
line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.interface-3.6.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py",
line 583, in subscribers
    subscription(*objects)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.intid-3.7.2-py2.7.egg/zope/intid/__init__.py",
line 166, in addIntIdSubscriber
    key = IKeyReference(ob, None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/hooks.py",
line 104, in adapter_hook
    return siteinfo.adapter_hook(interface, object, name, default)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.security-3.8.2-py2.7-linux-x86_64.egg/zope/security/adapter.py",
line 86, in __call__
    adapter = self.factory(*args)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.keyreference-3.6.2-py2.7.egg/zope/keyreference/persistent.py",
line 40, in __init__
    raise zope.keyreference.interfaces.NotYet(object)
zope.keyreference.interfaces.NotYet: &amp;lt;zope.site.site.SiteManagementFolder
object at 0x5b725f0&amp;gt;


line 13, in testSetUp is this one: super(HomeVivaIntegrationLayer,
self).testSetUp()

What am I doing wrong?

&lt;/pre&gt;</description>
    <dc:creator>Noe Nieto</dc:creator>
    <dc:date>2012-04-25T05:17:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11473">
    <title>Selenium Tester</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11473</link>
    <description>&lt;pre&gt;Hi guys!

We're currently needing an extra hand with testing for
HomeViva&amp;lt;http://www.startupchile.org/supprojects/homeviva&amp;gt;

If you have some spare time and lots of expertise on selenium for zope to
create black box tests for our app, you're invited to join our awesome
team. Also knowledge about Grok is preferred since we'll need unity testing
afterwards.

So, anyone there willing to accept the challenge?

Best,
Max
_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Maximiliano Pallotto</dc:creator>
    <dc:date>2012-04-20T21:31:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11472">
    <title>Use grok/zope i18 translation mechanisms in external nongrok/zope application</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11472</link>
    <description>&lt;pre&gt;Hello everyone.

I have a web server (called "my_server", of class
"my_server.app.My_server") that is properly using the i18 translation
features implemented in Grok. I followed this guide:
http://grok.zope.org/documentation/how-to/how-to-internationalize-your-application
and the translations are working very well when "inside" the server.

Now, I have another Python application that is non-related to this
Grok/Zope server (it just uses its ZoDB for persistence and as a
"common storage" area) which could actually benefit from the
translation infrastructure provided by Grok/Zope.

Is there any way of accessing my server's translations from an
external application? Said external application is executed via an
script generated as an "entry point" of the "my_server" package. I can
actually invoke the script with "my_server/bin/myStartupScript" so at
least the paths used for the "my_server" application, like
$HOME/.buildout/ and all that should be available (thanks to Kevin
Teague for the hint he gave me on that a while ago
http://python.6.n6.nabble.com/Get-grok-site-outside-the-server-in-an-external-script-tp1931799p1931801.html).

The closest thing I've been able to do is loading the catalogs and
translate through them:

下一步

This works, and I could always use this as a fallback, but I would
like to be able to call "translate" and get the translations as I can
do when the "my_server" application is running:

u'Next Step'

This doesn't work. I've tried many variations...

... all of them without luck ...

I am attaching my
"/home/yomismo/my_server/src/my_server/configure.zcml", just in case
it helps, but it looks pretty generic to me:

&amp;lt;configure xmlns="http://namespaces.zope.org/zope"
           xmlns:grok="http://namespaces.zope.org/grok"
           xmlns:i18n="http://namespaces.zope.org/i18n"
           i18n_domain="my_server"&amp;gt;
  &amp;lt;include package="grok" /&amp;gt;
  &amp;lt;include package="zope.i18n" /&amp;gt;
  &amp;lt;includeDependencies package="." /&amp;gt;
  &amp;lt;grok:grok package="." /&amp;gt;
  &amp;lt;grok:grok package="backlib.utils.languagePreferences.PreferredLanguage" /&amp;gt;
  &amp;lt;i18n:registerTranslations directory="locales" /&amp;gt;
&amp;lt;/configure&amp;gt;

(The PreferredLanguage is the application that returns the language
the user prefers. It basically reads a cookie from the HTTPRequest)

My only guess (which is probably wrong) is that when I start the
server (with "my_server/bin/paster") something gets registered or read
or... something and this doesn't happen when the translation is called
from an outside script.

Any hint will be appreciated!

Thank you in advance.
_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Hector Blanco</dc:creator>
    <dc:date>2012-04-13T16:41:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11469">
    <title>Testing and events</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11469</link>
    <description>&lt;pre&gt;I'm doing integration testing and my app has an event subscription to
grok.IApplicationInitializedEvent.

When setting up my layer I'm doing the following (layer is
zope.fanstatic.testing.ZopeFanstaticBrowserLayer):

    def setUp(self):
        #Add test app
        from consworks.app import Consworks
        import grok
        self.root = self.layer.getRootFolder()
        self.root['app'] = Consworks()
        grok.notify(grok.IApplicationInitializedEvent)


But the handler for IApplicationInitializedEvent is not being called. What
else do I need to do to make it work?

&lt;/pre&gt;</description>
    <dc:creator>Noe Nieto</dc:creator>
    <dc:date>2012-04-11T02:01:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11468">
    <title>Bavarian Grok  Sprint</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11468</link>
    <description>&lt;pre&gt;Hi Grokkers,

here are some more information about the "Bavarian Grok Sprint".

http://www.coactivate.org/projects/bavarian-groksprint/project-home

Please feel free to add your travel details.
The same for topics please add your topics on the wiki.

If there is more general intrest we have 2 places left.

If you have further questions:

Please contact me: cklinger(at)novareto.de

Christian
&lt;/pre&gt;</description>
    <dc:creator>Christian Klinger</dc:creator>
    <dc:date>2012-03-30T08:06:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11465">
    <title>grokcore.component.util.sort_components</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11465</link>
    <description>&lt;pre&gt;Hello,

    I would like to add an option key, that explain to sort_components how to get the component in the list of items to sort.

    Basically, it is composed with the exiting key sort function.

    What do you think of this ?

    Regards,

   Sylvain,

&lt;/pre&gt;</description>
    <dc:creator>Sylvain Viollon</dc:creator>
    <dc:date>2012-03-28T13:12:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11462">
    <title>Pluggable Grok API</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11462</link>
    <description>&lt;pre&gt;Hello,

   We were talking since a while to have a way to automatically import things in the grok top-level package if other packages are present.

   I would really like to see this coming through.

   We could use the interfaces IGrok..API defined, that are used to define __all__ in the __init__ of each package, as entry-point values in setuptools. After we could write a piece of code that does the import based on that, in a package, if the name is not already defined (so we can still override things, like View in grok). That could be doable.

   What do you think of this idea ?

   Regards,

     Sylvain,


PS: And we coud throw away formlib !

&lt;/pre&gt;</description>
    <dc:creator>Sylvain Viollon</dc:creator>
    <dc:date>2012-03-26T12:05:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11461">
    <title>Conditional grokking</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11461</link>
    <description>&lt;pre&gt;Hello,

  I would like to add a feature in martian, that would let you grok a package only if a condition is met.

  My idea is still vague, but I would to make possible not to grok a package (or module) if an another package is not present (a bit like zcml:condition="installed package").

  This could be done by triggering an exception that martian catches  and skip the package (of course you will have to use this at the top of your file).

  What do you think of this silly idea ?

  Regards,

   Sylvain,

&lt;/pre&gt;</description>
    <dc:creator>Sylvain Viollon</dc:creator>
    <dc:date>2012-03-26T12:01:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11460">
    <title>module_info, template, grokcore.view</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11460</link>
    <description>&lt;pre&gt;Hello,

   I still use the view.static behavior, with grokcore.view. I don't know if you do guys.

   I am often annoyed by one point however. I mostly (95% or the time) use the view.static in a template. However if I inherit my view in an another package, I keep my template, but the view.static is different, and I loose access to the resources.

   For me, static is linked to the template. I think it should be 'kept'.

   For the moment static is an adapter that is queried with the name of the package that contains the view. I propose to change this to the name of the package that contains the template.

   I poposed to add an attribute __static_name__ (or something else) on the view, that would be initialized by the template registry (in templatereg, associate_template) with the value of the module_info.package_dotted_name if there is an association.

   In the view base class, the static adapter would be looked using this name if set, or will default to the one contained in the view's module_info.

   What do you think of this ?

  Regards,

  Sylvain,

PS: Yes that may break applications, but the result should be more useful, I think.

&lt;/pre&gt;</description>
    <dc:creator>Sylvain Viollon</dc:creator>
    <dc:date>2012-03-26T11:56:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11458">
    <title>ComponentLookupError: (&lt;InterfaceClass zope.intid.interfaces.IIntIds&gt;, '') on integration tests</title>
    <link>http://comments.gmane.org/gmane.comp.web.zope.grok.devel/11458</link>
    <description>&lt;pre&gt;I'm writing some integration test for our products. I'm placing that tests
in a separate package: homeviva.testing

When I run my test, with zope.testrunner, I'm always having the following
traceback:

Error in test test_consworks_views
(homeviva.testing.tests.test_dbmodels.ConsworksTestCase)
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/case.py", line 318, in run
    self.setUp()
  File
"/home/tzicatl/Aplicaciones/Codigo/HomeViva/homeviva_trunk/src/homeviva.testing/homeviva/testing/tests/test_dbmodels.py",
line 26, in setUp
    self.root['app'] = Consworks()
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/folder.py",
line 95, in __setitem__
    setitem(self, self.data.__setitem__, name, object)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/contained.py",
line 559, in setitem
    notify(event)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.event-3.5.0_1-py2.7.egg/zope/event/__init__.py",
line 23, in notify
    subscriber(event)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/event.py",
line 24, in dispatch
    zope.component.subscribers(event, None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/registry.py",
line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.interface-3.6.1-py2.7-linux-x86_64.egg/zope/interface/adapter.py",
line 585, in subscribers
    subscription(*objects)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/event.py",
line 32, in objectEventNotify
    zope.component.subscribers((event.object, event), None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/registry.py",
line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.interface-3.6.1-py2.7-linux-x86_64.egg/zope/interface/adapter.py",
line 585, in subscribers
    subscription(*objects)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/grok-1.4.3-py2.7.egg/grok/meta.py",
line 175, in __call__
    self._createIntIds(site)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/grok-1.4.3-py2.7.egg/grok/meta.py",
line 216, in _createIntIds
    setupUtility(site, intids, IIntIds)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/grokcore.site-1.5-py2.7.egg/grokcore/site/meta.py",
line 108, in setupUtility
    container[name_in_container] = utility
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/btree.py",
line 112, in __setitem__
    setitem(self, self._setitemf, key, value)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/contained.py",
line 560, in setitem
    notifyContainerModified(container)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg/zope/container/contained.py",
line 332, in notifyContainerModified
    notify(ContainerModifiedEvent(object, *descriptions))
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.event-3.5.0_1-py2.7.egg/zope/event/__init__.py",
line 23, in notify
    subscriber(event)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/event.py",
line 24, in dispatch
    zope.component.subscribers(event, None)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/registry.py",
line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.interface-3.6.1-py2.7-linux-x86_64.egg/zope/interface/adapter.py",
line 585, in subscribers
    subscription(*objects)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.catalog-3.8.1-py2.7.egg/zope/catalog/catalog.py",
line 197, in reindexDocSubscriber
    id = component.getUtility(IIntIds, context=cat).queryId(ob)
  File
"/home/tzicatl/Aplicaciones/Buildout/eggs/zope.component-3.10.0-py2.7.egg/zope/component/_api.py",
line 169, in getUtility
    raise ComponentLookupError(interface, name)
ComponentLookupError: (&amp;lt;InterfaceClass zope.intid.interfaces.IIntIds&amp;gt;, '')

My testcase looks like this:


class ConsworksTestCase(unittest.TestCase):
    """
    TestCase for the Consworks app object
    """
    layer = HomeVivaIntegrationLayer(homeviva.testing)

    def setUp(self):
        #Add test app
        from consworks.app import Consworks
        self.root = self.layer.getRootFolder()
        self.root['app'] = Consworks()
        self.app = self.root['app']

   def test_here(self):
       ....

I tried to manually  register a Intid utility in my layer, but with no
results.

from zope.app.wsgi.testlayer import BrowserLayer
from zope.site.hooks import getSiteManager
from zope.intid.interfaces import IIntIds
from zope.intid import IntIds

class HomeVivaIntegrationLayer(BrowserLayer):
    """
    Integration Layer for HomeViva.
    """

    def testSetUp(self):
        super(HomeVivaIntegrationLayer, self).testSetUp()
        # root = self.getRootFolder()
        # sm = getSiteManager()
        # sm.registerUtility(IntIds(), provided=IIntIds)
        # import pdb; pdb.set_trace( )



Anyone has hit this error? how did you fixed it?



&lt;/pre&gt;</description>
    <dc:creator>Noe Nieto</dc:creator>
    <dc:date>2012-03-20T22:12:36</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.web.zope.grok.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.web.zope.grok.devel</link>
  </textinput>
</rdf:RDF>

