Skip to content

Conversation

@franciscojavierarceo
Copy link
Member

What this PR does / why we need it:

Make value_type for Entity issue a warning if not set. Next release we'll make it mandatory.

Which issue(s) this PR fixes:

#4670

Misc

devin-ai-integration bot and others added 2 commits December 11, 2024 03:47
- Add deprecation warning when value_type is not specified for an entity
- Add test cases to verify deprecation warning behavior
- Prepare for making value_type mandatory in next release

Issue: feast-dev#4670

Co-Authored-By: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Reorder imports according to PEP8
- Group standard library imports together
- Fix ruff linting issues

Co-Authored-By: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
warnings.warn(
"Entity value_type will be mandatory in the next release. "
"Please specify a value_type for entity '%s'." % name,
DeprecationWarning,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeprecationWarning:

Base class for warnings about deprecated features when those warnings are intended for other Python developers.

Ignored by the default warning filters, except in the main module (PEP 565). Enabling the Python Development Mode shows this warning.

FutureWarning

Base class for warnings about deprecated features when those warnings are intended for end users of applications that are written in Python.

I think DeprecationWarning is a reasonable choice but I could see both ways. Devin chose the former. 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can’t see any deprecation actually, but if Devin will become the main maintainer, that’s fine 🤷🏻‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to force it next release.

@dmartinol dmartinol merged commit b8ede2a into feast-dev:master Dec 11, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants