Skip to content

Commit 96f7dae

Browse files
committed
change crt_http_base back to crt_http
1 parent b68df1b commit 96f7dae

File tree

1 file changed

+7
-7
lines changed
  • packages/smithy-http/src/smithy_http/aio

1 file changed

+7
-7
lines changed

packages/smithy-http/src/smithy_http/aio/crt.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
# pyright doesn't like optional imports. This is reasonable because if we use these
1212
# in type hints then they'd result in runtime errors.
1313
# TODO: add integ tests that import these without the dependendency installed
14-
from awscrt import http as crt_http_base
14+
from awscrt import http as crt_http
1515
from awscrt import io as crt_io
1616
from awscrt.aio.http import (
1717
AIOHttpClientConnectionUnified,
1818
AIOHttpClientStreamUnified,
1919
)
2020

2121
try:
22-
from awscrt import http as crt_http_base
22+
from awscrt import http as crt_http
2323
from awscrt import io as crt_io
2424
from awscrt.aio.http import (
2525
AIOHttpClientConnectionUnified,
@@ -242,9 +242,9 @@ async def _validate_connection(
242242
* If ``force_http_2`` is enabled: Is the connection HTTP/2?
243243
"""
244244
force_http_2 = self._config.force_http_2
245-
if force_http_2 and connection.version is not crt_http_base.HttpVersion.Http2:
245+
if force_http_2 and connection.version is not crt_http.HttpVersion.Http2:
246246
await connection.close()
247-
negotiated = crt_http_base.HttpVersion(connection.version).name
247+
negotiated = crt_http.HttpVersion(connection.version).name
248248
raise SmithyHTTPError(f"HTTP/2 could not be negotiated: {negotiated}")
249249

250250
def _render_path(self, url: core_interfaces.URI) -> str:
@@ -254,7 +254,7 @@ def _render_path(self, url: core_interfaces.URI) -> str:
254254

255255
def _marshal_request(
256256
self, request: http_aio_interfaces.HTTPRequest
257-
) -> "crt_http_base.HttpRequest":
257+
) -> "crt_http.HttpRequest":
258258
"""Create :py:class:`awscrt.http.HttpRequest` from
259259
:py:class:`smithy_http.aio.HTTPRequest`"""
260260
headers_list: list[tuple[str, str]] = []
@@ -274,9 +274,9 @@ def _marshal_request(
274274
headers_list.append((fld.name, val))
275275

276276
path = self._render_path(request.destination)
277-
headers = crt_http_base.HttpHeaders(headers_list)
277+
headers = crt_http.HttpHeaders(headers_list)
278278

279-
crt_request = crt_http_base.HttpRequest(
279+
crt_request = crt_http.HttpRequest(
280280
method=request.method,
281281
path=path,
282282
headers=headers,

0 commit comments

Comments
 (0)