Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/proto-plus/docs/fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Declare them in Python using the :class:`~.RepeatedField` class:
>>> row.values = [struct_pb2.Value(string_value="hello")]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/google/home/busunkim/github/python-automl/.nox/unit-3-8/lib/python3.8/site-packages/proto/message.py", line 543, in __setattr__
File "/usr/local/google/home/busunkim/github/python-automl/.nox/unit-3-10/lib/python3.10/site-packages/proto/message.py", line 543, in __setattr__
self._pb.MergeFrom(self._meta.pb(**{key: pb_value}))
TypeError: Value must be iterable

Expand Down
1 change: 0 additions & 1 deletion packages/proto-plus/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
DEFAULT_PYTHON_VERSION = "3.14"

PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
Expand Down
3 changes: 1 addition & 2 deletions packages/proto-plus/proto/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ def __new__(mcls, name, bases, attrs):
opts = attrs.pop(pb_options, {})
# This is the only portable way to remove the _pb_options name
# from the enum attrs.
# In 3.7 onwards, we can define an _ignore_ attribute and do some
# mucking around with that.
# TODO: Use _ignore_ attribute to ignore _pb_options (Issue #16911)
Comment thread
chalmerlowe marked this conversation as resolved.
if pb_options in attrs._member_names:
if isinstance(attrs._member_names, list):
idx = attrs._member_names.index(pb_options)
Expand Down
4 changes: 2 additions & 2 deletions packages/proto-plus/proto/marshal/collections/repeated.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ def __setitem__(self, key, value):
else: # Is an extended slice.
indices = range(start, stop, step)

if len(value) != len(indices): # XXX: Use PEP 572 on 3.8+
if (v_len := len(value)) != len(indices):
raise ValueError(
f"attempt to assign sequence of size "
f"{len(value)} to extended slice of size "
f"{v_len} to extended slice of size "
f"{len(indices)}"
)

Expand Down
3 changes: 1 addition & 2 deletions packages/proto-plus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build-backend = "setuptools.build_meta"
name = "proto-plus"
authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }]
license = { text = "Apache 2.0" }
requires-python = ">=3.9"
requires-python = ">=3.10"
description = "Beautiful, Pythonic protocol buffers"
readme = "README.rst"
classifiers = [
Expand All @@ -29,7 +29,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
Loading