[Checkins] [zopefoundation/Zope] 059b73: make FSImage.__str__ available in Python 3

GitHub noreply at github.com
Thu May 17 18:33:12 CEST 2018


  Branch: refs/heads/image-tag
  Home:   https://github.com/zopefoundation/Zope
  Commit: 059b7398a7fb873e898ccd30e4d42389c1ed7b16
      https://github.com/zopefoundation/Zope/commit/059b7398a7fb873e898ccd30e4d42389c1ed7b16
  Author: Thomas Lotze <thomas at thomas-lotze.net>
  Date:   2018-05-17 (Thu, 17 May 2018)

  Changed paths:
    M src/OFS/Image.py

  Log Message:
  -----------
  make FSImage.__str__ available in Python 3

In both Python 2 and 3, the tag() method returns the respective str type, so
the result can always be used for __str__. Without having this method
available in Python 3, the image tag cannot be included, for example, in
Chamaeleon page templates by simply accessing the image object, as that uses
i18n which in turn casts the object to the respective text (unicode) type. Not
implementing __str__ in Python 3 results in the object representation instead
of the tag in that case.



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the checkins mailing list