[Checkins] [zopefoundation/Zope] c5433f: make FSImage.__str__ available in Python 3 (#282)

GitHub noreply at github.com
Fri May 18 14:01:49 CEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/Zope
  Commit: c5433f26af145179d6a17edb70876ca836ee4cf0
      https://github.com/zopefoundation/Zope/commit/c5433f26af145179d6a17edb70876ca836ee4cf0
  Author: Thomas Lotze <thomas at thomas-lotze.net>
  Date:   2018-05-18 (Fri, 18 May 2018)

  Changed paths:
    M CHANGES.rst
    M src/OFS/Image.py
    M src/OFS/tests/testFileAndImage.py

  Log Message:
  -----------
  make FSImage.__str__ available in Python 3 (#282)

* 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