Tweak protobuf requirements

Motivated by https://forums.ankiweb.net/t/python-anki-sync-server-broken/64069

From https://protobuf.dev/support/cross-version-runtime-guarantee/:
"Python-specific Guarantees
Since the 3.20.0 release, the Protobuf Python generated code became a thin wrapper around an embedded FileDescriptorProto. Because these protos are supported on extremely long timeframes, our usual major version compatibility windows aren’t typically necessary.

Python may break generated code compatibility in specific future major version releases, but it will be coupled with poison pill warnings and errors in advance. As of 6.32.0, all generated code since 3.20.0 will be supported until at least 8.x.y."
This commit is contained in:
Damien Elmes 2025-07-16 14:14:50 +07:00
parent e77cd791de
commit 37fe704326
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ dependencies = [
"decorator",
"markdown",
"orjson",
"protobuf>=4.21",
"protobuf>=6.0,<8.0",
"requests[socks]",
# remove after we update to min python 3.11+
"typing_extensions",

View file

@ -66,7 +66,7 @@ requires-dist = [
{ name = "distro", marker = "sys_platform != 'darwin' and sys_platform != 'win32'" },
{ name = "markdown" },
{ name = "orjson" },
{ name = "protobuf", specifier = ">=4.21" },
{ name = "protobuf", specifier = ">=6.0,<8.0" },
{ name = "requests", extras = ["socks"] },
{ name = "typing-extensions" },
]