File tree Expand file tree Collapse file tree 11 files changed +1
-249
lines changed
azure-communication-callautomation
azure/communication/callautomation/_shared
azure-communication-chat/azure/communication/chat/_shared
azure-communication-email/azure/communication/email/_shared
azure-communication-identity/azure/communication/identity/_shared
azure-communication-jobrouter/azure/communication/jobrouter/_shared
azure-communication-messages/azure/communication/messages/_shared
azure-communication-phonenumbers/azure/communication/phonenumbers/_shared
azure-communication-rooms/azure/communication/rooms/_shared
azure-communication-sms/azure/communication/sms/_shared Expand file tree Collapse file tree 11 files changed +1
-249
lines changed Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change 30
30
HoldRequest ,
31
31
UnholdRequest ,
32
32
StartMediaStreamingRequest ,
33
- StopMediaStreamingRequest ,
34
- InterruptAudioAndAnnounceRequest
33
+ StopMediaStreamingRequest
35
34
)
36
35
from azure .communication .callautomation ._generated .models ._enums import RecognizeInputType , DtmfTone
37
36
from unittest .mock import Mock
Original file line number Diff line number Diff line change 15
15
PhoneNumberIdentifier ,
16
16
MediaStreamingOptions ,
17
17
MediaStreamingContentType ,
18
- MediaStreamingTransportType ,
19
18
MediaStreamingAudioChannelType ,
20
19
TranscriptionOptions ,
21
- TranscriptionTransportType ,
22
20
TextSource ,
23
21
RecognizeInputType ,
24
22
RecognitionChoice
@@ -215,7 +213,6 @@ def test_start_stop_media_streaming_in_a_call(self):
215
213
216
214
media_streaming_options = MediaStreamingOptions (
217
215
transport_url = self .transport_url ,
218
- transport_type = MediaStreamingTransportType .WEBSOCKET ,
219
216
content_type = MediaStreamingContentType .AUDIO ,
220
217
audio_channel_type = MediaStreamingAudioChannelType .MIXED ,
221
218
start_media_streaming = False )
@@ -277,7 +274,6 @@ def test_start_stop_transcription_in_call(self):
277
274
278
275
transcription_options = TranscriptionOptions (
279
276
transport_url = self .transport_url ,
280
- transport_type = TranscriptionTransportType .WEBSOCKET ,
281
277
locale = "en-US" ,
282
278
start_transcription = False )
283
279
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
Original file line number Diff line number Diff line change @@ -63,33 +63,6 @@ def _sign_request(self, request):
63
63
if parsed_url .query :
64
64
query_url += "?" + parsed_url .query
65
65
66
- # Need URL() to get a correct encoded key value, from "%3A" to ":", when transport is in type AioHttpTransport.
67
- # There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
68
- try :
69
- from yarl import URL
70
- from azure .core .pipeline .transport import ( # pylint:disable=non-abstract-transport-import
71
- AioHttpTransport ,
72
- )
73
-
74
- if (
75
- isinstance (request .context .transport , AioHttpTransport )
76
- or isinstance (
77
- getattr (request .context .transport , "_transport" , None ),
78
- AioHttpTransport ,
79
- )
80
- or isinstance (
81
- getattr (
82
- getattr (request .context .transport , "_transport" , None ),
83
- "_transport" ,
84
- None ,
85
- ),
86
- AioHttpTransport ,
87
- )
88
- ):
89
- query_url = str (URL (query_url ))
90
- except (ImportError , TypeError ):
91
- pass
92
-
93
66
if self ._decode_url :
94
67
query_url = urllib .parse .unquote (query_url )
95
68
You can’t perform that action at this time.
0 commit comments