ZOPE2.8からZOPE2.9へ
ZOPE2.8から2.9への移行
./zopectl startから次のようなメッセージが表示されるようになりました。
/opt/zope2.9.0/lib/python/App/ImageFile.py:21: DeprecationWarning:
Using OFS.content_types is deprecated (will be removed in Zope 2.11).
Instead use zope.app.contenttypes.
from OFS.content_types import guess_content_type
そこでメッセージに従い次のように修正しました。
修正ファイル /opt/zope2.9.0/lib/python/App/ImageFile.py
#from OFS.content_types import guess_content_type
from zope.app.content_types import guess_content_type
すると次のメッセージが表示されるようになりました。
/opt/zope2.9.0/lib/python/webdav/NullResource.py:20: DeprecationWarning:
Using OFS.content_types is deprecated (will be removed in Zope 2.11).
Instead use zope.app.contenttypes.
import Acquisition, OFS.content_types
はいはい。修正しましょう。
修正 /opt/zope2.9.0/lib/python/webdav/NullResource.py
#import Acquisition, OFS.content_types
import Acquisition, zope.app.content_types
これに伴い昔利用できていたコンテンツが使えなくなりました。
そこで次のように修正しました。元ねた
+#from OFS.content_types import find_binary # under zope 2.8
+from zope.app.content_types import find_binary # above zope 2.9
対象となるプロダクト
LocalFS
ファイル名:Products/LocalFS/LocalFS.py
修正箇所
#from OFS.content_types import find_binary
from zope.app.content_types import find_binary
COREBlogBaPlugin
こちらは、Python2.4にて撤廃されたrotorモジュールを使用していたためBrokenメッセージ。残骸を処理
from rotor import newrotor
#from rotor import newrotor


