cloudevents / cloudevents/sdk-python
CloudEvent equality is incorrect on none attributes
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 342
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
CloudEvent equality is incorrect on none attributes
from cloudevents.http import CloudEvent
CloudEvent(attributes={"type": "a", "source": "a", "a": None}) == CloudEvent({"type": "a", "source":"a"})
expected True
actual False
the spec says that null value attributes are the same as non-existing attributes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CloudEvent equality implementation and reproduce the comparison in the issue using the Python SDK. Add coverage for an attribute set to None versus an absent attribute, and confirm the comparison matches the CloudEvents specification and the expected True result.
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