From 5d01b1fa5c7807e7abca498810bd5408caeadd3e Mon Sep 17 00:00:00 2001 From: drfho Date: Wed, 11 Dec 2024 21:13:29 +0800 Subject: [PATCH] added compatibility to obsolete py2-function pybytes() (#344) After update old ZMS4/Py2 templates/py-script string processing errors with pybytes() may occur. This former charset fixing function does not exist anymore. For a smother updating it is synonymized with pystr() now. --- Products/zms/standard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Products/zms/standard.py b/Products/zms/standard.py index 403c259c5..22e6fd37b 100644 --- a/Products/zms/standard.py +++ b/Products/zms/standard.py @@ -72,6 +72,9 @@ def pystr(v, encoding='utf-8', errors='strict'): v = str(v) return v +security.declarePublic('pybytes') +# Just for compatibility of old ZMS4 templates. +pybytes = pystr # Umlauts umlaut_map = {