Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit 257b1a4

Browse files
author
Neng Lu
authored
Upgrade to Python3 for the whole repo (#3431)
* migrate to python3 * update README * update travis
1 parent 485b708 commit 257b1a4

File tree

274 files changed

+279
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+279
-281
lines changed

.travis.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ addons:
1919
- g++-4.8
2020
- gcc-4.8-multilib
2121
- g++-4.8-multilib
22-
- python2.7
22+
- python3
2323
- wget
2424
- pkg-config
2525
- zip
@@ -46,8 +46,6 @@ script:
4646
- gcc --version
4747
- which g++-4.8
4848
- g++ --version
49-
- which python
50-
- python -V
51-
- which python2.7
52-
- python2.7 -V
49+
- which python3
50+
- python3 -V
5351
- scripts/travis/ci.sh

README.md

+2-2

bazel_configure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# Licensed to the Apache Software Foundation (ASF) under one
33
# or more contributor license agreements. See the NOTICE file
44
# distributed with this work for additional information
@@ -413,7 +413,7 @@ def main():
413413
env_map['AUTOMAKE'] = discover_tool('automake', 'Automake', 'AUTOMAKE', '1.9.6')
414414
env_map['AUTOCONF'] = discover_tool('autoconf', 'Autoconf', 'AUTOCONF', '2.6.3')
415415
env_map['MAKE'] = discover_tool('make', 'Make', 'MAKE', '3.81')
416-
env_map['PYTHON'] = discover_tool('python', 'Python', 'PYTHON', '2.7')
416+
env_map['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.4')
417417

418418
if platform == 'Darwin':
419419
env_map['LIBTOOL'] = discover_tool('glibtool', 'Libtool', 'LIBTOOL', '2.4.2')

config/configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ AM_CONDITIONAL([SYSLINUX], [test x$sys_os = xlinux])
100100
ACX_PTHREAD
101101

102102
# Check the python version required
103-
AM_PATH_PYTHON([2.4.3])
104-
AC_PATH_PROG([PYTHON], [python], [],[])
103+
AM_PATH_PYTHON([3.4])
104+
AC_PATH_PROG([PYTHON3], [python3], [],[])
105105

106106
abs_top_builddir=`pwd`
107107
AC_SUBST(abs_top_builddir)

examples/src/python/bolt/consume_bolt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/bolt/count_bolt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/bolt/half_ack_bolt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/bolt/stateful_count_bolt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/bolt/stream_aggregate_bolt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/bolt/window_size_bolt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/custom_grouping_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/half_acking_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/join_streamlet_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/misc/test_task_hook.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/multi_stream_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/pulsar_word_count_streamlet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/spout/multi_stream_spout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/spout/stateful_word_spout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/spout/word_spout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/stateful_word_count_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/window_size_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/word_count_streamlet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

examples/src/python/word_count_topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/common/src/python/pex_loader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/common/src/python/utils/log.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/common/src/python/utils/proc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/common/tests/python/pex_loader/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/common/tests/python/pex_loader/pex_loader_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/common/tests/python/pex_loader/testdata/src/sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/executor/src/python/heron_executor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2.7
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/executor/tests/python/heron_executor_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/basics/base_instance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/basics/bolt_instance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/basics/spout_instance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/instance/st_heron_instance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/event_looper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/gateway_looper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/heron_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/metricsmgr_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/protocol.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/socket_options.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/network/st_stmgr_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/metrics/metrics_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/metrics/py_metrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/misc/communicator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/misc/custom_grouping_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/misc/outgoing_tuple_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/misc/pplan_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/misc/serializer_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/system_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/system_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/topology/topology_context_impl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/src/python/utils/tuple.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/mock_protobuf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/network/event_looper_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/network/gateway_looper_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/network/heron_client_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/network/metricsmgr_client_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/network/mock_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

heron/instance/tests/python/network/mock_generator_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- encoding: utf-8 -*-
33

44
# Licensed to the Apache Software Foundation (ASF) under one

0 commit comments

Comments
 (0)