-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2025-01-20T21:28:49+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.locking@0b051b1 Fix DeprecationWarnings. Files changed: A news/4090.bugfix M plone/locking/lockable.py Repository: plone.locking Branch: refs/heads/master Date: 2025-01-21T17:57:38-08:00 Author: David Glick (davisagli) <david@glicksoftware.com> Commit: plone/plone.locking@b30ad2b Merge pull request #43 from plone/maurits-warnings Fix DeprecationWarnings. Files changed: A news/4090.bugfix M plone/locking/lockable.py
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
Repository: plone.formwidget.namedfile | ||
Repository: plone.locking | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2025-01-20T21:24:16+01:00 | ||
Date: 2025-01-20T21:28:49+01:00 | ||
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> | ||
Commit: https://github.com/plone/plone.formwidget.namedfile/commit/56e1fb3b5c972888b462260a3dbc571e22fc686d | ||
Commit: https://github.com/plone/plone.locking/commit/0b051b10dede7af4bda40d22d2904f79090de6f0 | ||
|
||
Fix DeprecationWarnings. | ||
|
||
Files changed: | ||
A news/4090.bugfix | ||
M plone/formwidget/namedfile/widget.py | ||
M plone/locking/lockable.py | ||
|
||
b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/formwidget/namedfile/widget.py b/plone/formwidget/namedfile/widget.py\nindex a752fcf..3bb1c3d 100644\n--- a/plone/formwidget/namedfile/widget.py\n+++ b/plone/formwidget/namedfile/widget.py\n@@ -2,7 +2,7 @@\n from Acquisition import Explicit\n from datetime import datetime\n from os import SEEK_END\n-from persistent.dict import PersistentDict\n+from persistent.mapping import PersistentMapping\n from plone.formwidget.namedfile import utils\n from plone.formwidget.namedfile.converter import b64decode_file\n from plone.formwidget.namedfile.interfaces import IFileUploadTemporaryStorage\n@@ -58,7 +58,7 @@ def _make_namedfile(value, field, widget):\n string_types = (bytes, str)\n if isinstance(value, string_types) and IBytes.providedBy(field):\n filename, data = b64decode_file(value)\n- elif isinstance(value, dict) or isinstance(value, PersistentDict):\n+ elif isinstance(value, dict) or isinstance(value, PersistentMapping):\n filename = value["filename"]\n data = value["data"]\n \n@@ -130,7 +130,7 @@ def file_upload_id(self):\n upload_id = uuid.uuid4().hex\n up = IFileUploadTemporaryStorage(getSite())\n up.cleanup()\n- up.upload_map[upload_id] = PersistentDict(\n+ up.upload_map[upload_id] = PersistentMapping(\n filename=self.value.filename,\n data=data,\n dt=datetime.now(),\n' | ||
b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/locking/lockable.py b/plone/locking/lockable.py\nindex e68b01d..b5c61f8 100644\n--- a/plone/locking/lockable.py\n+++ b/plone/locking/lockable.py\n@@ -1,5 +1,5 @@\n from AccessControl import getSecurityManager\n-from persistent.dict import PersistentDict\n+from persistent.mapping import PersistentMapping\n from zope.annotation.interfaces import IAnnotations\n from zope.component import adapter\n from zope.component import getUtility\n@@ -169,7 +169,7 @@ def _locks(self, create=True):\n annotations = IAnnotations(self.context)\n locks = annotations.get(ANNOTATION_KEY, None)\n if locks is None and create:\n- locks = annotations.setdefault(ANNOTATION_KEY, PersistentDict())\n+ locks = annotations.setdefault(ANNOTATION_KEY, PersistentMapping())\n \n try:\n safeWrite(annotations.obj.__annotations__)\n' | ||
|
||
Repository: plone.formwidget.namedfile | ||
Repository: plone.locking | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2025-01-21T17:57:12-08:00 | ||
Date: 2025-01-21T17:57:38-08:00 | ||
Author: David Glick (davisagli) <david@glicksoftware.com> | ||
Commit: https://github.com/plone/plone.formwidget.namedfile/commit/213a7046ad4d2e23d54c966603e0a91ddb9482b6 | ||
Commit: https://github.com/plone/plone.locking/commit/b30ad2b414a74657d83e85be012a5b0782a4baaa | ||
|
||
Merge pull request #77 from plone/maurits-warnings | ||
Merge pull request #43 from plone/maurits-warnings | ||
|
||
Fix DeprecationWarnings. | ||
|
||
Files changed: | ||
A news/4090.bugfix | ||
M plone/formwidget/namedfile/widget.py | ||
M plone/locking/lockable.py | ||
|
||
b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/formwidget/namedfile/widget.py b/plone/formwidget/namedfile/widget.py\nindex a752fcf..3bb1c3d 100644\n--- a/plone/formwidget/namedfile/widget.py\n+++ b/plone/formwidget/namedfile/widget.py\n@@ -2,7 +2,7 @@\n from Acquisition import Explicit\n from datetime import datetime\n from os import SEEK_END\n-from persistent.dict import PersistentDict\n+from persistent.mapping import PersistentMapping\n from plone.formwidget.namedfile import utils\n from plone.formwidget.namedfile.converter import b64decode_file\n from plone.formwidget.namedfile.interfaces import IFileUploadTemporaryStorage\n@@ -58,7 +58,7 @@ def _make_namedfile(value, field, widget):\n string_types = (bytes, str)\n if isinstance(value, string_types) and IBytes.providedBy(field):\n filename, data = b64decode_file(value)\n- elif isinstance(value, dict) or isinstance(value, PersistentDict):\n+ elif isinstance(value, dict) or isinstance(value, PersistentMapping):\n filename = value["filename"]\n data = value["data"]\n \n@@ -130,7 +130,7 @@ def file_upload_id(self):\n upload_id = uuid.uuid4().hex\n up = IFileUploadTemporaryStorage(getSite())\n up.cleanup()\n- up.upload_map[upload_id] = PersistentDict(\n+ up.upload_map[upload_id] = PersistentMapping(\n filename=self.value.filename,\n data=data,\n dt=datetime.now(),\n' | ||
b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/locking/lockable.py b/plone/locking/lockable.py\nindex e68b01d..b5c61f8 100644\n--- a/plone/locking/lockable.py\n+++ b/plone/locking/lockable.py\n@@ -1,5 +1,5 @@\n from AccessControl import getSecurityManager\n-from persistent.dict import PersistentDict\n+from persistent.mapping import PersistentMapping\n from zope.annotation.interfaces import IAnnotations\n from zope.component import adapter\n from zope.component import getUtility\n@@ -169,7 +169,7 @@ def _locks(self, create=True):\n annotations = IAnnotations(self.context)\n locks = annotations.get(ANNOTATION_KEY, None)\n if locks is None and create:\n- locks = annotations.setdefault(ANNOTATION_KEY, PersistentDict())\n+ locks = annotations.setdefault(ANNOTATION_KEY, PersistentMapping())\n \n try:\n safeWrite(annotations.obj.__annotations__)\n' | ||
|