◐ Shell
clean mode source ↗

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 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)

Jan 11, 2026

@WhiteLotusLA

ntkathole

kyledepasquale pushed a commit to kyledepasquale/feast that referenced this pull request

Jan 21, 2026

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026
…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>

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026

jyejare pushed a commit to opendatahub-io/feast that referenced this pull request

Mar 9, 2026
…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>

jyejare pushed a commit to opendatahub-io/feast that referenced this pull request

Mar 9, 2026