From 0a89c3edff86b93886a6c2e95ed0c6509660f27d Mon Sep 17 00:00:00 2001 From: mauritsvanrees Date: Mon, 4 Sep 2023 09:56:55 +0200 Subject: [PATCH] [fc] Repository: plone.app.event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Branch: refs/heads/master Date: 2023-08-01T00:35:32Z Author: pre-commit-ci[bot] (pre-commit-ci[bot]) <66853113+pre-commit-ci[bot]@users.noreply.github.com> Commit: https://github.com/plone/plone.app.event/commit/e87ede2f0fa3a55aa20ae595f8c2eada675e8dec [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.8.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.10.1) - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) - [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0) - [github.com/collective/i18ndude: 6.0.0 → 6.1.0](https://github.com/collective/i18ndude/compare/6.0.0...6.1.0) Files changed: M .pre-commit-config.yaml Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-04T09:56:55+02:00 Author: Maurits van Rees (mauritsvanrees) Commit: https://github.com/plone/plone.app.event/commit/cd63cfff52f803951bb022133c2905357bfc196a Merge pull request #382 from plone/pre-commit-ci-update-config [pre-commit.ci] pre-commit autoupdate Files changed: M .pre-commit-config.yaml --- last_commit.txt | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 255376271e..21146272f2 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,21 +1,38 @@ -Repository: plone.restapi +Repository: plone.app.event -Branch: refs/heads/main -Date: 2023-09-02T22:12:12-07:00 -Author: Andrea Cecchi (cekk) -Commit: https://github.com/plone/plone.restapi/commit/36e67bd6c50053c71afdc34ff21fe23fdcd848a3 +Branch: refs/heads/master +Date: 2023-08-01T00:35:32Z +Author: pre-commit-ci[bot] (pre-commit-ci[bot]) <66853113+pre-commit-ci[bot]@users.noreply.github.com> +Commit: https://github.com/plone/plone.app.event/commit/e87ede2f0fa3a55aa20ae595f8c2eada675e8dec -Improve RESOLVEUID_RE regexp to catch also paths generated by Link content-types (#1700) +[pre-commit.ci] pre-commit autoupdate -* Improve regexp to catch also paths generated by Link content-types - -* add changelog +updates: +- [github.com/asottile/pyupgrade: v3.8.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.10.1) +- [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) +- [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0) +- [github.com/collective/i18ndude: 6.0.0 → 6.1.0](https://github.com/collective/i18ndude/compare/6.0.0...6.1.0) Files changed: -A news/1699.bugfix -M src/plone/restapi/serializer/utils.py -M src/plone/restapi/tests/test_resolveuid.py +M .pre-commit-config.yaml -b'diff --git a/news/1699.bugfix b/news/1699.bugfix\nnew file mode 100644\nindex 000000000..a0bdf39a1\n--- /dev/null\n+++ b/news/1699.bugfix\n@@ -0,0 +1 @@\n+Improve RESOLVEUID_RE regexp to catch also paths generated by Link content-types. @cekk\ndiff --git a/src/plone/restapi/serializer/utils.py b/src/plone/restapi/serializer/utils.py\nindex c2f89e4e2..e0c3bbdef 100644\n--- a/src/plone/restapi/serializer/utils.py\n+++ b/src/plone/restapi/serializer/utils.py\n@@ -8,7 +8,7 @@\n import re\n \n \n-RESOLVEUID_RE = re.compile("^[./]*resolve[Uu]id/([^/]*)/?(.*)$")\n+RESOLVEUID_RE = re.compile("^(?:|.*/)resolve[Uu]id/([^/]*)/?(.*)$")\n \n \n def resolve_uid(path):\ndiff --git a/src/plone/restapi/tests/test_resolveuid.py b/src/plone/restapi/tests/test_resolveuid.py\nindex 404639be8..1e42aa9bf 100644\n--- a/src/plone/restapi/tests/test_resolveuid.py\n+++ b/src/plone/restapi/tests/test_resolveuid.py\n@@ -24,7 +24,6 @@\n \n \n class TestBlocksResolveUIDFunctional(TestCase):\n-\n layer = PLONE_RESTAPI_BLOCKS_FUNCTIONAL_TESTING\n \n def setUp(self):\n@@ -698,3 +697,9 @@ def test_resolveuid_with_primary_field_url_keeps_suffix(self):\n ]["url"],\n self.doc2.absolute_url() + "/view",\n )\n+\n+ def test_resolveuid_handle_link_style_formats(self):\n+ uid = IUUID(self.doc2)\n+ blocks = {"aaa": {"@type": "foo", "url": f"/plone/resolveuid/{uid}"}}\n+ value = self.serialize("blocks", blocks)\n+ self.assertEqual(value["aaa"]["url"], self.doc2.absolute_url())\n' +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 \n' + +Repository: plone.app.event + + +Branch: refs/heads/master +Date: 2023-09-04T09:56:55+02:00 +Author: Maurits van Rees (mauritsvanrees) +Commit: https://github.com/plone/plone.app.event/commit/cd63cfff52f803951bb022133c2905357bfc196a + +Merge pull request #382 from plone/pre-commit-ci-update-config + +[pre-commit.ci] pre-commit autoupdate + +Files changed: +M .pre-commit-config.yaml + +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 \n'