Skip to content

Commit

Permalink
[fc] Repository: plone.app.z3cform
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2023-05-15T10:26:41+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.z3cform@8e0e801

cleanup: add a deprecation warning

Files changed:
M plone/app/z3cform/configure.zcml
M plone/app/z3cform/factories.py
Repository: plone.app.z3cform

Branch: refs/heads/master
Date: 2023-05-15T10:30:19+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.z3cform@354d2a0

Add news entry

Files changed:
A news/3764.feature
Repository: plone.app.z3cform

Branch: refs/heads/master
Date: 2023-05-20T13:36:34+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.z3cform@344c96f

Merge pull request #166 from plone/deprecate-storage

Deprecate storage

Files changed:
A news/3764.feature
M plone/app/z3cform/configure.zcml
M plone/app/z3cform/factories.py
  • Loading branch information
gforcada committed May 20, 2023
1 parent c72e020 commit 4b3c121
Showing 1 changed file with 33 additions and 21 deletions.
54 changes: 33 additions & 21 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,50 @@
Repository: plone.batching
Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2023-05-19T14:37:17+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/plone.batching/commit/fbba68ce484cce2550c620234798501424cddd44
Date: 2023-05-15T10:26:41+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.app.z3cform/commit/8e0e80173999cce9caa30274d4204639a371e390

Configuring with plone/meta
cleanup: add a deprecation warning

Files changed:
A news/50c0e759.internal
M .meta.toml
M .pre-commit-config.yaml
M tox.ini
M plone/app/z3cform/configure.zcml
M plone/app/z3cform/factories.py

b'diff --git a/.meta.toml b/.meta.toml\nindex c55cc61..eb29455 100644\n--- a/.meta.toml\n+++ b/.meta.toml\n@@ -1,10 +1,10 @@\n # Generated from:\n # https://github.com/plone/meta/tree/master/config/default\n-[check-manifest]\n-additional-ignores = [\n- "conf.py",\n- ]\n+[setup]\n+check_manifest_ignore = """\n+ conf.py\n+"""\n \n [meta]\n template = "default"\n-commit-id = "12f48b08"\n+commit-id = "50c0e759"\ndiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\nindex f9cdf5c..bca735f 100644\n--- a/.pre-commit-config.yaml\n+++ b/.pre-commit-config.yaml\n@@ -32,6 +32,7 @@ repos:\n - id: codespell\n additional_dependencies:\n - tomli\n+\n - repo: https://github.com/mgedmin/check-manifest\n rev: "0.49"\n hooks:\ndiff --git a/news/50c0e759.internal b/news/50c0e759.internal\nnew file mode 100644\nindex 0000000..c08f539\n--- /dev/null\n+++ b/news/50c0e759.internal\n@@ -0,0 +1,2 @@\n+Update configuration files.\n+[plone devs]\ndiff --git a/tox.ini b/tox.ini\nindex db2fcdb..f461448 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -8,10 +8,13 @@ envlist =\n lint\n test\n \n+\n+\n [testenv]\n allowlist_externals =\n sh\n \n+\n [testenv:format]\n description = automatically reformat code\n skip_install = true\n'
b'diff --git a/plone/app/z3cform/configure.zcml b/plone/app/z3cform/configure.zcml\nindex e440117..771b289 100644\n--- a/plone/app/z3cform/configure.zcml\n+++ b/plone/app/z3cform/configure.zcml\n@@ -91,10 +91,4 @@\n .interfaces.IPloneFormLayer"\n />\n \n- <utility\n- factory=".factories.Zope2FileUploadStorable"\n- provides="plone.namedfile.interfaces.IStorage"\n- name="ZPublisher.HTTPRequest.FileUpload"\n- />\n-\n </configure>\ndiff --git a/plone/app/z3cform/factories.py b/plone/app/z3cform/factories.py\nindex 85022a3..b2c5913 100644\n--- a/plone/app/z3cform/factories.py\n+++ b/plone/app/z3cform/factories.py\n@@ -1,14 +1,4 @@\n-from plone.namedfile.interfaces import IStorage\n-from plone.namedfile.storages import MAXCHUNKSIZE\n-from zope.interface import implementer\n+from zope.deprecation import moved\n \n \n-@implementer(IStorage)\n-class Zope2FileUploadStorable:\n- def store(self, data, blob):\n- data.seek(0)\n- with blob.open("w") as fp:\n- block = data.read(MAXCHUNKSIZE)\n- while block:\n- fp.write(block)\n- block = data.read(MAXCHUNKSIZE)\n+moved("plone.namedfile.storages.Zope2FileUploadStorable", "Version 7.0")\n'

