[Zope-CMF] 2.3

Charlie Clark charlie.clark at clark-consulting.eu
Thu Mar 22 12:42:59 UTC 2012


Am 22.03.2012, 13:28 Uhr, schrieb yuppie <y.2012 at wcm-solutions.de>:

> The tools are *local* utilities. Including the ZCML doesn't fix this  
> issue. You have to run the upgrade step.
>  It should be possible to use the ZMI without this kind of errors. In  
> some places I added fallbacks like this one:
>          try:
>             utool = getUtility(IURLTool)
>         except ComponentLookupError:
>             # BBB: fallback for CMF 2.2 instances
>             utool = aq_get(self, 'portal_url')
>  If you can't run the upgrades from the ZMI it might be necessary to add  
> more fallbacks in CMF.

Hi Yuppie,

thanks for the quick and informative reply. On both of my test sites I've  
not been able to look at the site in the ZMI without getting the errors.  
Even running Site/portal_setup fails. FWIW both sites are using the ursa  
globals. I can try patching this in the way you suggest and then see how  
the upgrade works.

Charlie

PS. I've just run tests on trunk and am getting failures in CMFCore:

Failure in test test_getActionObject_oldskool_action_deprecated  
(Products.CMFCore.tests.test_ActionsTool.ActionsToolTests)
Traceback (most recent call last):
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 327, in run
     testMethod()
   File  
"/Users/charlieclark/Sites/CMF/src/Products.CMFCore/Products/CMFCore/tests/test_ActionsTool.py",  
line 99, in test_getActionObject_oldskool_action_deprecated
     '2.4. Use Action and Action Category objects instead.' in warning)
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 608, in deprecated_func
     return original_func(*args, **kwargs)
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 420, in assertTrue
     raise self.failureException(msg)
AssertionError: False is not true



Failure in test test_getDiff  
(Products.CMFCore.tests.test_FSPythonScript.CustomizedPythonScriptTests)
Traceback (most recent call last):
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 327, in run
     testMethod()
   File  
"/Users/charlieclark/Sites/CMF/src/Products.CMFCore/Products/CMFCore/tests/test_FSPythonScript.py",  
line 269, in test_getDiff
     self.assertEqual(list(cps.getDiff()), _DIFF_TEXT.splitlines())
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 509, in assertEqual
     assertion_func(first, second, msg=msg)
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 738, in assertListEqual
     self.assertSequenceEqual(list1, list2, msg, seq_type=list)
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 720, in assertSequenceEqual
     self.fail(msg)
   File  
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",  
line 408, in fail
     raise self.failureException(msg)
AssertionError: Lists differ: ['--- original', '+++ modified... != ['---  
original ', '+++ modifie...

First differing element 0:
--- original
--- original

- ['--- original',
+ ['--- original ',
?               +

-  '+++ modified',
+  '+++ modified ',
?               +

    '@@ -7,4 +7,4 @@',
    ' ##parameters=',
    ' ##title=',
    ' ##',
    "-return 'cps'",
    "+return 'cps -- replaced'"]

   Ran 219 tests with 2 failures and 0 errors in 3.376 seconds.
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226


More information about the Zope-CMF mailing list