Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected], [email protected], [email protected] Control: affects -1 + src:python-grpc-tools User: [email protected] Usertags: pu
Dear release team, I am requesting review for a stable update of the python-grpc-tools package. This is my first stable update request as a DD. [ Reason ] In a debian/patch we (the Python team) introduced a bug into python-grpc-tools described in Bug#1132763: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1132763 I believe that this is a regression big enough that it qualifies for a stable update. Especially since it comes from a patch we introduced in Debian. [ Impact ] If the update is not approved, packages that depend on python3-grpc-tools should still continue to work. However, library use-case such as described in #1132763 will not work in trixie and will only work in unstable (and soon testing) where the bug has been fixed. [ Tests ] The use-case described in #1132763 is manually run in a python3 interpreter. It is observed that the issue does happen without the fixed patch, and does not happen with the fixed patch. It shows that the original Debian patch is buggy and needs a variable rename to avoid shadowing the intended function. [ Risks ] Code is trivial, and the fix happens in the original buggy Debian patch. I do not see regression potential in the fix. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] * The patch is fixed to not shadow the function name with a variable name (cherry-picked from unstable). * The patch contains additional context lines from git format-patch: observe ++ and +- lines for changes to the patch itself. * The patch contains a new Co-authored-by line from the fixer of the bug. * The d/changelog file is updated for trixie-pu. * The debian/gbp.conf file is updated for trixie. Thanks.
diff -Nru python-grpc-tools-1.14.1/debian/changelog python-grpc-tools-1.14.1/debian/changelog --- python-grpc-tools-1.14.1/debian/changelog 2025-04-21 17:38:40.000000000 +0200 +++ python-grpc-tools-1.14.1/debian/changelog 2026-05-14 13:25:26.000000000 +0200 @@ -1,3 +1,12 @@ +python-grpc-tools (1.14.1-8+deb13u1) trixie; urgency=medium + + * Team upload. + + [ Theodore Tucker ] + * d/patches: Fix shadowed variable in grpc_tools/command.py (Closes: #1132763) + + -- Agathe Porte <[email protected]> Thu, 14 May 2026 13:25:26 +0200 + python-grpc-tools (1.14.1-8) unstable; urgency=medium * Team upload. diff -Nru python-grpc-tools-1.14.1/debian/gbp.conf python-grpc-tools-1.14.1/debian/gbp.conf --- python-grpc-tools-1.14.1/debian/gbp.conf 2025-04-21 12:44:58.000000000 +0200 +++ python-grpc-tools-1.14.1/debian/gbp.conf 2026-05-14 13:24:56.000000000 +0200 @@ -1,3 +1,3 @@ [DEFAULT] upstream-branch=upstream -debian-branch=master +debian-branch=trixie diff -Nru python-grpc-tools-1.14.1/debian/patches/replace-pkg_resources-with-importlib-and-packaging.patch python-grpc-tools-1.14.1/debian/patches/replace-pkg_resources-with-importlib-and-packaging.patch --- python-grpc-tools-1.14.1/debian/patches/replace-pkg_resources-with-importlib-and-packaging.patch 2025-04-21 16:18:34.000000000 +0200 +++ python-grpc-tools-1.14.1/debian/patches/replace-pkg_resources-with-importlib-and-packaging.patch 2026-05-14 13:24:14.000000000 +0200 @@ -1,48 +1,98 @@ Description: replace usages of pkg_resources with packaging and importlib Author: Ananthu C V <[email protected]> +Co-authored-by: Theodore Tucker <[email protected]> Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103717 -Last-Update: 2025-04-21 +Last-Update: 2026-05-09 + +--- + grpc_tools/command.py | 9 ++++----- + grpc_tools/protoc.py | 4 ++-- + setup.py | 6 +++--- + 3 files changed, 9 insertions(+), 10 deletions(-) + +diff --git a/grpc_tools/command.py b/grpc_tools/command.py +index 7ede05f..78894d0 100644 --- a/grpc_tools/command.py +++ b/grpc_tools/command.py -@@ -15,4 +15,4 @@ +@@ -13,8 +13,8 @@ + # limitations under the License. + import os -import pkg_resources import sys +from importlib.resources import files -@@ -32,4 +32,3 @@ + import setuptools + +@@ -24,14 +24,13 @@ from grpc_tools import protoc + def build_package_protos(package_root): + proto_files = [] + inclusion_root = os.path.abspath(package_root) +- for root, _, files in os.walk(inclusion_root): +- for filename in files: ++ for root, _, package_files in os.walk(inclusion_root): ++ for filename in package_files: + if filename.endswith('.proto'): + proto_files.append( + os.path.abspath(os.path.join(root, filename))) - well_known_protos_include = pkg_resources.resource_filename( - 'grpc_tools', '_proto') + well_known_protos_include = files('grpc_tools').joinpath('_proto') + for proto_file in proto_files: + command = [ +diff --git a/grpc_tools/protoc.py b/grpc_tools/protoc.py +index 582cba0..1f1513d 100644 --- a/grpc_tools/protoc.py +++ b/grpc_tools/protoc.py -@@ -16,4 +16,4 @@ +@@ -14,8 +14,8 @@ + # See the License for the specific language governing permissions and + # limitations under the License. -import pkg_resources import sys +from importlib.resources import files -@@ -34,3 +34,3 @@ + from grpc_tools import _protoc_compiler + +@@ -32,5 +32,5 @@ def main(command_arguments): + + if __name__ == '__main__': - proto_include = pkg_resources.resource_filename('grpc_tools', '_proto') + proto_include = files('grpc_tools').joinpath('_proto') sys.exit(main(sys.argv + ['-I{}'.format(proto_include)])) +diff --git a/setup.py b/setup.py +index 9e2b54a..0c0fdd7 100644 --- a/setup.py +++ b/setup.py -@@ -17,3 +17,2 @@ +@@ -15,7 +15,6 @@ + import errno + import os import os.path -import pkg_resources import platform -@@ -30,2 +29,3 @@ + import re + import shlex +@@ -28,6 +27,7 @@ from setuptools.command import build_ext + from distutils import cygwinccompiler + from distutils import extension from distutils import util +from packaging.version import Version -@@ -123,4 +123,4 @@ + # TODO(atash) add flag to disable Cython use + +@@ -121,8 +121,8 @@ elif "linux" in sys.platform or "darwin" in sys.platform: + # For Python3.4, this is OSX 10.6, but we need Thread Local Support (__thread) + if 'darwin' in sys.platform and PY3: mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') - if mac_target and (pkg_resources.parse_version(mac_target) < - pkg_resources.parse_version('10.9.0')): + if mac_target and (Version(mac_target) < + Version('10.9.0')): os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9' + os.environ['_PYTHON_HOST_PLATFORM'] = re.sub( + r'macosx-[0-9]+\.[0-9]+-(.+)', r'macosx-10.9-\1', +-- +2.47.3

