Skip to content

Commit

Permalink
Fix DeprecationWarning: import IObjectAddedEvent from zope.lifecyclee…
Browse files Browse the repository at this point in the history
…vent.
  • Loading branch information
mauritsvanrees committed Nov 10, 2023
1 parent fa76ca4 commit a602bc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ Products.CMFUid Changelog
4.2 (unreleased)
----------------

- Fix ``DeprecationWarning``: import ``IObjectAddedEvent`` from ``zope.lifecycleevent``.


4.1 (2023-10-02)
----------------

- Modified the code of ``handleUidAnnotationEvent`` to check if both the
- Modified the code of ``handleUidAnnotationEvent`` to check if both the
annotation tool and the UID tool exist before using them. This change
ensures that the code won't run unless both tools are available.

Expand Down
2 changes: 1 addition & 1 deletion src/Products/CMFUid/UniqueIdAnnotationTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from OFS.SimpleItem import SimpleItem
from Persistence import Persistent
from zope.component import queryUtility
from zope.container.interfaces import IObjectAddedEvent
from zope.interface import implementer
from zope.lifecycleevent.interfaces import IObjectAddedEvent

from Products.CMFCore.utils import UniqueObject
from Products.CMFCore.utils import getToolByName
Expand Down

0 comments on commit a602bc5

Please sign in to comment.