Skip to content

Update 1.21.1 in version.py and RELEASE.md#69

Draft
vkarampudi wants to merge 8 commits into
tensorflow:r1.21.0from
vkarampudi:r1.21.0
Draft

Update 1.21.1 in version.py and RELEASE.md#69
vkarampudi wants to merge 8 commits into
tensorflow:r1.21.0from
vkarampudi:r1.21.0

Conversation

@vkarampudi

@vkarampudi vkarampudi commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Align protobuf dependency with compiled version and bump to 1.21.1

Description

This PR resolves a critical dependency mismatch introduced in the v1.21.0 release (Issue #68).

In v1.21.0, TFMD's build configuration (WORKSPACE) was upgraded to compile all C++ extensions against protobuf 6.31.1. However, setup.py still permitted older runtime versions of the protobuf package (e.g., protobuf>=4.25.2). When users installed the library, pip could resolve to an older protobuf runtime package, causing immediate startup and runtime crashes due to Protobuf C++ ABI/version mismatch checks (e.g., google::protobuf::internal::VerifyVersion(...) aborting the process).

To fix this, this PR:

  1. Global Protobuf Requirement Alignment: Sets the protobuf package dependency in setup.py to protobuf>=6.31.1,<7 globally across all supported Python versions (>= 3.10).
    • Why >=6.31.1: Since the C++ extensions in the wheels are compiled against 6.31.1, the runtime package version must be at least 6.31.1 to pass Protobuf's strict runtime verification checks and avoid process crashes.
    • Why <7: Adds an upper bound to prevent breaking ABI changes from future major protobuf releases.
    • Cleaned up Environment Markers: Completely removes the out-of-date conditional Python-version-specific requirements for protobuf, making the configuration much cleaner.
  2. Release Preparation:
    • Bumps version to 1.21.1 in tensorflow_metadata/version.py.
    • Adds the release notes for 1.21.1 in RELEASE.md following the standard section structure.

Changes

  • setup.py: Simplified and updated the global protobuf requirement to protobuf>=6.31.1,<7.
  • tensorflow_metadata/version.py: Bumped __version__ from "1.21.0" to "1.21.1".
  • RELEASE.md: Added release notes and standard sections for v1.21.1.

Verification & Testing

  1. Local Wheel Building: Verified that python setup.py bdist_wheel builds and packages the library successfully with the new version and dependencies.
  2. Pre-commit Checks: Ran pre-commit run --all-files locally; all linting, formatting (ruff), and sanity checks passed.
  3. Python Test Suite: Ran the python test suite via pytest (python -m pytest), confirming that all tests (including dynamic proto loading) pass perfectly.
  4. Ecosystem Compatibility Verification:
    • TensorFlow 2.21.0: Verified via pip install dry-run that tensorflow==2.21.0 and our local tensorflow-metadata==1.21.1 wheel resolve perfectly together without conflicts.
    • TensorFlow 2.18.0 (Older series): Confirmed that pip correctly flags a conflict as expected (since older TF versions use the previous protobuf epoch), preventing runtime ABI crashes for users.

@vkarampudi vkarampudi changed the title R1.21.0 Update 1.21.1 in version.py and RELEASE.md Jun 22, 2026
@vkarampudi vkarampudi closed this Jun 22, 2026
@vkarampudi vkarampudi reopened this Jun 22, 2026
@vkarampudi vkarampudi marked this pull request as draft June 22, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant