From 8e345c7f36b7cc2e1165aadf5af4da6c35619747 Mon Sep 17 00:00:00 2001 From: Wolfgang Schnerring Date: Thu, 5 Dec 2024 08:34:57 +0100 Subject: [PATCH] Update to current persistent API (#14) --- CHANGES.rst | 2 +- src/zope/principalannotation/utility.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 6f7076b..c5f0fd3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ 5.1 (unreleased) ================ -- Nothing changed yet. +- Update to ``persistent`` 6.0 API usage 5.0 (2023-06-29) diff --git a/src/zope/principalannotation/utility.py b/src/zope/principalannotation/utility.py index a9bfbdb..93670cf 100644 --- a/src/zope/principalannotation/utility.py +++ b/src/zope/principalannotation/utility.py @@ -16,7 +16,7 @@ __docformat__ = 'restructuredtext' from BTrees.OOBTree import OOBTree from persistent import Persistent -from persistent.dict import PersistentDict +from persistent.mapping import PersistentMapping from zope.annotation.interfaces import IAnnotations from zope.component import queryNextUtility from zope.location import Location @@ -81,7 +81,7 @@ class Annotations(Persistent, Location): def __init__(self, principalId, store=None): self.principalId = principalId - self.data = PersistentDict() # We don't really expect that many + self.data = PersistentMapping() # We don't really expect that many # _v_store is used to remember a mapping object that we should # be saved in if we ever change