From 5e4f3c49afd34031afa1f7772cf8700ff0392210 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Thu, 18 Jun 2020 15:38:52 +0200 Subject: [PATCH 1/2] Roadmap (#840) * Add roadmap. * Sketch a roadmap. * Link to plone release schedule * - need to pull in ``tempstorage`` in the ``docs`` setup extra to make it work * - condense roadmap to better highlight the differences Co-authored-by: Jens Vagelpohl --- buildout.cfg | 1 + docs/index.rst | 1 + docs/roadmap.rst | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ versions.cfg | 3 +++ 4 files changed, 68 insertions(+) create mode 100644 docs/roadmap.rst diff --git a/buildout.cfg b/buildout.cfg index 7fe8d38f4b..c78cc6c52b 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -160,6 +160,7 @@ recipe = zc.recipe.egg eggs = Zope[docs] Sphinx + tempstorage scripts = sphinx-build diff --git a/docs/index.rst b/docs/index.rst index b6b3917cd8..969d643fe8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ This is the official home for all Zope documentation. operation wsgi maintenance + roadmap changes zopebook/index zdgbook/index diff --git a/docs/roadmap.rst b/docs/roadmap.rst new file mode 100644 index 0000000000..0c6261df33 --- /dev/null +++ b/docs/roadmap.rst @@ -0,0 +1,63 @@ +Zope development roadmap +======================== + +The Zope development and support roadmap. **Last updated: June 2020** + + +Zope 2.13 - previous version +---------------------------- + +* Python support: + + - 2.7 + +* Support schedule: + + - Full support: - + - Bug fixes: - + - Security fixes: until 12/31/2020 [1]_ + + +Zope 4 - stable version +----------------------- + +* Python support: + + - 2.7 + - 3.5 + - 3.6 + - 3.7 + - 3.8 + +* Support schedule: + + - Full support: until Zope 5.0 is released, planned for September 2020 + - Bug fixes: until 12/31/2021 + - Security fixes: until 12/31/2022 [2]_ + + +Zope 5 - development version +---------------------------- + +* Python support: + + - 3.6 + - 3.7 + - 3.8 + - 3.9 (may wait until Zope 5.1) + +* Support schedule: + + - Full support: starting with the Zope 5.0 release, planned + for September 2020 + - Bug fixes: TBD + - Security fixes: TBD + + +See the `Plone release schedule `_ +for details about Plone version support. Zope will track some of their +milestones with its own releases. + + +.. [1] End of security fix support for Plone releases based on Zope 2.13 +.. [2] End of security fix support for Plone releases based on Zope 4 diff --git a/versions.cfg b/versions.cfg index d5d5af59a1..acc08c79ed 100644 --- a/versions.cfg +++ b/versions.cfg @@ -62,6 +62,9 @@ snowballstemmer = 2.0.0 soupsieve = 1.9.6 sphinx-rtd-theme = 0.4.3 sphinxcontrib-websupport = 1.2.2 +# tempstorage is only needed because the Sphinx documentation parses +# ZConfig xml configurations, which still contain references to it +tempstorage = 5.1 toml = 0.10.1 tox = 3.14.6 tqdm = 4.43.0 From 8171f8557db7abb57d75d3ca9d57d5f365b79957 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Thu, 18 Jun 2020 17:24:03 +0200 Subject: [PATCH 2/2] Decrease cookie size for copy/paste clipboard cookie (#855) * - Decrease cookie size for copy/paste clipboard cookie * - fix for real-life test --- CHANGES.rst | 3 +++ src/OFS/CopySupport.py | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index fd4f63dd93..9afe7e6e0a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,9 @@ https://zope.readthedocs.io/en/2.13/CHANGES.html 4.4.4 (unreleased) ------------------ +- Decrease cookie size for copy/paste clipboard cookie + (`#854 `_) + - Fix ``default`` keyword handling in page templates (`#846 `_) diff --git a/src/OFS/CopySupport.py b/src/OFS/CopySupport.py index 09003eccdd..0076a8dd17 100644 --- a/src/OFS/CopySupport.py +++ b/src/OFS/CopySupport.py @@ -23,8 +23,6 @@ from zlib import decompressobj import six -from six.moves.urllib.parse import quote -from six.moves.urllib.parse import unquote import transaction from AccessControl import ClassSecurityInfo @@ -56,6 +54,14 @@ from zope.lifecycleevent import ObjectMovedEvent +try: + from base64 import decodebytes + from base64 import encodebytes +except ImportError: # Python 2 + from base64 import decodestring as decodebytes + from base64 import encodestring as encodebytes + + class CopyError(Exception): pass @@ -671,10 +677,7 @@ def _cb_encode(d): json_bytes = dumps(d).encode('utf-8') squashed_bytes = compress(json_bytes, 2) # -> bytes w/ useful encoding # quote for embeding in cookie - if six.PY2: - return quote(squashed_bytes) - else: - return quote(squashed_bytes.decode('latin-1')) + return encodebytes(squashed_bytes) def _cb_decode(s, maxsize=8192): @@ -686,11 +689,9 @@ def _cb_decode(s, maxsize=8192): Return a list of text IDs. """ dec = decompressobj() - if six.PY2: - squashed = unquote(s) - else: - squashed = unquote(s).encode('latin-1') - data = dec.decompress(squashed, maxsize) + if six.PY3 and isinstance(s, str): + s = s.encode('latin-1') + data = dec.decompress(decodebytes(s), maxsize) if dec.unconsumed_tail: raise ValueError json_bytes = data.decode('utf-8')