MAJOR version bumps will have upgrade notes
posted here.
Version 7.x.x is the first version that officially drops support for Python versions 2.7, 3.4, and 3.5.
- Six
- Removed use of
ua fake unicode literal - Removed use of
ba fake bytes literal - Removed
PY3a boolean indicating if the code is running on Python 3 text_typetype for representing (Unicode) textual data -->striteritemsreturns an iterator over dictionary’s items -->itemsstring_typespossible types for text data like basestring() in Python 2 and str in Python 3.-->str
- Removed use of
- twilio/compat.py
from twilio.compat import urlencode-->from urllib.parse import urlencodeizip-->zip
- twilio/jwt/compat.py
- Removed
compat.compare_digest
- Removed
- twilio/jwt/init.py
- Removed import for
simplejsonandjson
- Removed import for
// 6.x.x
from twilio.jwt.access_token import AccessToken
token.to_jwt(algorithm='HS512')// 7.x.x
from twilio.jwt.access_token import AccessToken
token.to_jwt()This was changed to add support for sending media in Chat messages, users can now either provide a body or a media_sid.
from twilio.rest import Client
client = Client('AC123', 'auth')
client.chat.v2.services('IS123').channels('CH123').messages.create("this is the body")from twilio.rest import Client
client = Client('AC123', 'auth')
client.chat.v2.services('IS123').channels('CH123').messages.create(body="this is the body")