From a1683503b3a9457b9d94e1d8e55507020d084a54 Mon Sep 17 00:00:00 2001 From: Yevhenii Kurochkin Date: Wed, 1 Nov 2023 12:23:52 +0000 Subject: [PATCH 1/2] CDK: Fix class for SessionTokenAuthenticator for CLASS_TYPES_REGISTRY mapper --- .../sources/declarative/parsers/class_types_registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py b/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py index 90f7335de004..2ced35c48bae 100644 --- a/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py +++ b/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py @@ -10,7 +10,7 @@ ApiKeyAuthenticator, BasicHttpAuthenticator, BearerAuthenticator, - SessionTokenAuthenticator, + LegacySessionTokenAuthenticator, ) from airbyte_cdk.sources.declarative.checks import CheckStream from airbyte_cdk.sources.declarative.datetime.min_max_datetime import MinMaxDatetime @@ -96,7 +96,7 @@ "SimpleRetriever": SimpleRetriever, "Spec": Spec, "SubstreamPartitionRouter": SubstreamPartitionRouter, - "SessionTokenAuthenticator": SessionTokenAuthenticator, + "SessionTokenAuthenticator": LegacySessionTokenAuthenticator, "WaitUntilTimeFromHeader": WaitUntilTimeFromHeaderBackoffStrategy, "WaitTimeFromHeader": WaitTimeFromHeaderBackoffStrategy, } From 75dead34d7aa66532692d7ab2458d7237e130e91 Mon Sep 17 00:00:00 2001 From: Yevhenii Kurochkin Date: Wed, 1 Nov 2023 12:41:13 +0000 Subject: [PATCH 2/2] Fix mypy --- .../sources/declarative/parsers/class_types_registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py b/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py index 2ced35c48bae..11fc12b2c3f4 100644 --- a/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py +++ b/airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/class_types_registry.py @@ -2,7 +2,7 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from typing import Mapping, Type +from typing import Mapping from airbyte_cdk.sources.declarative.auth.declarative_authenticator import NoAuth from airbyte_cdk.sources.declarative.auth.oauth import DeclarativeOauth2Authenticator @@ -56,7 +56,7 @@ """ CLASS_TYPES_REGISTRY contains a mapping of developer-friendly string -> class to abstract the specific class referred to """ -CLASS_TYPES_REGISTRY: Mapping[str, Type] = { +CLASS_TYPES_REGISTRY: Mapping[str, type] = { "AddedFieldDefinition": AddedFieldDefinition, "AddFields": AddFields, "ApiKeyAuthenticator": ApiKeyAuthenticator,