-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: plone.app.viewletmanager
Branch: refs/heads/master Date: 2023-10-08T13:26:54+02:00 Author: Johannes Raggam (thet) <[email protected]> Commit: plone/plone.app.viewletmanager@474b364 Fix docs on how to insert a viewlet before/after. Not even worth a changelog entry. Files changed: M plone/app/viewletmanager/exportimport/storage.py Repository: plone.app.viewletmanager Branch: refs/heads/master Date: 2023-10-08T15:13:48+02:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/plone.app.viewletmanager@52a8c83 Merge pull request #42 from plone/minordocfix Files changed: M plone/app/viewletmanager/exportimport/storage.py
- Loading branch information
Showing
1 changed file
with
14 additions
and
38 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,54 +1,30 @@ | ||
Repository: plone.app.event | ||
Repository: plone.app.viewletmanager | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2023-09-01T18:50:34+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.event/commit/ac473afa69a7c6504f389dab01154a72b5b77b73 | ||
Date: 2023-10-08T13:26:54+02:00 | ||
Author: Johannes Raggam (thet) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.viewletmanager/commit/474b364e561cc1d39fa3ce3ae8cb713f3dedd088 | ||
|
||
Fix test_long_event when run around midnight of the first day of the month. | ||
|
||
Fixes https://github.com/plone/plone.app.event/issues/334. | ||
|
||
Files changed: | ||
A news/334.tests | ||
M plone/app/event/tests/test_portlet_calendar.py | ||
|
||
b'diff --git a/news/334.tests b/news/334.tests\nnew file mode 100644\nindex 000000000..45ea1e5b2\n--- /dev/null\n+++ b/news/334.tests\n@@ -0,0 +1,3 @@\n+Fix test_long_event when run around midnight of the first day of the month.\n+Fixes `issue 334 <https://github.com/plone/plone.app.event/issues/334>`_.\n+[maurits]\ndiff --git a/plone/app/event/tests/test_portlet_calendar.py b/plone/app/event/tests/test_portlet_calendar.py\nindex a5a8ada17..8b96a1d3a 100644\n--- a/plone/app/event/tests/test_portlet_calendar.py\n+++ b/plone/app/event/tests/test_portlet_calendar.py\n@@ -181,9 +181,27 @@ def test_portlet_config(self):\n self.assertTrue("?mode=day&date=" in rd)\n \n def test_long_event(self):\n+ """Test a long event.\n+\n+ An event happening on three days, should have an indication on all\n+ three days. That is the main thing we test here.\n+\n+ But the test may fail on the first day of the month.\n+ See https://github.com/plone/plone.app.event/issues/334\n+ When generating the portlet on the first day of the month, it seems\n+ depending on time zones we might get the previous month. This would\n+ mean our event is not (fully) visible. So we force showing the\n+ calendar of the month that we want. This test is not about whether\n+ the correct month is shown at one minute past midnight.\n+\n+ Previously we created an event on the first day. But depending on\n+ the day of the week that the new month starts, this may also influence\n+ what is visible: we may see Friday 1st and Saturday 2nd, but not\n+ Sunday 3rd. So now we pick a day in the middle of the month.\n+ """\n tz = pytz.timezone(TZNAME)\n actual = tz.localize(datetime.now())\n- start = tz.localize(datetime(actual.year, actual.month, 1))\n+ start = tz.localize(datetime(actual.year, actual.month, 15))\n end = start + timedelta(days=2)\n \n e1 = createContentInContainer(\n@@ -191,6 +209,8 @@ def test_long_event(self):\n )\n self.portal.portal_workflow.doActionFor(e1, "publish")\n \n+ self.request["year"] = actual.year\n+ self.request["month"] = actual.month\n r = self.renderer(assignment=portlet_calendar.Assignment(state=("published",)))\n r.update()\n rd = r.render()\n' | ||
|
||
Repository: plone.app.event | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2023-10-05T11:21:59+02:00 | ||
Author: Jens W. Klein (jensens) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.event/commit/9ff0aa9f0cca3cacc7861111c0dd8cb6b9249eef | ||
|
||
Merge branch 'master' into maurits-test-long-event-master | ||
Fix docs on how to insert a viewlet before/after. Not even worth a changelog entry. | ||
|
||
Files changed: | ||
A news/172.internal | ||
M .pre-commit-config.yaml | ||
M pyproject.toml | ||
M tox.ini | ||
M plone/app/viewletmanager/exportimport/storage.py | ||
|
||
b'diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\nindex 0d259b7f..f6f04834 100644\n--- a/.pre-commit-config.yaml\n+++ b/.pre-commit-config.yaml\n@@ -7,7 +7,7 @@ ci:\n \n repos:\n - repo: https://github.com/asottile/pyupgrade\n- rev: v3.8.0\n+ rev: v3.10.1\n hooks:\n - id: pyupgrade\n args: [--py38-plus]\n@@ -16,7 +16,7 @@ repos:\n hooks:\n - id: isort\n - repo: https://github.com/psf/black\n- rev: 23.3.0\n+ rev: 23.7.0\n hooks:\n - id: black\n - repo: https://github.com/collective/zpretty\n@@ -32,7 +32,7 @@ repos:\n # """\n ##\n - repo: https://github.com/PyCQA/flake8\n- rev: 6.0.0\n+ rev: 6.1.0\n hooks:\n - id: flake8\n - repo: https://github.com/codespell-project/codespell\n@@ -63,7 +63,7 @@ repos:\n - id: check-python-versions\n args: [\'--only\', \'setup.py,pyproject.toml\']\n - repo: https://github.com/collective/i18ndude\n- rev: "6.0.0"\n+ rev: "6.1.0"\n hooks:\n - id: i18ndude\n \ndiff --git a/news/172.internal b/news/172.internal\nnew file mode 100644\nindex 00000000..6a54c549\n--- /dev/null\n+++ b/news/172.internal\n@@ -0,0 +1,5 @@\n+Require setuptools 68.2 or higher for building the package.\n+When built with setuptools 68.1, you could not import the package, at least not an editable package.\n+Note that you can still *install* this package with older setuptools versions.\n+See `Plone meta issue 172 <https://github.com/plone/meta/issues/172>`_ for details.\n+[maurits]\ndiff --git a/pyproject.toml b/pyproject.toml\nindex 4f15ca58..fd2ab3e2 100644\n--- a/pyproject.toml\n+++ b/pyproject.toml\n@@ -1,6 +1,9 @@\n # Generated from:\n # https://github.com/plone/meta/tree/master/config/default\n # See the inline comments on how to expand/tweak this configuration file\n+[build-system]\n+requires = ["setuptools>=68.2", "wheel"]\n+\n [tool.towncrier]\n directory = "news/"\n filename = "CHANGES.rst"\ndiff --git a/tox.ini b/tox.ini\nindex 60d323c7..3f82c641 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -58,7 +58,7 @@ deps =\n build\n z3c.dependencychecker==2.11\n commands =\n- python -m build --sdist --no-isolation\n+ python -m build --sdist\n dependencychecker\n \n [testenv:dependencies-graph]\n@@ -125,7 +125,7 @@ commands =\n # we build the change log as news entries might break\n # the README that is displayed on PyPI\n towncrier build --version=100.0.0 --yes\n- python -m build --sdist --no-isolation\n+ python -m build --sdist\n twine check dist/*\n \n [testenv:circular]\n' | ||
b'diff --git a/plone/app/viewletmanager/exportimport/storage.py b/plone/app/viewletmanager/exportimport/storage.py\nindex 2afbbd3..a094a21 100644\n--- a/plone/app/viewletmanager/exportimport/storage.py\n+++ b/plone/app/viewletmanager/exportimport/storage.py\n@@ -14,8 +14,8 @@\n \n <order manager="plone.portalheader" skinname="My\n Custom Theme" based-on="Plone Default">\n- <viewlet name="plone.global_sections" insertbefore="*"/>\n- <viewlet name="plone.site_actions" insertafter="plone.searchbox"/>\n+ <viewlet name="plone.global_sections" insert-before="*"/>\n+ <viewlet name="plone.site_actions" insert-after="plone.searchbox"/>\n </order>\n \n Hide a viewlet (here we hide the colophon for \'My Custom Theme\')::\n' | ||
|
||
Repository: plone.app.event | ||
Repository: plone.app.viewletmanager | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2023-10-05T16:10:25+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.event/commit/71757d6fb0519baf56de26482217432ec5c7d1b5 | ||
|
||
Merge pull request #383 from plone/maurits-test-long-event-master | ||
Date: 2023-10-08T15:13:48+02:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.viewletmanager/commit/52a8c8355b72862eb759f74a1f43b3d1f18f4e8a | ||
|
||
Fix test_long_event when run around midnight of first day of month | ||
Merge pull request #42 from plone/minordocfix | ||
|
||
Files changed: | ||
A news/334.tests | ||
M plone/app/event/tests/test_portlet_calendar.py | ||
M plone/app/viewletmanager/exportimport/storage.py | ||
|
||
b'diff --git a/news/334.tests b/news/334.tests\nnew file mode 100644\nindex 00000000..45ea1e5b\n--- /dev/null\n+++ b/news/334.tests\n@@ -0,0 +1,3 @@\n+Fix test_long_event when run around midnight of the first day of the month.\n+Fixes `issue 334 <https://github.com/plone/plone.app.event/issues/334>`_.\n+[maurits]\ndiff --git a/plone/app/event/tests/test_portlet_calendar.py b/plone/app/event/tests/test_portlet_calendar.py\nindex a5a8ada1..8b96a1d3 100644\n--- a/plone/app/event/tests/test_portlet_calendar.py\n+++ b/plone/app/event/tests/test_portlet_calendar.py\n@@ -181,9 +181,27 @@ def test_portlet_config(self):\n self.assertTrue("?mode=day&date=" in rd)\n \n def test_long_event(self):\n+ """Test a long event.\n+\n+ An event happening on three days, should have an indication on all\n+ three days. That is the main thing we test here.\n+\n+ But the test may fail on the first day of the month.\n+ See https://github.com/plone/plone.app.event/issues/334\n+ When generating the portlet on the first day of the month, it seems\n+ depending on time zones we might get the previous month. This would\n+ mean our event is not (fully) visible. So we force showing the\n+ calendar of the month that we want. This test is not about whether\n+ the correct month is shown at one minute past midnight.\n+\n+ Previously we created an event on the first day. But depending on\n+ the day of the week that the new month starts, this may also influence\n+ what is visible: we may see Friday 1st and Saturday 2nd, but not\n+ Sunday 3rd. So now we pick a day in the middle of the month.\n+ """\n tz = pytz.timezone(TZNAME)\n actual = tz.localize(datetime.now())\n- start = tz.localize(datetime(actual.year, actual.month, 1))\n+ start = tz.localize(datetime(actual.year, actual.month, 15))\n end = start + timedelta(days=2)\n \n e1 = createContentInContainer(\n@@ -191,6 +209,8 @@ def test_long_event(self):\n )\n self.portal.portal_workflow.doActionFor(e1, "publish")\n \n+ self.request["year"] = actual.year\n+ self.request["month"] = actual.month\n r = self.renderer(assignment=portlet_calendar.Assignment(state=("published",)))\n r.update()\n rd = r.render()\n' | ||
b'diff --git a/plone/app/viewletmanager/exportimport/storage.py b/plone/app/viewletmanager/exportimport/storage.py\nindex 2afbbd3..a094a21 100644\n--- a/plone/app/viewletmanager/exportimport/storage.py\n+++ b/plone/app/viewletmanager/exportimport/storage.py\n@@ -14,8 +14,8 @@\n \n <order manager="plone.portalheader" skinname="My\n Custom Theme" based-on="Plone Default">\n- <viewlet name="plone.global_sections" insertbefore="*"/>\n- <viewlet name="plone.site_actions" insertafter="plone.searchbox"/>\n+ <viewlet name="plone.global_sections" insert-before="*"/>\n+ <viewlet name="plone.site_actions" insert-after="plone.searchbox"/>\n </order>\n \n Hide a viewlet (here we hide the colophon for \'My Custom Theme\')::\n' | ||
|