Skip to content

Commit

Permalink
[fc] Repository: Plone
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2022-02-23T20:33:33+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Plone@50a1ef7

Depend on plone.volto.

Files changed:
M CHANGES.rst
M setup.cfg
Repository: Plone

Branch: refs/heads/master
Date: 2022-02-24T17:50:55+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Plone@89f0596

Merge pull request #20 from plone/depend-plone-volto

Depend on plone.volto in Plone 6

Files changed:
M CHANGES.rst
M setup.cfg
  • Loading branch information
mauritsvanrees committed Feb 24, 2022
1 parent 9955a76 commit 769e010
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
Repository: Products.CMFPlone
Repository: Plone


Branch: refs/heads/master
Date: 2022-02-23T15:26:32+01:00
Author: Benoit Suttor (bsuttor) <benoit.suttor@imio.be>
Commit: https://github.com/plone/Products.CMFPlone/commit/732b76cdced9eb230f125c23e3fe7e3365d14fef

Use warnings instead of "except pass"
Date: 2022-02-23T20:33:33+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Plone/commit/50a1ef76ca3e1df7c4b1d1e03d2257443d04a3c0

This was discussed on issue #3442
Depend on plone.volto.

Files changed:
M Products/CMFPlone/controlpanel/browser/overview.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py
M setup.py
M CHANGES.rst
M setup.cfg

b'diff --git a/Products/CMFPlone/controlpanel/browser/overview.py b/Products/CMFPlone/controlpanel/browser/overview.py\nindex 685ca272bf..47657ded96 100644\n--- a/Products/CMFPlone/controlpanel/browser/overview.py\n+++ b/Products/CMFPlone/controlpanel/browser/overview.py\n@@ -12,6 +12,7 @@\n from ZPublisher.HTTPRequest import WSGIRequest\n \n import pkg_resources\n+import warnings\n \n try:\n import plone.app.event\n@@ -62,11 +63,11 @@ def server_info(self):\n try:\n server = pkg_resources.get_distribution(server_name)\n server_version = server.version\n- except (\n- pkg_resources.DistributionNotFound,\n- pkg_resources.RequirementParseError,\n- ):\n- pass\n+ except Exception:\n+ warnings.warn(\n+ "Cannot find or parse version for %r"\n+ % self.request.get("SERVER_SOFTWARE"),\n+ )\n return {\n "wsgi": wsgi,\n "server_name": server_name,\ndiff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py\nindex 090cbabb94..974d6c3828 100644\n--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py\n+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py\n@@ -71,3 +71,7 @@ def test_gunicorn_server_name(self):\n self.request["SERVER_SOFTWARE"] = "gunicorn/19.6.0"\n view = self.portal.restrictedTraverse("@@overview-controlpanel")\n self.assertEqual(view.server_info()["server_name"], "gunicorn")\n+ self.request["SERVER_SOFTWARE"] = "bad-gunicorn-name/19.6.0"\n+ view = self.portal.restrictedTraverse("@@overview-controlpanel")\n+ with self.assertWarns(Warning):\n+ view.server_info()["server_name"]\ndiff --git a/setup.py b/setup.py\nindex fa9fec7413..30d7353b8b 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -140,6 +140,7 @@\n \'plone.app.testing\',\n \'zope.globalrequest\',\n \'zope.testing\',\n+ \'gunicorn\',\n ]\n },\n )\n'
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 59010f78..f787f6d4 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Depend on ``plone.volto``.\n+ [maurits]\n \n \n 6.0.0a3 (2022-01-28)\ndiff --git a/setup.cfg b/setup.cfg\nindex 5457d354..d65e8887 100644\n--- a/setup.cfg\n+++ b/setup.cfg\n@@ -30,10 +30,11 @@ zip_safe = False\n packages =\n install_requires =\n setuptools>=36.2\n- plone.restapi\n plone.app.caching\n plone.app.iterate\n plone.app.upgrade\n+ plone.restapi\n+ plone.volto\n Products.CMFPlacefulWorkflow\n Products.CMFPlone\n \n'

Repository: Products.CMFPlone
Repository: Plone


Branch: refs/heads/master
Date: 2022-02-23T22:01:01+01:00
Date: 2022-02-24T17:50:55+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/f64f3d105073b47c4d185323cdda9c7738e36d31
Commit: https://github.com/plone/Plone/commit/89f05968f415555822d552b8cbe283aed9bd5d56

Merge pull request #3444 from plone/bsuttor/3442-end
Merge pull request #20 from plone/depend-plone-volto

Use warnings instead of "except pass"
Depend on plone.volto in Plone 6

Files changed:
M Products/CMFPlone/controlpanel/browser/overview.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py
M setup.py
M CHANGES.rst
M setup.cfg

b'diff --git a/Products/CMFPlone/controlpanel/browser/overview.py b/Products/CMFPlone/controlpanel/browser/overview.py\nindex 685ca272bf..47657ded96 100644\n--- a/Products/CMFPlone/controlpanel/browser/overview.py\n+++ b/Products/CMFPlone/controlpanel/browser/overview.py\n@@ -12,6 +12,7 @@\n from ZPublisher.HTTPRequest import WSGIRequest\n \n import pkg_resources\n+import warnings\n \n try:\n import plone.app.event\n@@ -62,11 +63,11 @@ def server_info(self):\n try:\n server = pkg_resources.get_distribution(server_name)\n server_version = server.version\n- except (\n- pkg_resources.DistributionNotFound,\n- pkg_resources.RequirementParseError,\n- ):\n- pass\n+ except Exception:\n+ warnings.warn(\n+ "Cannot find or parse version for %r"\n+ % self.request.get("SERVER_SOFTWARE"),\n+ )\n return {\n "wsgi": wsgi,\n "server_name": server_name,\ndiff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py\nindex 090cbabb94..974d6c3828 100644\n--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py\n+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py\n@@ -71,3 +71,7 @@ def test_gunicorn_server_name(self):\n self.request["SERVER_SOFTWARE"] = "gunicorn/19.6.0"\n view = self.portal.restrictedTraverse("@@overview-controlpanel")\n self.assertEqual(view.server_info()["server_name"], "gunicorn")\n+ self.request["SERVER_SOFTWARE"] = "bad-gunicorn-name/19.6.0"\n+ view = self.portal.restrictedTraverse("@@overview-controlpanel")\n+ with self.assertWarns(Warning):\n+ view.server_info()["server_name"]\ndiff --git a/setup.py b/setup.py\nindex fa9fec7413..30d7353b8b 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -140,6 +140,7 @@\n \'plone.app.testing\',\n \'zope.globalrequest\',\n \'zope.testing\',\n+ \'gunicorn\',\n ]\n },\n )\n'
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 59010f78..f787f6d4 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Depend on ``plone.volto``.\n+ [maurits]\n \n \n 6.0.0a3 (2022-01-28)\ndiff --git a/setup.cfg b/setup.cfg\nindex 5457d354..d65e8887 100644\n--- a/setup.cfg\n+++ b/setup.cfg\n@@ -30,10 +30,11 @@ zip_safe = False\n packages =\n install_requires =\n setuptools>=36.2\n- plone.restapi\n plone.app.caching\n plone.app.iterate\n plone.app.upgrade\n+ plone.restapi\n+ plone.volto\n Products.CMFPlacefulWorkflow\n Products.CMFPlone\n \n'

0 comments on commit 769e010

Please sign in to comment.