From 8c2d4af0b9472ca48e85fc7faa4fee7eb05c8f3e Mon Sep 17 00:00:00 2001 From: sunew Date: Fri, 14 Sep 2018 10:04:55 +0200 Subject: [PATCH] [fc] Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-09-09T11:56:19+02:00 Author: Peter Holzer (agitator) Commit: https://github.com/plone/plone.app.upgrade/commit/31dba25f4dc9ca0accf474fa828ba3773f115a6a Update resources for plone.app.event changelog Files changed: A plone/app/upgrade/v51/profiles/to_513/registry.xml M CHANGES.rst M plone/app/upgrade/v51/configure.zcml M plone/app/upgrade/v51/final.py M plone/app/upgrade/v51/profiles.zcml Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-09-13T12:08:01+02:00 Author: Sune Broendum Woeller (sunew) Commit: https://github.com/plone/plone.app.upgrade/commit/8d0289686dbe54e08c74919240f3f84ebf18ea70 Dont fail if resource is already removed Files changed: M plone/app/upgrade/v51/final.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-09-13T21:38:17+02:00 Author: Sune Broendum Woeller (sunew) Commit: https://github.com/plone/plone.app.upgrade/commit/c10780ef301016bde82bfba24f74ea6503de58d1 install plone.resource on upgrade, we need the portal_resources folder Files changed: M plone/app/upgrade/v50/alphas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-09-14T10:04:55+02:00 Author: Sune Broendum Woeller (sunew) Commit: https://github.com/plone/plone.app.upgrade/commit/425e049511a939db61d3262e60e5526e845c0018 Merge pull request #166 from 'p-a-event-to-513' Files changed: A plone/app/upgrade/v51/profiles/to_513/registry.xml M CHANGES.rst M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v51/configure.zcml M plone/app/upgrade/v51/final.py M plone/app/upgrade/v51/profiles.zcml --- last_commit.txt | 112 ++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 76 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 58fd51864a..8b86ee8440 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,111 +1,71 @@ -Repository: plone.api +Repository: plone.app.upgrade Branch: refs/heads/master -Date: 2018-09-06T09:18:52+02:00 -Author: Gauthier Bastien (gbastien) -Commit: https://github.com/plone/plone.api/commit/2fa3b01a43a56c4dfa57ce8d4488a5abc6430d90 +Date: 2018-09-09T11:56:19+02:00 +Author: Peter Holzer (agitator) +Commit: https://github.com/plone/plone.app.upgrade/commit/31dba25f4dc9ca0accf474fa828ba3773f115a6a -Fix falining AT Collection creation when using api.content.create. +Update resources for plone.app.event -Files changed: -M CHANGES.rst -M src/plone/api/content.py -M src/plone/api/tests/test_content.py - -b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 5c80d6b..d9243a4 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -21,6 +21,9 @@ Bug fixes:\n - fix typos in doc strings\n [tkimnguyen]\n \n+- Fix falining AT Collection creation when using api.content.create.\n+ [gbastien]\n+\n \n 1.8.4 (2018-04-24)\n ------------------\ndiff --git a/src/plone/api/content.py b/src/plone/api/content.py\nindex a088554..5ec0605 100644\n--- a/src/plone/api/content.py\n+++ b/src/plone/api/content.py\n@@ -112,8 +112,8 @@ def create(\n # rename-after-creation and such\n # Passing values as a dict with None values so values set by\n # invokeFactory don\'t get overridden.\n- # None: None is required so that bool(values) is True.\n- content.processForm(values={None: None})\n+ # \'\': \'\' is required so that bool(values) is True.\n+ content.processForm(values={\'\': \'\'})\n \n if not id or (safe_id and id):\n # Create a new id from title\ndiff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py\nindex 18546ba..1033cf6 100644\n--- a/src/plone/api/tests/test_content.py\n+++ b/src/plone/api/tests/test_content.py\n@@ -376,6 +376,62 @@ def test_create_at_with_title_in_request(self):\n \n self.assertEqual(page.title, \'Test document\')\n \n+ @unittest.skipIf(HAS_PACONTENTYPES, \'Archetypes only\')\n+ def test_create_at_collection(self):\n+ """Test create at Collecition."""\n+ collection = api.content.create(\n+ container=self.portal,\n+ type=\'Collection\',\n+ title=\'Mandelbrot set\',\n+ description=\'Image gallery of a zoom sequence\',\n+ query=[{\n+ \'i\': \'Type\',\n+ \'o\': \'plone.app.querystring.operation.string.is\',\n+ \'v\': [\'Image\'],\n+ }],\n+ )\n+ self.assertEqual(collection.Title(), \'Mandelbrot set\')\n+\n+ @unittest.skipIf(HAS_PACONTENTYPES, \'Archetypes only\')\n+ def test_create_at_event(self):\n+ """https://github.com/plone/plone.api/issues/364"""\n+ from DateTime import DateTime\n+ today = DateTime()\n+ tomorrow = today + 1\n+ event = api.content.create(\n+ container=self.portal,\n+ type=\'Event\',\n+ title=u\'My event\',\n+ startDate=today,\n+ endDate=tomorrow,\n+ )\n+ self.assertEqual(event.startDate, today)\n+ self.assertEqual(event.endDate, tomorrow)\n+ results = api.content.find(Title=u\'My event\')\n+ self.assertEqual(len(results), 1)\n+ self.assertEqual(results[0].start, today)\n+ self.assertEqual(results[0].end, tomorrow)\n+\n+ @unittest.skipUnless(HAS_PACONTENTYPES, \'Dexterity only\')\n+ def test_create_dx_event(self):\n+ """https://github.com/plone/plone.app.contenttypes/issues/465"""\n+ import datetime\n+ today = datetime.datetime.now()\n+ tomorrow = today + datetime.timedelta(days=1)\n+ event = api.content.create(\n+ container=self.portal,\n+ type=\'Event\',\n+ title=u\'My event\',\n+ start=today,\n+ end=tomorrow,\n+ )\n+ self.assertEqual(event.start, today)\n+ self.assertEqual(event.end, tomorrow)\n+ results = api.content.find(Title=u\'My event\')\n+ self.assertEqual(len(results), 1)\n+ self.assertEqual(results[0].start, today)\n+ self.assertEqual(results[0].end, tomorrow)\n+\n def test_get_constraints(self):\n """Test the constraints when content is fetched with get."""\n \n' - -Repository: plone.api - - -Branch: refs/heads/master -Date: 2018-09-06T09:44:06+02:00 -Author: Gauthier Bastien (gbastien) -Commit: https://github.com/plone/plone.api/commit/ddeeac3bd1ebbbc75b4e397ed699fbe472df4b51 - -Fix flake8 - -Files changed: -M src/plone/api/tests/test_content.py - -b"diff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py\nindex 1033cf6..f08285a 100644\n--- a/src/plone/api/tests/test_content.py\n+++ b/src/plone/api/tests/test_content.py\n@@ -384,11 +384,13 @@ def test_create_at_collection(self):\n type='Collection',\n title='Mandelbrot set',\n description='Image gallery of a zoom sequence',\n- query=[{\n- 'i': 'Type',\n- 'o': 'plone.app.querystring.operation.string.is',\n- 'v': ['Image'],\n- }],\n+ query=[\n+ {\n+ 'i': 'Type',\n+ 'o': 'plone.app.querystring.operation.string.is',\n+ 'v': ['Image'],\n+ },\n+ ],\n )\n self.assertEqual(collection.Title(), 'Mandelbrot set')\n \n" - -Repository: plone.api - - -Branch: refs/heads/master -Date: 2018-09-06T14:38:42+02:00 -Author: Gauthier Bastien (gbastien) -Commit: https://github.com/plone/plone.api/commit/81fef76ad55f02c3e374d1d68efd9d5657149a80 - -Typo +changelog Files changed: +A plone/app/upgrade/v51/profiles/to_513/registry.xml M CHANGES.rst +M plone/app/upgrade/v51/configure.zcml +M plone/app/upgrade/v51/final.py +M plone/app/upgrade/v51/profiles.zcml -b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex d9243a4..7d26905 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -21,7 +21,7 @@ Bug fixes:\n - fix typos in doc strings\n [tkimnguyen]\n \n-- Fix falining AT Collection creation when using api.content.create.\n+- Fix failing AT Collection creation when using api.content.create.\n [gbastien]\n \n \n' - -Repository: plone.api - - -Branch: refs/heads/master -Date: 2018-09-06T14:38:55+02:00 -Author: Gauthier Bastien (gbastien) -Commit: https://github.com/plone/plone.api/commit/31119fe0fdc9977b9a4dc261471bf159589b38d1 - -Run test create Collection in both AT and DX env - -Files changed: -M src/plone/api/tests/test_content.py - -b'diff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py\nindex f08285a..8a07768 100644\n--- a/src/plone/api/tests/test_content.py\n+++ b/src/plone/api/tests/test_content.py\n@@ -376,9 +376,8 @@ def test_create_at_with_title_in_request(self):\n \n self.assertEqual(page.title, \'Test document\')\n \n- @unittest.skipIf(HAS_PACONTENTYPES, \'Archetypes only\')\n- def test_create_at_collection(self):\n- """Test create at Collecition."""\n+ def test_create_collection(self):\n+ """Test create a Collection."""\n collection = api.content.create(\n container=self.portal,\n type=\'Collection\',\n' +b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 45c9b7e6..dfc7248c 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -20,6 +20,8 @@ Bug fixes:\n \n - *add item here*\n \n+- Update resources for plone.app.event. [agitator]\n+\n \n 2.0.15 (2018-06-21)\n -------------------\ndiff --git a/plone/app/upgrade/v51/configure.zcml b/plone/app/upgrade/v51/configure.zcml\nindex 113678a9..ad19471b 100644\n--- a/plone/app/upgrade/v51/configure.zcml\n+++ b/plone/app/upgrade/v51/configure.zcml\n@@ -243,12 +243,18 @@ Add image scaling options to image handling control panel.\n destination="5113"\n profile="Products.CMFPlone:plone">\n \n+ \n+\n \n \n+\n \n \n \n \n+ \n+\n \n+\n+\n+ \n+ \n+ \n+ \n+ \n+\n+ \n+ \n+ ++plone++plone.app.event/event.js\n+ \n+\n+ \n+ \n+ plone-app-event\n+ \n+ \n+ \n+\n+\n' -Repository: plone.api +Repository: plone.app.upgrade Branch: refs/heads/master -Date: 2018-09-06T20:56:53+02:00 -Author: Gauthier Bastien (gbastien) -Commit: https://github.com/plone/plone.api/commit/bac3db8816e5b419d6ca5015f34890792d76f927 +Date: 2018-09-13T12:08:01+02:00 +Author: Sune Broendum Woeller (sunew) +Commit: https://github.com/plone/plone.app.upgrade/commit/8d0289686dbe54e08c74919240f3f84ebf18ea70 -Removed reference to https://github.com/plone/plone.app.contenttypes/issues/465 +Dont fail if resource is already removed Files changed: -M src/plone/api/tests/test_content.py +M plone/app/upgrade/v51/final.py -b'diff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py\nindex 8a07768..98a918f 100644\n--- a/src/plone/api/tests/test_content.py\n+++ b/src/plone/api/tests/test_content.py\n@@ -415,7 +415,7 @@ def test_create_at_event(self):\n \n @unittest.skipUnless(HAS_PACONTENTYPES, \'Dexterity only\')\n def test_create_dx_event(self):\n- """https://github.com/plone/plone.app.contenttypes/issues/465"""\n+ """ """\n import datetime\n today = datetime.datetime.now()\n tomorrow = today + datetime.timedelta(days=1)\n' +b'diff --git a/plone/app/upgrade/v51/final.py b/plone/app/upgrade/v51/final.py\nindex 0218a3b5..1866708a 100644\n--- a/plone/app/upgrade/v51/final.py\n+++ b/plone/app/upgrade/v51/final.py\n@@ -57,6 +57,8 @@ def remove_highlightsearchterms(context):\n def remove_old_PAE_rescources(context): # noqa\n """FORCE remove old p.a.event resources"""\n registry = getUtility(IRegistry)\n- plone_legacy = registry.records[\'plone.bundles/plone-legacy.resources\']\n- plone_legacy.value.remove(\'resource-plone-app-event-event-js\')\n- plone_legacy.value.remove(\'resource-plone-app-event-event-css\')\n+ resources = registry.records[\'plone.bundles/plone-legacy.resources\']\n+ if u\'resource-plone-app-event-event-js\' in resources.value:\n+ resources.value.remove(\'resource-plone-app-event-event-js\')\n+ if u\'resource-plone-app-event-event-css\' in resources.value:\n+ resources.value.remove(\'resource-plone-app-event-event-css\')\n' -Repository: plone.api +Repository: plone.app.upgrade Branch: refs/heads/master -Date: 2018-09-06T22:24:11+02:00 -Author: Gauthier Bastien (gbastien) -Commit: https://github.com/plone/plone.api/commit/d491d6a6861bceda5b20ad0db71906c48d91465f +Date: 2018-09-13T21:38:17+02:00 +Author: Sune Broendum Woeller (sunew) +Commit: https://github.com/plone/plone.app.upgrade/commit/c10780ef301016bde82bfba24f74ea6503de58d1 -Completed docstring for test_create_dx_event +install plone.resource on upgrade, we need the portal_resources folder Files changed: -M src/plone/api/tests/test_content.py +M plone/app/upgrade/v50/alphas.py -b'diff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py\nindex 98a918f..84c69e6 100644\n--- a/src/plone/api/tests/test_content.py\n+++ b/src/plone/api/tests/test_content.py\n@@ -415,7 +415,7 @@ def test_create_at_event(self):\n \n @unittest.skipUnless(HAS_PACONTENTYPES, \'Dexterity only\')\n def test_create_dx_event(self):\n- """ """\n+ """Test create a DX event."""\n import datetime\n today = datetime.datetime.now()\n tomorrow = today + datetime.timedelta(days=1)\n' +b"diff --git a/plone/app/upgrade/v50/alphas.py b/plone/app/upgrade/v50/alphas.py\nindex 9ebc6d72..2b1a8de4 100644\n--- a/plone/app/upgrade/v50/alphas.py\n+++ b/plone/app/upgrade/v50/alphas.py\n@@ -74,6 +74,8 @@ def to50alpha1(context):\n qi = getToolByName(portal, 'portal_quickinstaller')\n else:\n qi = get_installer(portal)\n+ if not qi.isProductInstalled('plone.resource'):\n+ qi.installProduct('plone.resource')\n if not qi.isProductInstalled('plone.app.event'):\n qi.installProduct('plone.app.event')\n \n" -Repository: plone.api +Repository: plone.app.upgrade Branch: refs/heads/master -Date: 2018-09-14T09:15:25+02:00 -Author: Gil Forcada Codinachs (gforcada) -Commit: https://github.com/plone/plone.api/commit/3e38c4fc0c09b10eb80637175fe653f883ec803c - -Merge pull request #414 from plone/create_at_collection_fix +Date: 2018-09-14T10:04:55+02:00 +Author: Sune Broendum Woeller (sunew) +Commit: https://github.com/plone/plone.app.upgrade/commit/425e049511a939db61d3262e60e5526e845c0018 -Fix falining AT Collection creation when using api.content.create. +Merge pull request #166 from 'p-a-event-to-513' Files changed: +A plone/app/upgrade/v51/profiles/to_513/registry.xml M CHANGES.rst -M src/plone/api/content.py -M src/plone/api/tests/test_content.py +M plone/app/upgrade/v50/alphas.py +M plone/app/upgrade/v51/configure.zcml +M plone/app/upgrade/v51/final.py +M plone/app/upgrade/v51/profiles.zcml -b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 5c80d6b..7d26905 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -21,6 +21,9 @@ Bug fixes:\n - fix typos in doc strings\n [tkimnguyen]\n \n+- Fix failing AT Collection creation when using api.content.create.\n+ [gbastien]\n+\n \n 1.8.4 (2018-04-24)\n ------------------\ndiff --git a/src/plone/api/content.py b/src/plone/api/content.py\nindex a088554..5ec0605 100644\n--- a/src/plone/api/content.py\n+++ b/src/plone/api/content.py\n@@ -112,8 +112,8 @@ def create(\n # rename-after-creation and such\n # Passing values as a dict with None values so values set by\n # invokeFactory don\'t get overridden.\n- # None: None is required so that bool(values) is True.\n- content.processForm(values={None: None})\n+ # \'\': \'\' is required so that bool(values) is True.\n+ content.processForm(values={\'\': \'\'})\n \n if not id or (safe_id and id):\n # Create a new id from title\ndiff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py\nindex 18546ba..84c69e6 100644\n--- a/src/plone/api/tests/test_content.py\n+++ b/src/plone/api/tests/test_content.py\n@@ -376,6 +376,63 @@ def test_create_at_with_title_in_request(self):\n \n self.assertEqual(page.title, \'Test document\')\n \n+ def test_create_collection(self):\n+ """Test create a Collection."""\n+ collection = api.content.create(\n+ container=self.portal,\n+ type=\'Collection\',\n+ title=\'Mandelbrot set\',\n+ description=\'Image gallery of a zoom sequence\',\n+ query=[\n+ {\n+ \'i\': \'Type\',\n+ \'o\': \'plone.app.querystring.operation.string.is\',\n+ \'v\': [\'Image\'],\n+ },\n+ ],\n+ )\n+ self.assertEqual(collection.Title(), \'Mandelbrot set\')\n+\n+ @unittest.skipIf(HAS_PACONTENTYPES, \'Archetypes only\')\n+ def test_create_at_event(self):\n+ """https://github.com/plone/plone.api/issues/364"""\n+ from DateTime import DateTime\n+ today = DateTime()\n+ tomorrow = today + 1\n+ event = api.content.create(\n+ container=self.portal,\n+ type=\'Event\',\n+ title=u\'My event\',\n+ startDate=today,\n+ endDate=tomorrow,\n+ )\n+ self.assertEqual(event.startDate, today)\n+ self.assertEqual(event.endDate, tomorrow)\n+ results = api.content.find(Title=u\'My event\')\n+ self.assertEqual(len(results), 1)\n+ self.assertEqual(results[0].start, today)\n+ self.assertEqual(results[0].end, tomorrow)\n+\n+ @unittest.skipUnless(HAS_PACONTENTYPES, \'Dexterity only\')\n+ def test_create_dx_event(self):\n+ """Test create a DX event."""\n+ import datetime\n+ today = datetime.datetime.now()\n+ tomorrow = today + datetime.timedelta(days=1)\n+ event = api.content.create(\n+ container=self.portal,\n+ type=\'Event\',\n+ title=u\'My event\',\n+ start=today,\n+ end=tomorrow,\n+ )\n+ self.assertEqual(event.start, today)\n+ self.assertEqual(event.end, tomorrow)\n+ results = api.content.find(Title=u\'My event\')\n+ self.assertEqual(len(results), 1)\n+ self.assertEqual(results[0].start, today)\n+ self.assertEqual(results[0].end, tomorrow)\n+\n def test_get_constraints(self):\n """Test the constraints when content is fetched with get."""\n \n' +b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 45c9b7e6..dfc7248c 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -20,6 +20,8 @@ Bug fixes:\n \n - *add item here*\n \n+- Update resources for plone.app.event. [agitator]\n+\n \n 2.0.15 (2018-06-21)\n -------------------\ndiff --git a/plone/app/upgrade/v50/alphas.py b/plone/app/upgrade/v50/alphas.py\nindex 9ebc6d72..2b1a8de4 100644\n--- a/plone/app/upgrade/v50/alphas.py\n+++ b/plone/app/upgrade/v50/alphas.py\n@@ -74,6 +74,8 @@ def to50alpha1(context):\n qi = getToolByName(portal, \'portal_quickinstaller\')\n else:\n qi = get_installer(portal)\n+ if not qi.isProductInstalled(\'plone.resource\'):\n+ qi.installProduct(\'plone.resource\')\n if not qi.isProductInstalled(\'plone.app.event\'):\n qi.installProduct(\'plone.app.event\')\n \ndiff --git a/plone/app/upgrade/v51/configure.zcml b/plone/app/upgrade/v51/configure.zcml\nindex 113678a9..ad19471b 100644\n--- a/plone/app/upgrade/v51/configure.zcml\n+++ b/plone/app/upgrade/v51/configure.zcml\n@@ -243,12 +243,18 @@ Add image scaling options to image handling control panel.\n destination="5113"\n profile="Products.CMFPlone:plone">\n \n+ \n+\n \n \n+\n \n \n \n \n+ \n+\n \n+\n+\n+ \n+ \n+ \n+ \n+ \n+\n+ \n+ \n+ ++plone++plone.app.event/event.js\n+ \n+\n+ \n+ \n+ plone-app-event\n+ \n+ \n+ \n+\n+\n'