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
u
a fake unicode literal - Removed use of
b
a fake bytes literal - Removed
PY3
a boolean indicating if the code is running on Python 3 text_type
type for representing (Unicode) textual data -->str
iteritems
returns an iterator over dictionary’s items -->items
string_types
possible 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 urlencode
izip
-->zip
- twilio/jwt/compat.py
- Removed
compat.compare_digest
- Removed
- twilio/jwt/init.py
- Removed import for
simplejson
andjson
- 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")