[ 
https://issues.apache.org/jira/browse/HBASE-20910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16549875#comment-16549875
 ] 

Ankit Singhal commented on HBASE-20910:
---------------------------------------

bq. I think this will break python2?

bq. In python2, git.format_patch returns an object of type unicode, and encode 
returns a str

[~mdrob], Python2 should be fine because it doesn't distinguish between str and 
binary. 

{code}
10082:hbase asinghal$ python2.7 dev-support/submit-patch.py
INFO:submit-patch: Active branch: master
INFO:submit-patch: Using tracking branch as base branch
INFO:submit-patch: Base branch: origin/master
INFO:submit-patch: Patch directory: /Users/asinghal/patches
INFO:submit-patch: Patch name: master.patch
{code}

 

> Fix dev-support/submit-patch.py
> -------------------------------
>
>                 Key: HBASE-20910
>                 URL: https://issues.apache.org/jira/browse/HBASE-20910
>             Project: HBase
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Ankit Singhal
>            Assignee: Ankit Singhal
>            Priority: Major
>         Attachments: HBASE-20910.patch
>
>
> {code:python}
> hbase$ python3.6 dev-support/submit-patch.py
> INFO:submit-patch: Active branch: master
> INFO:submit-patch: Using tracking branch as base branch
> INFO:submit-patch: Base branch: origin/master
> INFO:submit-patch: Patch directory: /Users/asinghal/patches
> INFO:submit-patch: Patch name: master.patch
> Traceback (most recent call last):
>  File "dev-support/submit-patch.py", line 253, in <module>
>  f.write(diff.encode('utf8'))
> TypeError: write() argument must be str, not bytes
> {code}
> [~te...@apache.org], FYI



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to