Skip to content

Bug Report: Incorrect Protobuf Version Compatibility #5457

@misohu

Description

@misohu

Bug Report: Incorrect Protobuf Version Compatibility

Expected Behavior

Feast should work correctly when installed into an environment with protobuf==4.25.6, as allowed by its pyproject.toml specification (protobuf >=3.20.3,<7), or it should explicitly declare the minimum version of protobuf it requires to function.

Current Behavior

Feast fails to import with the following error:

ImportError: cannot import name 'runtime_version' from 'google.protobuf'

This happens when using protobuf==4.25.6, even though that version satisfies the declared range. The runtime_version attribute is only available in protobuf>=5.24.0, indicating that Feast requires a higher version than it currently declares.

Steps to Reproduce

  1. Create a new Python environment (Python 3.11 used here, but Python 3.10 may also be affected).
  2. Install protobuf==4.25.6.
  3. Install Feast: pip install feast.
  4. Try to import:
from feast import FeatureStore

You’ll see this error:

ImportError: cannot import name 'runtime_version' from 'google.protobuf'

Specifications

  • Feast Version: Latest (as of June 2025)
  • Python Version: 3.10.14
  • Protobuf Version: 4.25.6
  • Platform: Linux (Conda / Jupyter Notebook)
  • Subsystem: pip, Python environment

Possible Solution

Update the protobuf dependency in pyproject.toml to reflect the actual minimum version required. Based on usage of google.protobuf.runtime_version, the correct constraint should likely be:

protobuf = ">=6.30.2,<7"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions