Hi,
I have a test section in buildout (version 1.5.2) which uses the environment option to get os.environ configs into the test script.
But the environment configuration does not show up in the generated script.
The recipe I use is zc.recipe.testrunner 1.4.0 and Python 2.5 (virtualenv).
When running the tests of zc.recipe.testrunner with this Python many of them fail including the test for the environment option.
Is it intensional that zc.recipe.testrunner does not run when using a virtualenv'ed Python?
P.S.: The Bugtracker of this project https://bugs.launchpad.net/zc.recipe.testrunner is currently disabled, so I was unable to put this there.
Yours sincerely,
--
Michael Howitz · mh(a)gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development
Hi,
we are upgrading a customers project from Zope 2.11.x to Zope 2.13.4.
In this project the expression type "provider" of zope.contenttype is used.
But loading the configure.zcml of zope.contentprovider fails with:
ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/tales', u'expressiontype')
I tracked this down to Zope2/App/exclude.zcml where the meta.zcml of the package zope.browserpage gets excluded.
Sadly this ZCML file defines the expressiontype directive.
What is the current way to use zope.contentprovider in a Zope2 environment?
I had the following idea to fix this issue:
* move the registration of the directive from meta.zcml into meta-expressiontype.zcml
* include meta-expressiontype.zcml of zope.browserpage
* include meta-expressiontype.zcml in our project to get around the exclusion of Zope2
Are there any better ideas?
Yours sincerely,
--
Michael Howitz · mh(a)gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development
Hi,
I'll be at PyCon during the sprints. As promised from the tasks last
year, I'd be happy to organize Zope sprinting activity.
Who's coming? Who's interested? Any topic suggestions?
Christian
--
Christian Theune · ct(a)gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
I've finally finished refactoring my WebTest/testbrowser branches,
basically doing this:
- Integrate with WebTest. zope.testbrowser.webtest.Browser is a new
Browser implementation that uses webtest.TestApp to drive a WSGI
application. This allows simple and direct testing of WSGI applications.
- Re-write the test application as a pure WSGI application using WebOb.
Run the existing tests using the WebTest based Browser
- Move zope.app.testing based Browser into zope.app.testing (leaving
backwards compatibility imports in-place).
This refactoring removes these test dependencies from zope.testbroswer:
zope.app.appsetup
zope.app.publication
zope.app.testing >= 3.8.1
zope.browserpage
zope.browserresource
zope.component
zope.container
zope.principalregistry
zope.ptresource
zope.publisher
zope.security
zope.site
zope.traversing
And adds these:
zope.pagetemplate
WebTest
zope.app.testing gains this dependency:
zope.testbrowser >= 4.0.0dev
This is a very big change, so I would appreciate anyone who would take a
look at these branches before I merge:
svn+ssh://svn.zope.org/repos/main/zope.testbrowser/branches/jinty-webtest3svn+ssh://svn.zope.org/repos/main/zope.app.testing/branches/jinty-testbrows…
I plan to merge the branches in the next few weeks if there are no
objections.
--
Brian Sutherland
Hi,
When I have an acquisition wrapped object, e. g. my_object and call:
>>> unicode(my_object)
The method __str__ of my_object is called even when it has an __unicode__ method.
See the following bin/zopectl debug session:
$ bin/zinstance debug
Starting debugger (the name "app" is bound to the top-level Zope object)
>>> import OFS.SimpleItem
>>> class A(OFS.SimpleItem.SimpleItem):
... def __str__(self): return '__str__ called'
... def __unicode__(self): return '__unicode__ called'
...
>>> a = A()
>>> print unicode(a)
__unicode__ called
>>> print unicode(a.__of__(app))
__str__ called
>>> print type(a.__of__(app))
<type 'Acquisition.ImplicitAcquisitionWrapper'>
This happens for Python 2.6 and 2.7 on Zope 2.13.4.
Is there a suggested work around?
P.S.: I also filed a bug report: https://bugs.launchpad.net/acquisition/+bug/719335
Yours sincerely,
--
Michael Howitz · mh(a)gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development
Hi All,
This is particularly problematic when using the common case of
SQLAlchemy declaratively mapped model classes.
The attached unit test when run will fail with:
Error in test test_provideAdapter (test_sa.TestAdapter)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/unittest.py", line 279, in run
testMethod()
File "test_sa.py", line 25, in test_provideAdapter
provideAdapter(MyAdapter,Model)
File
"zope.component-3.10.0-py2.6.egg/zope/component/globalregistry.py", line
72, in provideAdapter
base.registerAdapter(factory, adapts, provides, name, event=False)
File "zope.component-3.10.0-py2.6.egg/zope/component/registry.py",
line 182, in registerAdapter
required = _getAdapterRequired(factory, required)
File "zope.component-3.10.0-py2.6.egg/zope/component/registry.py",
line 414, in _getAdapterRequired
for r in required:
TypeError: 'DeclarativeMeta' object is not iterable
Why is that and how should I register an adapter against such a class?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Hi,
I find a few string exceptions leftover in Zope 2.13 code.
However, they are not allowed anymore in Python 2.6.
I guess that the remaining string exceptions are in dead/semidead code.
What practice has been followed until now regarding fixing those
exceptions ?
Regards
--
Godefroid Chapelle (aka __gotcha) http://bubblenet.be