CooperativeReader not py3-ready

Bug #1818915 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Fix Released
High
Unassigned
Rocky
New
Undecided
Unassigned
Stein
Fix Released
High
Unassigned

Bug Description

Tim Burke noticed this in IRC today:
https://github.com/openstack/glance_store/blob/0.28.0/glance_store/common/utils.py#L138

In the CooperativeReader class:
    def read(self, length=None):
        """Return the next chunk of the underlying iterator.

        This is replaced with cooperative_read in __init__ if the underlying
        fd already supports read().
        """
        if self.iterator is None:
            self.iterator = self.__iter__()
        try:
            return next(self.iterator)
        except StopIteration:
            return ''

This needs to return b''.

Changed in glance-store:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (master)

Reviewed: https://review.opendev.org/651941
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=0a3166558f1b2f382075145502576919cecec61e
Submitter: Zuul
Branch: master

commit 0a3166558f1b2f382075145502576919cecec61e
Author: Cyril Roelandt <email address hidden>
Date: Fri Apr 12 01:40:04 2019 +0200

    Python3: Fix return type on CooperativeReader.read

    CooperativeReader.read() should return bytes. A similar change was
    merged in Glance.

    Change-Id: Iee3b49235be2af64eac3933e41c7e44fc1a564f4
    Closes-Bug: #1818915

Changed in glance-store:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance_store 0.29.0

This issue was fixed in the openstack/glance_store 0.29.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.