<#3510 refactor: Deprecate `BasePageNumberPaginato...
# meltano-repo-activity
g
#3510 refactor: Deprecate `BasePageNumberPaginator` and `BaseOffsetPaginator` in favor of `PageNumberPaginator` and `OffsetPaginator`, respectively Pull request opened by edgarrmondragon These were made "base" classes with the expectation that users would override them, but #1918 made that redundant. Related • #1918 • #2989 • #3483 Summary by Sourcery Deprecate the base paginator classes in favor of concrete PageNumberPaginator and OffsetPaginator and update usages, tests, and docs accordingly. New Features: • Introduce PageNumberPaginator and OffsetPaginator as the primary paginator implementations for page-number and offset-based pagination. • Add a shared singer_sdk_deprecated decorator helper preconfigured with the SDK's deprecation warning type. Bug Fixes: • Tighten paginator-related tests by asserting concrete types and cleaning up header handling in header-based pagination tests. Enhancements: • Mark BasePageNumberPaginator and BaseOffsetPaginator as deprecated wrappers around the new paginator classes, exposing page_size as a property on OffsetPaginator. • Update REST stream examples, cookiecutter templates, and dummyjson tap client to use the new paginator classes and type hints, including explicit override annotations and typed Context usage. Documentation: • Revise pagination documentation and cookiecutter guidance to recommend PageNumberPaginator and OffsetPaginator, and add reference stubs for their API documentation. Tests: • Extend and adjust pagination tests to cover deprecation warnings for the base paginator classes and to use the new PageNumberPaginator and OffsetPaginator implementations. Summary by Sourcery Deprecate legacy base pagination classes in favor of concrete page-number and offset paginator implementations and update usages, tests, and docs accordingly. New Features: • Introduce PageNumberPaginator and OffsetPaginator as the primary page-number and offset-based paginator implementations. • Add a shared singer_sdk_deprecated helper preconfigured with the SDK's deprecation warning type for consistent deprecation messaging. Bug Fixes: • Tighten header-based and link-based pagination tests by asserting concrete types and correcting header handling edge cases. Enhancements: • Mark BasePageNumberPaginator and BaseOffsetPaginator as deprecated wrappers around the new paginator classes, exposing page_size as a property on OffsetPaginator. • Update REST stream examples, cookiecutter templates, and the dummyjson tap client to use the new paginator classes, override annotations, and typed Context parameters. Documentation: • Revise pagination guides and cookiecutter documentation to recommend PageNumberPaginator and OffsetPaginator and add API reference stubs for their classes. Tests: • Extend pagination tests to cover deprecation warnings for the base paginator classes and to exercise the new concrete paginator implementations. meltano/sdk