Skip to content

fix: Fix pandas 2.x compatibility issue of Trino offline store caused by removed Series.iteritems() method #5345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ebolblga
Copy link

@ebolblga ebolblga commented May 13, 2025

Description

This PR fixes an AttributeError encountered when using feast.get_historical_features() with Trino as offline store and pandas>=2.0.0, where Series.iteritems() has been removed. The code now uses row.items(), which is compatible with both older and newer pandas versions.

What this PR does / why we need it:

Feast with Trino as offline store currently breaks when used with pandas 2.x due to the removal of Series.iteritems(). This simple change ensures compatibility with modern pandas versions while retaining backwards compatibility with <2.0.0.
So users don't have to add pandas>=1.5.3,<2.0.0 to requirements.txt, this PR will replace iteritems() method with items() for pandas 2.x compatibility in Trino offline store connector.

Which issue(s) this PR fixes:

N/A — this issue was found independently and not yet tracked.

Misc

This PR ensures compatibility with pandas >= 0.23.0 when calling historical feature retrieval function with Trino offline store.
Realese note: Fix pandas 2.x compatibility issue of Trino offline store caused by removed Series.iteritems() method

@ebolblga ebolblga requested a review from a team as a code owner May 13, 2025 07:51
@@ -9,7 +9,7 @@

[![PyPI - Downloads](https://img.shields.io/pypi/dm/feast)](https://pypi.org/project/feast/)
[![GitHub contributors](https://img.shields.io/github/contributors/feast-dev/feast)](https://github.com/feast-dev/feast/graphs/contributors)
[![unit-tests](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml/badge.svg?branch=master&event=pull_request)](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml)
[![unit-tests](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml/badge.svg?branch=master)](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml)

Choose a reason for hiding this comment

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

Was this from the linter?

Copy link
Author

Choose a reason for hiding this comment

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

Yep, that's from commit hooks, I only changed upload.py file.

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.

3 participants