Skip to content

fix couchup for python3#1905

Merged
wohali merged 2 commits intoapache:masterfrom
klaemo:patch-1
Feb 7, 2019
Merged

fix couchup for python3#1905
wohali merged 2 commits intoapache:masterfrom
klaemo:patch-1

Conversation

@klaemo
Copy link
Copy Markdown
Contributor

@klaemo klaemo commented Feb 5, 2019

A tale of strings, bytes and pyhon3, I guess. This is probably the first line of python I've written in my life. Hooray! 😀 I consulted this fun document to understand what's going on.

Overview

couchup crashed in python3, because base64.b64encode expects a bytes-like object instead of a string. With this PR the string passed to base64.b64encode is properly encoded and decoded.

Testing recommendations

Run couchup with credentials with python3:
couchup replicate -a --login admin --password <my-password>

I was able to run couchup successfully on my DB with the change applied.

Related Issues or Pull Requests

fixes #1899

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@wohali
Copy link
Copy Markdown
Member

wohali commented Feb 5, 2019

@klaemo Unfortunately I can't merge this because our style checker is failing. If you run sudo pip3 install black then make python-black-update and update your PR, it should solve the problem.

Thanks again for your PR!

A tale of strings, bytes and pyhon3, I guess
@klaemo
Copy link
Copy Markdown
Contributor Author

klaemo commented Feb 6, 2019

@wohali Done! ✅ Sorry I missed this step.

@wohali wohali merged commit e702598 into apache:master Feb 7, 2019
janl pushed a commit that referenced this pull request Feb 7, 2019
@klaemo klaemo deleted the patch-1 branch February 7, 2019 13:28
@wohali wohali mentioned this pull request Feb 7, 2019
janl pushed a commit that referenced this pull request Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

couchup crashes when run with python3

2 participants