From e1b4e6fd89dc037185750f13613d8e4286712d98 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Nov 2026 09:34:54 +0530 Subject: [PATCH] fix(packaging): declare dependency floors the package actually works with - requires-python >=3.10: every protobuf 7.x release needs 3.10, so 3.9 installs failed with ResolutionImpossible. - grpcio >=1.63: the generated stubs pass _registered_method=True, which grpcio 1.60-1.62 reject with TypeError in PromptClient(). - protobuf >=7.35.1: the stubs are 7.35.1 gencode and the 7.35.0 runtime refuses to load them (VersionError). Fixes #13 Fixes #14 --- buf.gen.yaml | 2 +- pyproject.toml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index e2a85d2..8414c18 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -17,7 +17,7 @@ inputs: - directory: ../proto/proto plugins: # Pinned: v35.x emits gencode for protobuf 7.35, matching the - # protobuf>=7.35 floor in pyproject.toml. A newer plugin raises that floor. + # protobuf>=7.35.1 floor in pyproject.toml (gencode 7.35.1). A newer plugin raises that floor. - remote: buf.build/protocolbuffers/python:v35.1 out: . - remote: buf.build/grpc/python diff --git a/pyproject.toml b/pyproject.toml index 31e638e..0d7fdfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,17 +7,24 @@ name = "priompt-sdk" version = "0.7.1" description = "Python client for Priompt — versioned prompt serving over gRPC" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" # protobuf 7.x needs 3.10 license = "Apache-2.0" license-files = ["LICENSE"] authors = [{ name = "Priompt", email = "oss@priompt.com" }] keywords = ["prompts", "grpc", "llm", "prompt-management"] classifiers = [ "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", ] -dependencies = ["grpcio>=1.60", "protobuf>=7.35"] +# grpcio 1.63 is the first release whose channels accept the generated stubs' +# `_registered_method=True`; older ones raise TypeError in PromptClient(). +dependencies = ["grpcio>=1.63", "protobuf>=7.35.1"] # gencode is 7.35.1; older runtimes refuse it [project.optional-dependencies] nats = ["nats-py>=2.0"] # only needed for PromptClient.subscribe()