cloudevents / sdk-python

Python SDK for CloudEvents
https://pypi.org/p/cloudevents/
Apache License 2.0
266 stars 53 forks source link

Breaking Changes introduced in version 1.6.0 #190

Closed JP-Dhabolt closed 1 year ago

JP-Dhabolt commented 1 year ago

Expected Behavior

Minor version updates do not introduce breaking changes

Actual Behavior

Minor version updates introduced breaking change.

Steps to Reproduce the Problem

  1. Have code relying on cloudevents~=1.2
  2. Allow dependencies to update to 1.6.0, which is minor version updates only
  3. Various code is broken, with one specific being from cloudevents.http import to_json. This is not the only breaking change introduced, just the one that specifically impacted my team.

Specifications

It looks like it was #188 that caused the breaking change, based on the Changelog and the history of cloudevents/http/__init__.py. It looks like the intention was to deprecate some functionality, but by changing the import path, it broke the functionality instead.

sasha-tkachev commented 1 year ago

@JP-Dhabolt I will look into that

sasha-tkachev commented 1 year ago

You are correct, to_json is missing from the cloudevents.http module __init__ . I fixed the issue in #191 and added a regression test so it wont happen again as-well

xSAVIKx commented 1 year ago

Hey @JP-Dhabolt, thx for raising this.

The fix is merged already and should be released shortly.