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

GitHub noreply at github.com
Fri May 18 14:02:45 CEST 2018


  Branch: refs/heads/wsgi_show_tb_pr
  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.


  Commit: 46ae333fd62ec9e6fce0bf4c7cd91a3a2ca288bd
      https://github.com/zopefoundation/Zope/commit/46ae333fd62ec9e6fce0bf4c7cd91a3a2ca288bd
  Author: Michael Howitz <mh at gocept.com>
  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:
  -----------
  Merge branch 'master' into wsgi_show_tb_pr


Compare: https://github.com/zopefoundation/Zope/compare/e2f87a6f4e55...46ae333fd62e
      **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