MAJOR version bumps will have upgrade notes
posted here.
-
Supported Python versions updated
- Dropped support for Python 3.6 (#632)
- Python 3.7 is the new required minimum version to use twilio-python helper library
-
Deletion of TwiML Voice Deprecated Methods (#643)
-
Refer.refer_sip()replaced byRefer.sip()
-
Say.ssml_break()replaced bySay.break_()Say.ssml_emphasis()replaced bySay.emphasis()Say.ssml_lang()replaced bySay.lang()Say.ssml_p()replaced bySay.p()Say.ssml_phoneme()replaced bySay.phoneme()Say.ssml_prosody()replaced bySay.prosody()Say.ssml_s()replaced bySay.s()Say.ssml_say_as()replaced bySay.say_as()Say.ssml_sub()replaced bySay.sub()Say.ssml_w()replaced bySay.w()
Old:
from twilio.twiml.voice_response import VoiceResponse resp = VoiceResponse() say = resp.say("Hello") say.ssml_emphasis("you")
New:
from twilio.twiml.voice_response import VoiceResponse resp = VoiceResponse() say = resp.say("Hello") say.emphasis("you")
-
-
JWT token building deprecations (#644)
ConversationsGranthas been deprecated in favor ofVoiceGrantIpMessagingGranthas been removed
-
twilio.rest.api.v2010.account.available_phone_numberhas been renamed totwilio.rest.api.v2010.account.available_phone_number_country -
TaskRouter Workers Statistics operations updated (#653)
-
Cumulative and Real-Time Workers Statistics no longer accept a WorkerSid
-
GET /v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatisticsOld:
client.taskrouter.v1.workspaces('WS...').workers('WK...).cumulative_statistics()New:
client.taskrouter.v1.workspaces('WS...').workers.cumulative_statistics() -
GET /v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatisticsOld:
client.taskrouter.v1.workspaces('WS...').workers('WK...).real_time_statistics()New:
client.taskrouter.v1.workspaces('WS...').workers.real_time_statistics()
-
-
Internal refactor of
instance._properties- Instance properties moved out of the generic
_propertiesdict (#696) - This is an implementation detail that should not be depended upon
- Instance properties moved out of the generic
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")