diff --git a/singer_sdk/helpers/_catalog.py b/singer_sdk/helpers/_catalog.py index 49ea2f1cc..39df3f0f1 100644 --- a/singer_sdk/helpers/_catalog.py +++ b/singer_sdk/helpers/_catalog.py @@ -10,8 +10,6 @@ from singer_sdk.helpers._typing import is_object_type if t.TYPE_CHECKING: - from logging import Logger - from singer_sdk._singerlib import Catalog, SelectionMask _MAX_LRU_CACHE = 500 @@ -22,11 +20,10 @@ def get_selected_schema( stream_name: str, schema: dict, mask: SelectionMask, - logger: Logger, ) -> dict: """Return a copy of the provided JSON schema, dropping any fields not selected.""" new_schema = deepcopy(schema) - _pop_deselected_schema(new_schema, mask, stream_name, (), logger) + _pop_deselected_schema(new_schema, mask, stream_name, ()) return new_schema @@ -35,7 +32,6 @@ def _pop_deselected_schema( mask: SelectionMask, stream_name: str, breadcrumb: tuple[str, ...], - logger: Logger, ) -> None: """Remove anything from schema that is not selected. @@ -75,7 +71,6 @@ def _pop_deselected_schema( mask, stream_name, property_breadcrumb, - logger, ) @@ -83,7 +78,6 @@ def pop_deselected_record_properties( record: dict[str, t.Any], schema: dict, mask: SelectionMask, - logger: Logger, breadcrumb: tuple[str, ...] = (), ) -> None: """Remove anything from record properties that is not selected. @@ -104,7 +98,6 @@ def pop_deselected_record_properties( val, schema, mask, - logger, property_breadcrumb, ) diff --git a/singer_sdk/mapper.py b/singer_sdk/mapper.py index aeea46812..d3cd9400d 100644 --- a/singer_sdk/mapper.py +++ b/singer_sdk/mapper.py @@ -657,7 +657,6 @@ def register_raw_streams_from_catalog(self, catalog: Catalog) -> None: catalog_entry.stream or catalog_entry.tap_stream_id, catalog_entry.schema.to_dict(), catalog_entry.metadata.resolve_selection(), - self.logger, ), catalog_entry.key_properties, ) diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index 36af0c125..064b78361 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -827,7 +827,7 @@ def _generate_record_messages( Yields: Record message objects. """ - pop_deselected_record_properties(record, self.schema, self.mask, self.logger) + pop_deselected_record_properties(record, self.schema, self.mask) record = conform_record_data_types( stream_name=self.name, record=record, diff --git a/singer_sdk/streams/sql.py b/singer_sdk/streams/sql.py index 29946e78c..47d015f9d 100644 --- a/singer_sdk/streams/sql.py +++ b/singer_sdk/streams/sql.py @@ -154,7 +154,6 @@ def get_selected_schema(self) -> dict: stream_name=self.name, schema=self.schema, mask=self.mask, - logger=self.logger, ) # Get records from stream diff --git a/tests/core/test_catalog_selection.py b/tests/core/test_catalog_selection.py index f6653c25e..d4b30cecb 100644 --- a/tests/core/test_catalog_selection.py +++ b/tests/core/test_catalog_selection.py @@ -197,12 +197,7 @@ def test_schema_selection( stream_name: str, ): """Test that schema selection rules are correctly applied to SCHEMA messages.""" - selected_schema = get_selected_schema( - stream_name, - schema, - mask, - logging.getLogger(), - ) + selected_schema = get_selected_schema(stream_name, schema, mask) assert ( selected_schema["properties"] == PropertiesList( @@ -247,7 +242,6 @@ def test_record_property_pop( record=record_pop, schema=schema, mask=mask, - logger=logging.getLogger(), breadcrumb=(), ) diff --git a/tests/samples/test_tap_countries.py b/tests/samples/test_tap_countries.py index 31e0b8666..a302e646a 100644 --- a/tests/samples/test_tap_countries.py +++ b/tests/samples/test_tap_countries.py @@ -5,7 +5,6 @@ import copy import io import json -import logging import typing as t from contextlib import redirect_stdout @@ -89,7 +88,6 @@ def test_with_catalog_entry(): record=copied_record, schema=stream.schema, mask=stream.mask, - logger=logging.getLogger(), ) assert copied_record == record @@ -97,7 +95,6 @@ def test_with_catalog_entry(): stream_name=stream.name, schema=stream.schema, mask=stream.metadata.resolve_selection(), - logger=logging.getLogger(), ) assert new_schema == stream.schema