kragniz / kragniz/python-etcd3
the "filters" paramter of add watch function cannot be assigment
- Dominant language
- Python
- Stars
- 450
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
hello,
i want to add watch which only watch the put event of a key.
but i got the exception:
AttributeError: Assigment not allowed to repeated field "filters" in protocal message object.
than i found the code in "etcd3/watch.py" line 62 & 63 is:
if filters is not None:
create_watch.filters = filters
i wonder whether the code should be:
if filters is not None:
for filter in filters: # filters is [0] or [1] or [0, 1]
create_watch.filters.append(filter)
or, may be there is other method to assigment the value to the "filters". could you show me?
thank you!
Contributor guide
Research direction
Start at the add watch entry point in etcd3/watch.py, especially lines 62–63, and inspect how the protobuf CreateWatchRequest represents its repeated filters field. Verify the supported way to pass filters and confirm that watching only PUT events works without raising the assignment error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100