• Jérome Perrin's avatar
    py2/py3: Make Products code compatible with both python2 and python3 (nexedi/erp5!1751). · 1b555dbf
    Jérome Perrin authored and Arnaud Fontaine's avatar Arnaud Fontaine committed
    * Zope API changes:
      + publish():
        - stdin is now BytesIO rather than StringIO.
        - Returned value of a script is passed to str() in python2, not in python3 anymore.
      + HTTPResponse `body` property is now bytes().
      + OFS.Image.File file parameter is bytes().
      + zope.interface implements() is now @implementer decorator.
      + Python standard logging module recommended instead of zLOG.
    * Python3 API changes:
      + builtin reduce() was removed.
      + urlnorm is now available.
      + Use BytesIO rather than StringIO to follow py3 API.
      + hmac.new() requires digestmod argument from Python 3.8.
      + Use six.moves library to handle moved objects from py2 to py3.
      + `modernize -f xrange_six` then slightly adjusted manually to just use range
         where it does not make a significant difference (for example in test).
      + base64.b64encode() now expects bytes().
      + UserDict() interface changed:
        - New parameter in update() a...
    1b555dbf