Skip to content

Commit

Permalink
[fc] Repository: Products.CMFPlone
Browse files Browse the repository at this point in the history
Branch: refs/heads/6.0.x
Date: 2024-11-05T14:27:57-08:00
Author: Wesley Barroso Lopes (wesleybl) <[email protected]>
Commit: plone/Products.CMFPlone@c2b14e3

Avoid POSKeyError when commit occurs and we have savepoint that involves (#4043)

Plone Site

When ZODB handles savepoint and we have changes in Plone Site at that
savepoint, it changes the `_p_estimated_size` attribute of Plone Site.
This is an assignment to one of the special persistency attributes
(identified by an _p_ name prefix); it should happen without access to
any other attributes of obj. But obj._tree is accessed in __setattr__ of
PloneSite class and results in a ZODB load which apparently fails.

See: plone/plone.restapi#1823 (comment)

Files changed:
A news/4043.bugfix
M Products/CMFPlone/Portal.py
  • Loading branch information
davisagli committed Nov 5, 2024
1 parent 8718b85 commit 561eda8
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
Repository: plone.restapi
Repository: Products.CMFPlone


Branch: refs/heads/main
Date: 2024-11-05T14:07:54-08:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/plone.restapi/commit/8297ad9f103844509f2ef2e21b05edb3cbc88a56
Branch: refs/heads/6.0.x
Date: 2024-11-05T14:27:57-08:00
Author: Wesley Barroso Lopes (wesleybl) <wesleybl@gmail.com>
Commit: https://github.com/plone/Products.CMFPlone/commit/c2b14e3a00ac7389d67646f8ce00ec9b5fe60d36

Preparing release 9.8.4
Avoid POSKeyError when commit occurs and we have savepoint that involves (#4043)

Files changed:
M CHANGES.rst
M setup.py
D news/1837.bugfix

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 3e6cc99b82..252e57258f 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -8,6 +8,15 @@ Changelog\n \n .. towncrier release notes start\n \n+9.8.4 (2024-11-05)\n+------------------\n+\n+Bug fixes:\n+\n+\n+- URL Management control panel: Fix error handling in CSV upload. @davisagli (#1837)\n+\n+\n 9.8.3 (2024-11-01)\n ------------------\n \ndiff --git a/news/1837.bugfix b/news/1837.bugfix\ndeleted file mode 100644\nindex 08502b6c36..0000000000\n--- a/news/1837.bugfix\n+++ /dev/null\n@@ -1 +0,0 @@\n-URL Management control panel: Fix error handling in CSV upload. @davisagli\ndiff --git a/setup.py b/setup.py\nindex dc007c4c1f..2cf2760837 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -4,7 +4,7 @@\n import sys\n \n \n-version = "9.8.4.dev0"\n+version = "9.8.4"\n \n if sys.version_info.major == 2:\n raise ValueError(\n'

Repository: plone.restapi


Branch: refs/heads/main
Date: 2024-11-05T14:09:56-08:00
Author: David Glick (davisagli) <[email protected]>
Commit: https://github.com/plone/plone.restapi/commit/9f0feffad288f18e5fa3d3f63094614971d1d164

Back to development: 9.8.5
Plone Site

When ZODB handles savepoint and we have changes in Plone Site at that
savepoint, it changes the `_p_estimated_size` attribute of Plone Site.
This is an assignment to one of the special persistency attributes
(identified by an _p_ name prefix); it should happen without access to
any other attributes of obj. But obj._tree is accessed in __setattr__ of
PloneSite class and results in a ZODB load which apparently fails.

See: https://github.com/plone/plone.restapi/pull/1823#issuecomment-2402855105

Files changed:
M setup.py
A news/4043.bugfix
M Products/CMFPlone/Portal.py

b'diff --git a/setup.py b/setup.py\nindex 2cf276083..69b2ff718 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -4,7 +4,7 @@\n import sys\n \n \n-version = "9.8.4"\n+version = "9.8.5.dev0"\n \n if sys.version_info.major == 2:\n raise ValueError(\n'
b'diff --git a/Products/CMFPlone/Portal.py b/Products/CMFPlone/Portal.py\nindex 5c26d62edf..21fca93eed 100644\n--- a/Products/CMFPlone/Portal.py\n+++ b/Products/CMFPlone/Portal.py\n@@ -65,7 +65,7 @@ def __getattr__(self, name):\n \n def __setattr__(self, name, obj):\n # handle re setting an item as an attribute\n- if self._tree is not None and name in self:\n+ if not name.startswith("_") and self._tree is not None and name in self:\n del self[name]\n self[name] = obj\n else:\ndiff --git a/news/4043.bugfix b/news/4043.bugfix\nnew file mode 100644\nindex 0000000000..a51ab29b2e\n--- /dev/null\n+++ b/news/4043.bugfix\n@@ -0,0 +1 @@\n+Avoid POSKeyError when commit occurs and we have savepoint that involves Plone Site. @wesleybl\n'

0 comments on commit 561eda8

Please sign in to comment.