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

Commit

Permalink
Upgrade to Python3 for the whole repo (#3431)
Browse files Browse the repository at this point in the history
* migrate to python3

* update README

* update travis
  • Loading branch information
Neng Lu authored Jan 10, 2020
1 parent 9290d42 commit 48215c2
Show file tree
Hide file tree
Showing 274 changed files with 279 additions and 281 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ addons:
- g++-4.8
- gcc-4.8-multilib
- g++-4.8-multilib
- python2.7
- python3
- wget
- pkg-config
- zip
Expand All @@ -46,8 +46,6 @@ script:
- gcc --version
- which g++-4.8
- g++ --version
- which python
- python -V
- which python2.7
- python2.7 -V
- which python3
- python3 -V
- scripts/travis/ci.sh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Heron is realtime analytics platform developed by Twitter. It has a wide array

#### Heron Requirements:
* Java JDK 1.8
* Python 2.7
* Python 3
* Bazel 0.26.0

## Contact
Expand Down Expand Up @@ -60,4 +60,4 @@ Heron is realtime analytics platform developed by Twitter. It has a wide array

## License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
4 changes: 2 additions & 2 deletions bazel_configure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down Expand Up @@ -413,7 +413,7 @@ def main():
env_map['AUTOMAKE'] = discover_tool('automake', 'Automake', 'AUTOMAKE', '1.9.6')
env_map['AUTOCONF'] = discover_tool('autoconf', 'Autoconf', 'AUTOCONF', '2.6.3')
env_map['MAKE'] = discover_tool('make', 'Make', 'MAKE', '3.81')
env_map['PYTHON'] = discover_tool('python', 'Python', 'PYTHON', '2.7')
env_map['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.4')

if platform == 'Darwin':
env_map['LIBTOOL'] = discover_tool('glibtool', 'Libtool', 'LIBTOOL', '2.4.2')
Expand Down
4 changes: 2 additions & 2 deletions config/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ AM_CONDITIONAL([SYSLINUX], [test x$sys_os = xlinux])
ACX_PTHREAD

# Check the python version required
AM_PATH_PYTHON([2.4.3])
AC_PATH_PROG([PYTHON], [python], [],[])
AM_PATH_PYTHON([3.4])
AC_PATH_PROG([PYTHON3], [python3], [],[])

abs_top_builddir=`pwd`
AC_SUBST(abs_top_builddir)
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/bolt/consume_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/bolt/count_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/bolt/half_ack_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/bolt/stateful_count_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/bolt/stream_aggregate_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/bolt/window_size_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/custom_grouping_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/half_acking_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/join_streamlet_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/misc/test_task_hook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/multi_stream_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/pulsar_word_count_streamlet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/spout/multi_stream_spout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/spout/stateful_word_spout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/spout/word_spout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/stateful_word_count_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/window_size_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/word_count_streamlet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion examples/src/python/word_count_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/common/src/python/pex_loader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/common/src/python/utils/log.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/common/src/python/utils/proc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/common/tests/python/pex_loader/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/executor/src/python/heron_executor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/executor/tests/python/heron_executor_unittest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/basics/base_instance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/basics/bolt_instance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/basics/spout_instance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/instance/st_heron_instance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/event_looper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/gateway_looper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/heron_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/metricsmgr_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/protocol.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/socket_options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/network/st_stmgr_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/metrics/metrics_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/metrics/py_metrics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/misc/communicator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/misc/pplan_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/misc/serializer_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/system_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/system_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/src/python/utils/tuple.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/tests/python/mock_protobuf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
2 changes: 1 addition & 1 deletion heron/instance/tests/python/network/mock_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

# Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Loading

0 comments on commit 48215c2

Please sign in to comment.