Skip to content

fix: allow protobuf 7.x#815

Merged
Lash-L merged 1 commit intoPython-roborock:mainfrom
bdraco:bump-protobuf-8-cap
Apr 22, 2026
Merged

fix: allow protobuf 7.x#815
Lash-L merged 1 commit intoPython-roborock:mainfrom
bdraco:bump-protobuf-8-cap

Conversation

@bdraco
Copy link
Copy Markdown
Contributor

@bdraco bdraco commented Apr 22, 2026

Widens the protobuf upper bound so downstream projects can use protobuf 7 alongside python-roborock; the generated pb2 modules remain compatible with the 7.x runtime per the protobuf cross version policy.

Home Assistant is bumping to protobuf 7.34.1 and currently cannot resolve dependencies against python-roborock 5.x; see home-assistant/core#168811.

Copilot AI review requested due to automatic review settings April 22, 2026 11:24
Copy link
Copy Markdown
Collaborator

@Lash-L Lash-L left a comment

Choose a reason for hiding this comment

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

Thanks @bdraco!

@Lash-L Lash-L merged commit 072767f into Python-roborock:main Apr 22, 2026
9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to unblock downstream consumers (notably Home Assistant) by widening python-roborock’s declared protobuf runtime compatibility range to include protobuf 7.x.

Changes:

  • Relax protobuf dependency upper bound from <7 to <8 in project dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
"paho-mqtt>=1.6.1,<3.0.0",
"construct>=2.10.57,<3",
"protobuf>=6.31.1,<7",
"protobuf>=6.31.1,<8",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The checked-in generated module roborock/map/proto/b01_scmap_pb2.py was generated with Protobuf Python 6.31.1 and calls google.protobuf.runtime_version.ValidateProtobufRuntimeVersion(…, 6, 31, 1, …) at import time. Widening the runtime constraint to <8 may allow protobuf 7.x installs that fail at import time if the runtime version validator rejects major-version mismatches. Please verify protobuf 7.x compatibility end-to-end; if it fails, regenerate the pb2 with a protobuf 7.x compiler (or otherwise align/remove the runtime version check) and adjust the constraint accordingly.

Suggested change
"protobuf>=6.31.1,<8",
"protobuf>=6.31.1,<7",

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
"paho-mqtt>=1.6.1,<3.0.0",
"construct>=2.10.57,<3",
"protobuf>=6.31.1,<7",
"protobuf>=6.31.1,<8",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

This change claims protobuf 7.x compatibility but CI/tests currently run against whatever is pinned in uv.lock (likely protobuf 6.x). Consider adding a test/CI run that explicitly installs protobuf 7.x (e.g., a matrix entry or an override) to ensure the generated pb2 module imports and map parsing tests pass under 7.x.

Copilot uses AI. Check for mistakes.
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.

3 participants