Repository: plone.batching
Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2023-05-19T23:57:46+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/plone.batching/commit/33ce4a23cb594abd4e2ee1f1fce200675d49e658
Date: 2023-05-15T10:30:19+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.app.z3cform/commit/354d2a02f18b5d5fa44b1d122028315ae7f7bced

Merge pull request #49 from plone/config-with-default-template-e963330c
Add news entry

Configuring with plone/meta
Files changed:
A news/3764.feature

b'diff --git a/news/3764.feature b/news/3764.feature\nnew file mode 100644\nindex 00000000..3d4667af\n--- /dev/null\n+++ b/news/3764.feature\n@@ -0,0 +1,3 @@\n+Move storage utility to plone.namedfile\n+to break a dependency cycle between the two.\n+[gforcada]\n'

Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2023-05-20T13:36:34+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.app.z3cform/commit/344c96fba86cfd34cf9caf9ca017d187a8b698cf

Merge pull request #166 from plone/deprecate-storage

Deprecate storage

Files changed:
A news/50c0e759.internal
M .meta.toml
M .pre-commit-config.yaml
M tox.ini
A news/3764.feature
M plone/app/z3cform/configure.zcml
M plone/app/z3cform/factories.py

b'diff --git a/.meta.toml b/.meta.toml\nindex c55cc61..eb29455 100644\n--- a/.meta.toml\n+++ b/.meta.toml\n@@ -1,10 +1,10 @@\n # Generated from:\n # https://github.com/plone/meta/tree/master/config/default\n-[check-manifest]\n-additional-ignores = [\n- "conf.py",\n- ]\n+[setup]\n+check_manifest_ignore = """\n+ conf.py\n+"""\n \n [meta]\n template = "default"\n-commit-id = "12f48b08"\n+commit-id = "50c0e759"\ndiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\nindex f9cdf5c..bca735f 100644\n--- a/.pre-commit-config.yaml\n+++ b/.pre-commit-config.yaml\n@@ -32,6 +32,7 @@ repos:\n - id: codespell\n additional_dependencies:\n - tomli\n+\n - repo: https://github.com/mgedmin/check-manifest\n rev: "0.49"\n hooks:\ndiff --git a/news/50c0e759.internal b/news/50c0e759.internal\nnew file mode 100644\nindex 0000000..c08f539\n--- /dev/null\n+++ b/news/50c0e759.internal\n@@ -0,0 +1,2 @@\n+Update configuration files.\n+[plone devs]\ndiff --git a/tox.ini b/tox.ini\nindex db2fcdb..f461448 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -8,10 +8,13 @@ envlist =\n lint\n test\n \n+\n+\n [testenv]\n allowlist_externals =\n sh\n \n+\n [testenv:format]\n description = automatically reformat code\n skip_install = true\n'
b'diff --git a/news/3764.feature b/news/3764.feature\nnew file mode 100644\nindex 00000000..3d4667af\n--- /dev/null\n+++ b/news/3764.feature\n@@ -0,0 +1,3 @@\n+Move storage utility to plone.namedfile\n+to break a dependency cycle between the two.\n+[gforcada]\ndiff --git a/plone/app/z3cform/configure.zcml b/plone/app/z3cform/configure.zcml\nindex e4401171..771b2898 100644\n--- a/plone/app/z3cform/configure.zcml\n+++ b/plone/app/z3cform/configure.zcml\n@@ -91,10 +91,4 @@\n .interfaces.IPloneFormLayer"\n />\n \n- <utility\n- factory=".factories.Zope2FileUploadStorable"\n- provides="plone.namedfile.interfaces.IStorage"\n- name="ZPublisher.HTTPRequest.FileUpload"\n- />\n-\n </configure>\ndiff --git a/plone/app/z3cform/factories.py b/plone/app/z3cform/factories.py\nindex 85022a30..b2c59138 100644\n--- a/plone/app/z3cform/factories.py\n+++ b/plone/app/z3cform/factories.py\n@@ -1,14 +1,4 @@\n-from plone.namedfile.interfaces import IStorage\n-from plone.namedfile.storages import MAXCHUNKSIZE\n-from zope.interface import implementer\n+from zope.deprecation import moved\n \n \n-@implementer(IStorage)\n-class Zope2FileUploadStorable:\n- def store(self, data, blob):\n- data.seek(0)\n- with blob.open("w") as fp:\n- block = data.read(MAXCHUNKSIZE)\n- while block:\n- fp.write(block)\n- block = data.read(MAXCHUNKSIZE)\n+moved("plone.namedfile.storages.Zope2FileUploadStorable", "Version 7.0")\n'

0 comments on commit 4b3c121

Please sign in to comment.