fix: Update model_validator to use instance method signature (Pydantic v2.12 deprecation) by WhiteLotusLA · Pull Request #5825 · feast-dev/feast
Pydantic v2.12 deprecated using @model_validator(mode='after') with a classmethod-style signature (cls, values). This change updates the _validate_credentials method to use the correct instance method signature (self), which: - Eliminates the deprecation warning - Uses direct attribute access (self.username) instead of dict access - Returns self instead of values This is a non-breaking change that maintains the same validation logic while conforming to Pydantic v2.12+ best practices. Fixes deprecation warning: 'Using @model_validator with mode="after" on a classmethod is deprecated' Signed-off-by: WhiteLotusLA <calvin.devereaux@gmail.com>
ntkathole
changed the title
fix: update model_validator to use instance method signature (Pydantic v2.12 deprecation)
fix: Update model_validator to use instance method signature (Pydantic v2.12 deprecation)
kyledepasquale pushed a commit to kyledepasquale/feast that referenced this pull request
YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request
…c v2.12 deprecation) (feast-dev#5825) fix: update model_validator to use instance method signature Pydantic v2.12 deprecated using @model_validator(mode='after') with a classmethod-style signature (cls, values). This change updates the _validate_credentials method to use the correct instance method signature (self), which: - Eliminates the deprecation warning - Uses direct attribute access (self.username) instead of dict access - Returns self instead of values This is a non-breaking change that maintains the same validation logic while conforming to Pydantic v2.12+ best practices. Fixes deprecation warning: 'Using @model_validator with mode="after" on a classmethod is deprecated' Signed-off-by: WhiteLotusLA <calvin.devereaux@gmail.com> Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
jyejare pushed a commit to opendatahub-io/feast that referenced this pull request
…c v2.12 deprecation) (feast-dev#5825) fix: update model_validator to use instance method signature Pydantic v2.12 deprecated using @model_validator(mode='after') with a classmethod-style signature (cls, values). This change updates the _validate_credentials method to use the correct instance method signature (self), which: - Eliminates the deprecation warning - Uses direct attribute access (self.username) instead of dict access - Returns self instead of values This is a non-breaking change that maintains the same validation logic while conforming to Pydantic v2.12+ best practices. Fixes deprecation warning: 'Using @model_validator with mode="after" on a classmethod is deprecated' Signed-off-by: WhiteLotusLA <calvin.devereaux@gmail.com>
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