Public bug reported:

Both iter_content and the first line of the loop in the
etcd3gw watch code were decoding the chunk received.

In python2, this works fine:
```
$ python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
```

In python3, it raises an AttributeError:
```
$ python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'
```
Link to patch: 
https://opendev.org/openstack/etcd3gw/commit/ed899b34e464862525f76fff2377a2cceeb65af7
 

python-etcd3gw-0.2.5 (focal)

** Affects: python-etcd3gw (Ubuntu)
     Importance: High
     Assignee: Heather Lemon (hypothetical-lemon)
         Status: In Progress

** Affects: python-etcd3gw (Ubuntu Bionic)
     Importance: Undecided
     Assignee: Heather Lemon (hypothetical-lemon)
         Status: In Progress

** Affects: python-etcd3gw (Ubuntu Focal)
     Importance: Undecided
     Assignee: Heather Lemon (hypothetical-lemon)
         Status: In Progress

** Affects: python-etcd3gw (Ubuntu Jammy)
     Importance: High
     Assignee: Heather Lemon (hypothetical-lemon)
         Status: In Progress

** Attachment added: "original patch file"
   
https://bugs.launchpad.net/bugs/1965325/+attachment/5570107/+files/0001-watch-Avoid-double-decoding-in-python3.patch

** Changed in: python-etcd3gw (Ubuntu)
     Assignee: (unassigned) => Heather Lemon (hypothetical-lemon)

** Changed in: python-etcd3gw (Ubuntu)
   Importance: Undecided => High

** Changed in: python-etcd3gw (Ubuntu)
       Status: New => In Progress

** Also affects: python-etcd3gw (Ubuntu Jammy)
   Importance: High
     Assignee: Heather Lemon (hypothetical-lemon)
       Status: In Progress

** Also affects: python-etcd3gw (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: python-etcd3gw (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Changed in: python-etcd3gw (Ubuntu Focal)
       Status: New => In Progress

** Changed in: python-etcd3gw (Ubuntu Bionic)
       Status: New => In Progress

** Changed in: python-etcd3gw (Ubuntu Focal)
     Assignee: (unassigned) => Heather Lemon (hypothetical-lemon)

** Changed in: python-etcd3gw (Ubuntu Bionic)
     Assignee: (unassigned) => Heather Lemon (hypothetical-lemon)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1965325

Title:
  upstream patch from opendev - double encoding-decoding

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-etcd3gw/+bug/1965325/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to