Repository navigation
Conversation
7ab58e8 to
ac075bb
Compare
| from typing import Protocol, TypedDict | ||
|
|
||
| from smithy_core.aio.interfaces.identity import IdentityResolver | ||
| from smithy_core.aio.interfaces.identity import AsyncIdentityResolver |
There was a problem hiding this comment.
This still makes the root AWSCredentialsResolver depend on AsyncIdentityResolver. I think the async alias should live under aio.identity, with the root name reserved for sync
| from typing import Any | ||
|
|
||
| from smithy_core.aio.interfaces.identity import IdentityResolver | ||
| from smithy_core.aio.interfaces.identity import AsyncIdentityResolver |
There was a problem hiding this comment.
Same dependency direction issue here. Could this type avoid depending on either mode so the root package never imports from aio?
| "AwsConfigOverrides", | ||
| "DefaultFileSystem", | ||
| "FileSystem", | ||
| "SharedConfigContext", |
There was a problem hiding this comment.
These are async-specific too- should they get Async names while we’re establishing the split?
| @@ -0,0 +1,29 @@ | |||
| # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
| # SPDX-License-Identifier: Apache-2.0 | |||
| from .chain import IdentityChain | |||
There was a problem hiding this comment.
IdentityChain and the resolver/provider classes are async too, but only AsyncStaticCredentialsResolver got renamed
|
|
||
|
|
||
| class StandardRegionalEndpointsResolver(EndpointResolver): | ||
| class StandardRegionalEndpointsResolver(AsyncEndpointResolver): |
There was a problem hiding this comment.
Should this be AsyncStandardRegionalEndpointsResolver so the unprefixed name stays available for the sync implementation?
| from smithy_core.aio.interfaces.auth import EventSigner | ||
| from smithy_core.aio.interfaces.eventstream import EventPublisher, EventReceiver | ||
| from smithy_core.aio.interfaces.identity import IdentityResolver | ||
| from smithy_core.aio.interfaces.auth import AsyncEventSigner |
There was a problem hiding this comment.
Can we get a changelog entry for this change too?
ac075bb to
4d4dc46
Compare
- Place static/environment resolvers at root (sync, canonical) with aio Async-prefixed twins that delegate to the sync component; async imports sync, never the reverse. - Retarget root identity.components.AWSCredentialsResolver and IdentityResolverFailure.resolver off aio (generic sync IdentityResolver / mode-neutral), removing the root->aio import inversion. - Async-prefix the genuinely-async credential resolver/provider family (Container/IMDS/Process resolvers, IdentityChain, the 5 chain providers) reserving bare names for sync twins; update entry points. - Rename aio config FileSystem/DefaultFileSystem/SharedConfigContext to Async*, and the public config functions to the _async suffix (load_config_async, parse_config_file_async). - Rename StandardRegionalEndpointsResolver -> AsyncStandardRegionalEndpointsResolver. - Update codegen symbols (AsyncIdentityChain, AsyncFileSystem, AsyncStandardRegionalEndpointsResolver), regenerate protocol-test goldens and the api-snapshot. - Add smithy-aws-event-stream changelog fragment.
The aws-sdk-python integration-test harness (hand-written, not regenerated by codegen) still imports HTTPClient from smithy_http.aio.interfaces, which commit 1 renamed to AsyncHTTPClient. Restore the old name as an alias so the downstream package tests pass; remove once the SDK harness is updated (see TODO(sync-renames)).
The aws-sdk-python integration-test harness (hand-written) imports DuplexEventStream/InputEventStream/OutputEventStream from smithy_core.aio.eventstream, which commit 1 renamed to the Async* forms. Restore the old names as aliases so the downstream package tests pass; remove once the SDK harness is updated (see TODO(sync-renames)).
The shipped public path smithy_aws_core.identity.EnvironmentCredentialsResolver is awaited by the async client pipeline, and aws-sdk-python's hand-written integration harness imports it from there and passes it to an async client. Re-export the async resolver under the bare name so that contract holds; the sync twin stays at .environment. Marked TODO(sync-api) -- this re-export is the pre-existing root->aio dependency the branch defers, to be repointed when the SDK harness adopts an async-aware resolver.
Move interface names to allow separation of sync and async interfaces.
This is the movement rule:
Anything that will have a sync/sync dual interface will exist at
path+aio/path.file.py(root) or some other file at the root will contain shared sync logic.aio/file.pymay import fromfile.py, butfile.pywill never import itsaiopartner.Reviewers
The git diff shows added classes and deleted classes, but know that:
You only need to look at the names and file locations.
Furthermore, all placeholders are marked with the searchable string
TODO(sync-api). There are 21 of these in this PR.