Re: [Checkins] SVN: Zope/branches/2.9/lib/python/ Replace bulk of uses of 'zLOG' with equivalent Python 'logging' module usage.
This, BTW, breaks CMF 1.5 on Zope 2.9. Not sure I/you should care though ;-) Traceback (most recent call last): File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFActionIcons/__init__.py", line 19, in ? from Products.CMFCore.DirectoryView import registerDirectory File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/__init__.py", line 21, in ? import MembershipTool, WorkflowTool, CatalogTool, DiscussionTool File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/CatalogTool.py", line 23, in ? from Products.ZCatalog.ZCatalog import LOG ImportError: cannot import name LOG On 25. Jun 2006, at 00:45, Tres Seaver wrote:
Modified: Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py =================================================================== --- Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py 2006-06-24 21:59:59 UTC (rev 68834) +++ Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py 2006-06-24 22:45:20 UTC (rev 68835) @@ -37,7 +37,6 @@ import PluggableIndexInterface from Products.PluginIndexes.interfaces import IPluggableIndex from Products.PluginIndexes.TextIndex import Splitter -from zLOG import LOG from zope.interface import implements
-- Anything that, in happening, causes something else to happen, causes something else to happen. --Douglas Adams
--On 25. Juni 2006 16:32:04 +0200 "Stefan H. Holek" <stefan@epy.co.at> wrote:
This, BTW, breaks CMF 1.5 on Zope 2.9. Not sure I/you should care though ;-)
Traceback (most recent call last): File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFActionIcons/__init__.py", line 19, in ? from Products.CMFCore.DirectoryView import registerDirectory File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/__init__.py", line 21, in ? import MembershipTool, WorkflowTool, CatalogTool, DiscussionTool File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/CatalogTool.py", line 23, in ? from Products.ZCatalog.ZCatalog import LOG ImportError: cannot import name LOG
hehe...why the hell does CMF import zLOG from ZCatalog instead directly? -aj
--On 25. Juni 2006 16:32:04 +0200 "Stefan H. Holek" <stefan@epy.co.at> wrote:
This, BTW, breaks CMF 1.5 on Zope 2.9. Not sure I/you should care though ;-)
Traceback (most recent call last): File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFActionIcons/__init__.py", line 19, in ? from Products.CMFCore.DirectoryView import registerDirectory File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/__init__.py", line 21, in ? import MembershipTool, WorkflowTool, CatalogTool, DiscussionTool File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/CatalogTool.py", line 23, in ? from Products.ZCatalog.ZCatalog import LOG ImportError: cannot import name LOG
Tres, you replace all 'LOG' vars with 'logger'. Is there a reason for this replacement? We've been using LOG through out the complete Z2 core..we should remain consistent in some way. Andreas
Andreas Jung wrote:
--On 25. Juni 2006 16:32:04 +0200 "Stefan H. Holek" <stefan@epy.co.at> wrote:
This, BTW, breaks CMF 1.5 on Zope 2.9. Not sure I/you should care though ;-)
Traceback (most recent call last): File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFActionIcons/__init__.py", line 19, in ? from Products.CMFCore.DirectoryView import registerDirectory File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/__init__.py", line 21, in ? import MembershipTool, WorkflowTool, CatalogTool, DiscussionTool File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/CatalogTool.py", line 23, in ? from Products.ZCatalog.ZCatalog import LOG ImportError: cannot import name LOG
Tres,
you replace all 'LOG' vars with 'logger'. Is there a reason for this replacement? We've been using LOG through out the complete Z2 core..we should remain consistent in some way.
Certainly not the whole core, Zope 2.10 has many many uses of logger. Including the ones in Zope 3, and ZODB, which *are* part of Zope 2.10. Florent -- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andreas Jung wrote:
--On 25. Juni 2006 16:32:04 +0200 "Stefan H. Holek" <stefan@epy.co.at> wrote:
This, BTW, breaks CMF 1.5 on Zope 2.9. Not sure I/you should care though ;-)
Traceback (most recent call last): File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFActionIcons/__init__.py", line 19, in ? from Products.CMFCore.DirectoryView import registerDirectory File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/__init__.py", line 21, in ? import MembershipTool, WorkflowTool, CatalogTool, DiscussionTool File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/CatalogTool.py", line 23, in ? from Products.ZCatalog.ZCatalog import LOG ImportError: cannot import name LOG
Tres,
you replace all 'LOG' vars with 'logger'. Is there a reason for this replacement? We've been using LOG through out the complete Z2 core..we should remain consistent in some way.
Hmm, the API of the logger objects is not consisistent with the old log objects. I don't know why CMF is importing that name from the catalog, but I guess we need to leave it there for BBB. Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEoAR1+gerLs4ltQ4RApUIAKCBNda8NW538LZzWWijpQgJOT0FOACgiA9y jxcAyITHNUylCcf74k7kPSE= =stG6 -----END PGP SIGNATURE-----
On Mon, 26 Jun 2006 12:59:49 -0400, Tres Seaver wrote:
Andreas Jung wrote:
--On 25. Juni 2006 16:32:04 +0200 "Stefan H. Holek" <stefan@epy.co.at> wrote:
This, BTW, breaks CMF 1.5 on Zope 2.9. Not sure I/you should care though ;-)
Traceback (most recent call last): File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFActionIcons/__init__.py", line 19, in ? from Products.CMFCore.DirectoryView import registerDirectory File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/__init__.py", line 21, in ? import MembershipTool, WorkflowTool, CatalogTool, DiscussionTool File "/home/stefan/autotest/temp/python24-zope29-cmf15/Products/ CMFCore/CatalogTool.py", line 23, in ? from Products.ZCatalog.ZCatalog import LOG ImportError: cannot import name LOG
Tres,
you replace all 'LOG' vars with 'logger'. Is there a reason for this replacement? We've been using LOG through out the complete Z2 core..we should remain consistent in some way.
Hmm, the API of the logger objects is not consisistent with the old log objects. I don't know why CMF is importing that name from the catalog, but I guess we need to leave it there for BBB.
as it turns out, ZCatalog originally had "from zLOG import LOG" on line 37 but then redefined in a "LOG = logging.getLogger('Zope.ZCatalog')" statement on line 47; when other products import from ZCatalog it was the second one they were getting, not the first. i changed tres's BBB fix to reflect the actual (if strange) former behaviour. -r
participants (5)
-
Andreas Jung -
Florent Guillaume -
Rob Miller -
Stefan H. Holek -
Tres Seaver