Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# This script performs testing of scenarios from verify_performance_test_results.py
#

from __future__ import print_function
import unittest, mock
from mock import patch, mock_open
from datetime import datetime
Expand All @@ -44,7 +45,7 @@ class DependencyCheckReportGeneratorTest(unittest.TestCase):
"""Tests for `dependency_check_report_generator.py`."""

def setUp(self):
print "\n\nTest : " + self._testMethodName
print("\n\nTest : " + self._testMethodName)


@patch('dependency_check.bigquery_client_utils.BigQueryClientUtils')
Expand Down Expand Up @@ -134,4 +135,4 @@ def test_invalid_dep_input(self, *args):

if __name__ == '__main__':
unittest.main()


3 changes: 2 additions & 1 deletion .test-infra/jenkins/jira_utils/jira_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -66,7 +67,7 @@ def run(self, dep_name, dep_latest_version, sdk_type, group_id=None):
Created a parent issue for {1}""".format(summary, group_id))
try:
parent_issue = self._create_issue(group_id, None)
print parent_issue.key
print(parent_issue.key)
except:
logging.error("""Failed creating a parent issue for {0}.
Stop handling the JIRA issue for {1}, {2}""".format(group_id, dep_name, dep_latest_version))
Expand Down
4 changes: 2 additions & 2 deletions .test-infra/jenkins/jira_utils/jira_manager_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -42,7 +43,7 @@ class JiraManagerTest(unittest.TestCase):
"""Tests for `jira_manager.py`."""

def setUp(self):
print "\n\nTest : " + self._testMethodName
print("\n\nTest : " + self._testMethodName)


def test_find_owners_with_single_owner(self, *args):
Expand Down Expand Up @@ -240,4 +241,3 @@ def _get_expected_description(self, dep_name, dep_latest_version, owners):

if __name__ == '__main__':
unittest.main()

2 changes: 1 addition & 1 deletion sdks/python/apache_beam/io/tfrecordio_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# >>> writer.close()
# >>> with open('/tmp/python_foo.tfrecord', 'rb') as f:
# ... data = base64.b64encode(f.read())
# ... print data
# ... print(data)
FOO_RECORD_BASE64 = 'AwAAAAAAAACwmUkOZm9vYYq+/g=='

# Same as above but containing two records ['foo', 'bar']
Expand Down
12 changes: 6 additions & 6 deletions sdks/python/apache_beam/utils/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
same function 'multiply'.::

def multiply(arg1, arg2):
print arg1, '*', arg2, '=',
print(arg1, '*', arg2, '=', end=' ')
return arg1*arg2

# This annotation marks 'old_multiply' as deprecated since 'v.1' and suggests
Expand All @@ -52,23 +52,23 @@ def old_multiply(arg1, arg2):
result = 0
for i in xrange(arg1):
result += arg2
print arg1, '*', arg2, '(the old way)=',
print(arg1, '*', arg2, '(the old way)=', end=' ')
return result

# This annotation marks 'exp_multiply' as experimental and suggests
# using 'multiply' instead.::

@experimental(since='v.1', current='multiply')
def exp_multiply(arg1, arg2):
print arg1, '*', arg2, '(the experimental way)=',
print(arg1, '*', arg2, '(the experimental way)=', end=' ')
return (arg1*arg2)*(arg1/arg2)*(arg2/arg1)

# Set a warning filter to control how often warnings are produced.::

warnings.simplefilter("always")
print multiply(5, 6)
print old_multiply(5,6)
print exp_multiply(5,6)
print(multiply(5, 6))
print(old_multiply(5,6))
print(exp_multiply(5,6))
"""

from __future__ import absolute_import
Expand Down