Skip to content

Commit 13a96ee

Browse files
authored
Removal of Python 2 support (#188)
1 parent 06dc126 commit 13a96ee

File tree

75 files changed

+120
-251
lines changed

Some content is hidden

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

75 files changed

+120
-251
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* 4.0.0:
2+
- Removing support for Python 2
3+
14
* 3.3.0:
25
- Google ads v2_2 release
36

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Features
1515

1616
Requirements
1717
------------
18-
* Python 2.7.13+ / 3.5.3+
19-
- **NOTE:** Python 2 support will cease by the end of 2019. See this `blog post`_ for more detail.
18+
* Python 3.6.7+
19+
- **NOTE:** Python 2 support has ceased as of v4.0. See this `blog post`_ for more detail.
2020
* `pip`_
2121

2222

examples/account_management/create_customer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
account.
2121
"""
2222

23-
from __future__ import absolute_import
2423

2524
import argparse
26-
import six
2725
import sys
2826
from datetime import datetime
2927

@@ -73,7 +71,7 @@ def main(client, manager_customer_id):
7371
parser = argparse.ArgumentParser(
7472
description=('Creates a new client under the given manager.'))
7573
# The following argument(s) should be provided to run the example.
76-
parser.add_argument('-m', '--manager_customer_id', type=six.text_type,
74+
parser.add_argument('-m', '--manager_customer_id', type=str,
7775
required=True, help='A Google Ads customer ID for the '
7876
'manager account under which the new customer will '
7977
'be created.')

examples/account_management/get_account_changes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616

1717
"""This example gets the changes in the account made in the last 7 days."""
1818

19-
from __future__ import absolute_import
2019

2120
import argparse
2221
import sys
2322

24-
import six
2523

2624
import google.ads.google_ads.client
2725

@@ -113,7 +111,7 @@ def main(client, customer_id):
113111
parser = argparse.ArgumentParser(
114112
description=('Displays account changes that occurred in the last 7 days.'))
115113
# The following argument(s) should be provided to run the example.
116-
parser.add_argument('-c', '--customer_id', type=six.text_type,
114+
parser.add_argument('-c', '--customer_id', type=str,
117115
required=True, help='The Google Ads customer ID.')
118116
args = parser.parse_args()
119117

examples/account_management/get_account_information.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
For example, its name, currency, time zone, etc.
1818
"""
1919

20-
from __future__ import absolute_import
2120

2221
import argparse
23-
import six
2422
import sys
2523

2624
import google.ads.google_ads.client
@@ -61,7 +59,7 @@ def main(client, customer_id):
6159
description=('Displays basic information about the specified '
6260
'customer\'s advertising account.'))
6361
# The following argument(s) should be provided to run the example.
64-
parser.add_argument('-c', '--customer_id', type=six.text_type,
62+
parser.add_argument('-c', '--customer_id', type=str,
6563
required=True, help='The Google Ads customer ID.')
6664
args = parser.parse_args()
6765

examples/account_management/link_manager_to_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
# limitations under the License.
1515
"""This example shows how to link a manager customer to a client customer."""
1616

17-
from __future__ import absolute_import
1817

1918
import argparse
20-
import six
2119
import sys
2220
import uuid
2321
from datetime import datetime, timedelta
@@ -104,9 +102,9 @@ def main(client, customer_id, manager_customer_id):
104102
description= ('Links and existing manager customer to an existing'
105103
'client customer'))
106104
# The following argument(s) should be provided to run the example.
107-
parser.add_argument('-c', '--customer_id', type=six.text_type,
105+
parser.add_argument('-c', '--customer_id', type=str,
108106
required=True, help='The customer ID.')
109-
parser.add_argument('-m', '--manager_customer_id', type=six.text_type,
107+
parser.add_argument('-m', '--manager_customer_id', type=str,
110108
required=True, help='The manager customer ID.')
111109
args = parser.parse_args()
112110

examples/account_management/list_accessible_customers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
documentation: https://developers.google.com/google-ads/api/docs/concepts/call-structure#login-customer-id
2121
"""
2222

23-
from __future__ import absolute_import
2423

2524
import sys
2625

examples/advanced_operations/add_ad_group_bid_modifier.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
To get ad group bid modifiers, run get_ad_group_bid_modifiers.py
1818
"""
1919

20-
from __future__ import absolute_import
2120

2221
import argparse
23-
import six
2422
import sys
2523

2624
import google.ads.google_ads.client
@@ -77,9 +75,9 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):
7775
description=('Adds an ad group bid modifier to the specified ad group '
7876
'ID, for the given customer ID.'))
7977
# The following argument(s) should be provided to run the example.
80-
parser.add_argument('-c', '--customer_id', type=six.text_type,
78+
parser.add_argument('-c', '--customer_id', type=str,
8179
required=True, help='The Google Ads customer ID.')
82-
parser.add_argument('-a', '--ad_group_id', type=six.text_type,
80+
parser.add_argument('-a', '--ad_group_id', type=str,
8381
required=True, help='The ad group ID.')
8482
parser.add_argument('-b', '--bid_modifier_value', type=float,
8583
required=False, default=1.5,

examples/advanced_operations/add_dynamic_page_feed.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
campaigns run basic_operations/get_campaigns.py.
2020
"""
2121

22-
from __future__ import absolute_import
2322

2423
import argparse
25-
import six
2624
import sys
2725
import uuid
2826
from datetime import datetime, timedelta
@@ -351,11 +349,11 @@ def add_dsa_targeting(client, customer_id, ad_group_resource_name, label):
351349
description= ('Adds a page feed with URLs for a Dynamic Search Ads '
352350
'Campaign.'))
353351
# The following argument(s) should be provided to run the example.
354-
parser.add_argument('-c', '--customer_id', type=six.text_type,
352+
parser.add_argument('-c', '--customer_id', type=str,
355353
required=True, help='The Google Ads customer ID.')
356-
parser.add_argument('-i', '--campaign_id', type=six.text_type,
354+
parser.add_argument('-i', '--campaign_id', type=str,
357355
required=True, help='The campaign ID.')
358-
parser.add_argument('-a', '--ad_group_id', type=six.text_type,
356+
parser.add_argument('-a', '--ad_group_id', type=str,
359357
required=True, help='The ad group ID.')
360358
args = parser.parse_args()
361359

examples/advanced_operations/add_dynamic_search_ads_campaign.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
To get campaigns, run basic_operations/get_campaigns.py
1818
"""
1919

20-
from __future__ import absolute_import
2120

2221
import argparse
23-
import six
2422
import sys
2523
from uuid import uuid4
2624
from datetime import datetime, timedelta
@@ -266,7 +264,7 @@ def add_webpage_criteria(client, customer_id, ad_group_resource_name):
266264
description=('Adds a Dynamic Search Ad campaign under the specified '
267265
'customer ID.'))
268266
# The following argument(s) should be provided to run the example.
269-
parser.add_argument('-c', '--customer_id', type=six.text_type,
267+
parser.add_argument('-c', '--customer_id', type=str,
270268
required=True, help='The Google Ads customer ID.')
271269
args = parser.parse_args()
272270

0 commit comments

Comments
 (0)