Skip to content

Commit

Permalink
Revert "Upgrade to Python3 (apache#3431)" (apache#3478)
Browse files Browse the repository at this point in the history
This reverts commit 257b1a4
  • Loading branch information
nicknezis authored and sreev committed Apr 9, 2020
1 parent 92aa055 commit f674106
Show file tree
Hide file tree
Showing 274 changed files with 280 additions and 278 deletions.
8 changes: 5 additions & 3 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
- python3
- python2.7
- wget
- pkg-config
- zip
Expand All @@ -46,6 +46,8 @@ script:
- gcc --version
- which g++-4.8
- g++ --version
- which python3
- python3 -V
- which python
- python -V
- which python2.7
- python2.7 -V
- scripts/travis/ci.sh
2 changes: 1 addition & 1 deletion 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 11
* Python 3
* Python 2.7
* Bazel 0.26.0

## Contact
Expand Down
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 python3
#!/usr/bin/env python
# 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['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.4')
env_map['PYTHON'] = discover_tool('python', 'Python', 'PYTHON', '2.7')

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([3.4])
AC_PATH_PROG([PYTHON3], [python3], [],[])
AM_PATH_PYTHON([2.4.3])
AC_PATH_PROG([PYTHON], [python], [],[])

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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python2.7
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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 python3
#!/usr/bin/env python
# -*- 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/protocol_unittest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
# -*- encoding: utf-8 -*-

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

0 comments on commit f674106

Please sign in to comment.