dims / etcd3-gateway

This repository is now read-only. Please see https://opendev.org/openstack/etcd3gw for the new location for this code.
https://opendev.org/openstack/etcd3gw
Apache License 2.0
10 stars 20 forks source link

Fix for python 3 #28

Closed huntxu closed 6 years ago

huntxu commented 6 years ago

utils._decode() returns base64-decoded data. In Python 2 it is an instance of str() while in Python 3 the returned value is an instance of bytes(). This commit makes etcd3gw lock work and the unit tests run correctly without the implicit convention between str and bytes in Python 3.

Fixes: #24

codecov-io commented 6 years ago

Codecov Report

Merging #28 into master will increase coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #28      +/-   ##
=========================================
+ Coverage   87.26%   87.3%   +0.04%     
=========================================
  Files           7       7              
  Lines         314     315       +1     
  Branches       33      33              
=========================================
+ Hits          274     275       +1     
  Misses         25      25              
  Partials       15      15
Impacted Files Coverage Δ
etcd3gw/utils.py 78.37% <ø> (ø) :arrow_up:
etcd3gw/lock.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dab985c...2284d40. Read the comment docs.

jaypipes commented 6 years ago

Yep, verified that openstack/tooz works with this. Thanks, @huntxu :)

dims commented 6 years ago

Thanks @jaypipes and @huntxu !!! you all are the best!