You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes github-merge.py the first developer tool to go
all Python 3 (for context see #7717).
The changes are straightforward as the script already was
`from __future__ import division,print_function,unicode_literals`.
However urllib2 changed name, and json will only accept unicode data not
bytes.
This retains py2 compatibility for now: not strictly necessary
as it's not used by the build system - but it was easy.
Copy file name to clipboardExpand all lines: contrib/devtools/github-merge.py
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
#!/usr/bin/env python2
1
+
#!/usr/bin/env python3
2
2
# Copyright (c) 2016 Bitcoin Core Developers
3
3
# Distributed under the MIT software license, see the accompanying
4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -19,6 +19,11 @@
19
19
fromsysimportstdin,stdout,stderr
20
20
importargparse
21
21
importsubprocess
22
+
importjson,codecs
23
+
try:
24
+
fromurllib.requestimportRequest,urlopen
25
+
except:
26
+
fromurllib2importRequest,urlopen
22
27
23
28
# External tools (can be overridden using environment)
0 commit comments