You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/06/16 19:19:18 UTC
[arrow] branch master updated: ARROW-5619: [C++] Make
get_apache_mirror.py workable with Python 3.5
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new e8c4230 ARROW-5619: [C++] Make get_apache_mirror.py workable with Python 3.5
e8c4230 is described below
commit e8c42304165fe4b3c78ee352beec92a4394ad331
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sun Jun 16 14:19:10 2019 -0500
ARROW-5619: [C++] Make get_apache_mirror.py workable with Python 3.5
% python3 --version
Python 3.5.3
% python3 cpp/build-support/get_apache_mirror.py
Traceback (most recent call last):
File "cpp/build-support/get_apache_mirror.py", line 31, in <module>
print(json.loads(suggested_mirror)['preferred'])
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
Debian stretch ships Python 3.5 as python3.
Author: Sutou Kouhei <ko...@clear-code.com>
Closes #4583 from kou/cpp-apache-mirror-python-3.5 and squashes the following commits:
3d3485815 <Sutou Kouhei> Make get_apache_mirror.py workable with Python 3.5
---
cpp/build-support/get_apache_mirror.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/build-support/get_apache_mirror.py b/cpp/build-support/get_apache_mirror.py
old mode 100644
new mode 100755
index 07186e0..ac52255
--- a/cpp/build-support/get_apache_mirror.py
+++ b/cpp/build-support/get_apache_mirror.py
@@ -28,4 +28,4 @@ except ImportError:
suggested_mirror = urlopen('https://www.apache.org/dyn/'
'closer.cgi?as_json=1').read()
-print(json.loads(suggested_mirror)['preferred'])
+print(json.loads(suggested_mirror.decode('utf-8'))['preferred'])