avoid deprecation warnings, fix doctests

This commit is contained in:
Helmut Merz 2020-03-07 13:44:10 +01:00
parent f2eae818db
commit 51be7dbcbb
4 changed files with 10 additions and 19 deletions

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2005 Helmut Merz helmutm@cy55.de
# Copyright (c) 2020 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -18,12 +18,10 @@
"""
interface definitions for the Relations utility and relation objects.
$Id$
"""
from zope.interface import Interface, Attribute
from zope.component.interfaces import IObjectEvent
from zope.interface.interfaces import IObjectEvent
# relation interfaces

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
# Copyright (c) 2020 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -24,10 +24,7 @@ from persistent.interfaces import IPersistent
from persistent.mapping import PersistentMapping
from zope import component
from zope.component import adapts
try:
from zope.component.interfaces import ObjectEvent
except ImportError: # Zope 2.9
from zope.app.event.objectevent import ObjectEvent
from zope.interface.interfaces import ObjectEvent
from zope.event import notify
from zope.interface import implements

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
# Copyright (c) 2020 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -20,10 +20,7 @@
Interfaces for the `stateful` package.
"""
try:
from zope.component.interfaces import IObjectEvent
except ImportError: # Zope 2.9
from zope.app.event.interfaces import IObjectEvent
from zope.interface.interfaces import IObjectEvent
from zope.interface import Interface, Attribute

View file

@ -2,7 +2,6 @@
Indexed Collections for Various Purposes
========================================
$Id$
Multikey Dictionaries
=====================
@ -66,9 +65,9 @@ Index entries that are present in the stored dictionary must always match:
If you don't know any more what entries we had added to the registry just
query its items() method:
>>> registry.items()
((('edit.html', 'topic', 'zope3', 'Custom'), 'very special edit.html'),
(('edit.html', None, None, 'Custom'), 'edit.html for Custom skin'),
>>> sorted(registry.items())
[(('edit.html', None, None, 'Custom'), 'edit.html for Custom skin'),
(('edit.html', 'topic', 'zope3', 'Custom'), 'very special edit.html'),
(('index.html', None, None, None), 'global index.html'),
(('index.html', None, None, 'Custom'), 'Global index.html for Custom skin'),
(('index.html', 'topic', None, None), 'index.html for type "topic"'))
(('index.html', 'topic', None, None), 'index.html for type "topic"')]