Skip to content

Commit

Permalink
Drop support for Python 2.7 (EOL) (#192)
Browse files Browse the repository at this point in the history
* Drop support for Python 2 and EOL Python 3.X versions

* Update README

- Drop support for Python 2
- Drop support for EOL Python 3.x versions
- Update PyPy version

* change print statement to function
  • Loading branch information
smaeda-ks committed Dec 1, 2019
1 parent b9eef14 commit d239bd8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ branches:
matrix:
fast_finish: true
include:
- python: 2.7
script: python setup.py flake8 && python setup.py test
- python: 3.5
script: python setup.py flake8 && python setup.py test
- python: 3.6
Expand All @@ -20,4 +18,4 @@ matrix:
- python: pypy
script: python setup.py flake8 && python setup.py test
- python: pypy3
script: python setup.py flake8 && python setup.py test
script: python setup.py flake8 && python setup.py test
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ For more help please see our `Examples and Guides`_ or check the online
Compatibility & Versioning
--------------------------

This project is designed to work with Python 2.7 or greater. While it
This project is designed to work with Python 3.5 or greater. While it
may work on other version of Python, below are the platform and runtime
versions we officially support and regularly test against.

+------------+-------------------------+
| Platform | Versions |
+============+=========================+
| CPython | 2.7, 3.5, 3.6, 3.7 |
| CPython | 3.5, 3.6, 3.7 |
+------------+-------------------------+
| PyPy | 7.x |
+------------+-------------------------+
Expand Down
2 changes: 1 addition & 1 deletion examples/account_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
line_item_id = account.line_items().first.id

# retrive the `id` of the media creative associated with a line item
print account.media_creatives().first.id
print(account.media_creatives().first.id)

# retrieve the `id` of the first account media associated with the account
account_media_id = account.account_media().first.id
Expand Down
10 changes: 5 additions & 5 deletions examples/cards_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

# fetch by card_uri
card = CardsFetch.load(account, card_uris=[card_uri]).first
print card
print card.card_type
print card.id
print(card)
print(card.card_type)
print(card.id)

# fetch by card id
same_card = CardsFetch.load(account, card_id=card.id)
print same_card.card_type
print same_card.card_uri
print(same_card.card_type)
print(same_card.card_uri)
2 changes: 1 addition & 1 deletion examples/manual_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
print(response.body['data'][0])
except Error as e:
# see twitter_ads.error for more details
print e.details
print(e.details)
raise

# you can also manually construct requests to be
Expand Down
2 changes: 1 addition & 1 deletion examples/tailored_audience.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
# update the tailored audience
success_count, total_count = audience.users(user)
if success_count == total_count:
print "Successfully added {total_count} users".format(total_count=total_count)
print(("Successfully added {total_count} users").format(total_count=total_count))
6 changes: 3 additions & 3 deletions examples/video_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#grab the video_id from the response
video_id = video.id
print video_id
print(video_id)

account_media = AccountMedia(account)
account_media.video_id = video_id
Expand Down Expand Up @@ -76,7 +76,7 @@
response = Request(client, 'post', resource, params=params).perform()
except Error as e:
# see twitter_ads.error for more details
print e.details
print(e.details)
raise

resource = '/' + API_VERSION + '/batch/accounts/18ce54bgxky/targeting_criteria'.format(account_id=account.id)
Expand Down Expand Up @@ -106,7 +106,7 @@
response = Request(client, 'post', resource, params=params).perform()
except Error as e:
# see twitter_ads.error for more details
print e.details
print(e.details)
raise

# unpause the campaign
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def get_version(version_tuple):
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down

0 comments on commit d239bd8

Please sign in to comment.