File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -687,28 +687,6 @@ def activate(self) -> None:
687687 """
688688 _awscrt .http_client_stream_activate (self )
689689
690- def write_data (self ,
691- data_stream : Union [InputStream , Any ],
692- end_stream : bool = False ) -> "concurrent.futures.Future" :
693- '''Write data to the HTTP/1.1 request body.
694-
695- The stream must have been created with ``manual_write=True`` and
696- :meth:`activate()` must have been called before using this method.
697-
698- This method supersedes the deprecated ``write_chunk`` API.
699- Use ``write_data()`` for all manual body writes on both HTTP/1.1
700- and HTTP/2 streams.
701-
702- Args:
703- data_stream: Data to write. Wrapped in :class:`~awscrt.io.InputStream` if
704- needed. ``None`` sends zero bytes.
705- end_stream (bool): ``True`` if this is the last write.
706-
707- Returns:
708- concurrent.futures.Future: Completes with ``None`` on success.
709- '''
710- return super ().write_data (data_stream , end_stream )
711-
712690
713691class Http2ClientStream (HttpClientStreamBase ):
714692 __slots__ = ('_remote_end_stream_future' ,)
Original file line number Diff line number Diff line change @@ -1073,12 +1073,12 @@ def test_h1_write_data_with_body_stream_raises(self):
10731073
10741074 request = HttpRequest ('PUT' , '/write_data_guard' , body_stream = BytesIO (b'body' ))
10751075 request .headers .add ('host' , self .hostname )
1076- request .headers .add ('Content-Length' , '4' )
10771076
1078- with self . assertRaises ( ValueError ) as ctx :
1077+ try :
10791078 connection .request (request , manual_write = True )
1080-
1081- self .assertIn ('body_stream' , str (ctx .exception ))
1079+ self .fail ("Expected ValueError from request()" )
1080+ except ValueError as e :
1081+ self .assertIn ('manual data writes' , str (e ))
10821082
10831083 connection .close ().result (self .timeout )
10841084 finally :
You can’t perform that action at this time.
0 commit comments