Remove deprecated source shims (transformer_klass, validator override)#107
Merged
Conversation
Three back-compat paths in backend/source.py were dead: - `BaseSource.transformer_klass` — no source overrides it; every connector passes transformer=. The None fallback now constructs BaseTransformer() directly. - `_SubclassValidatorShim` + `BaseParameterSource._validate_record` — the "override _validate_record instead of passing validator=" mechanism. Nothing overrides _validate_record, and every concrete parameter source receives a real validator via BaseAnalyteSource/BaseWaterLevelSource (WQP reaches them through its mixin MRO). Removed the shim and the stub; the validator default is now plain None and validation is skipped when absent (only the test fake / uninstantiated mixin hit that). No connector relied on either path. Full suite (311) + dg check defs clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Your pull request is automatically being deployed to Dagster Cloud.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tier 4 "remove deprecated shims" from
docs/cleanup-todo.md. Stacked on #105 (basechore/cleanup-3-3). Merge order: #101 → #102 → #103 → #104 → #105 → this.Removes three dead back-compat paths in
backend/source.py:BaseSource.transformer_klasstransformer=. Thetransformer=Nonefallback now buildsBaseTransformer()directly._SubclassValidatorShimvalidator=None. It delegated to_validate_record, which nothing overrides.BaseParameterSource._validate_record(stub)Verified safe before removing:
transformer_klassor overrides_validate_record(grep acrossbackend/).AnalyteRecordValidator/WaterLevelRecordValidator) viaBaseAnalyteSource/BaseWaterLevelSource.WQPParameterSourceis a mixin (no__init__);WQPAnalyteSource(WQPParameterSource, BaseAnalyteSource)reaches the real validator through MRO.validator=Nonecases (the test fake, the uninstantiated mixin) never validate;_extract_parameternow skips validation when_validator is None, andset_configguards it.No behavior change. Full suite 311 passed;
dg check defsclean; no dangling references to the removed symbols.🤖 Generated with Claude Code