Skip to content

Commit eba24db

Browse files
fix: to_json breaking change (#191)
* fix: missing to_json import #190 Signed-off-by: Alexander Tkachev <[email protected]> * test: backwards compatability import from http module #190 Signed-off-by: Alexander Tkachev <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docs: update changelog Signed-off-by: Alexander Tkachev <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docs: update changelog Signed-off-by: Alexander Tkachev <[email protected]> * feat: bump version Signed-off-by: Alexander Tkachev <[email protected]> Signed-off-by: Alexander Tkachev <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5e64e3f commit eba24db

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.6.1] — 2022-08-18
10+
### Fixed
11+
- Missing `to_json` import. ([#191])
12+
13+
914
## [1.6.0] — 2022-08-17
1015
### Added
1116
- A new `CloudEvent` optional `pydantic` model class is available in the
@@ -141,7 +146,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
141146
## [0.0.1] - 2018-11-19
142147
### Added
143148
- Initial release
144-
149+
[1.6.1]: https://github.com/cloudevents/sdk-python/compare/1.6.0...1.6.1
145150
[1.6.0]: https://github.com/cloudevents/sdk-python/compare/1.5.0...1.6.0
146151
[1.5.0]: https://github.com/cloudevents/sdk-python/compare/1.4.0...1.5.0
147152
[1.4.0]: https://github.com/cloudevents/sdk-python/compare/1.3.0...1.4.0
@@ -204,3 +209,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
204209
[#184]: https://github.com/cloudevents/sdk-python/pull/184
205210
[#186]: https://github.com/cloudevents/sdk-python/pull/186
206211
[#188]: https://github.com/cloudevents/sdk-python/pull/188
212+
[#191]: https://github.com/cloudevents/sdk-python/pull/191

cloudevents/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414

15-
__version__ = "1.6.0"
15+
__version__ = "1.6.1"

cloudevents/http/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
to_structured,
2323
to_structured_http,
2424
)
25+
from cloudevents.http.json_methods import to_json # deprecated
2526

2627
__all__ = [
2728
to_binary,
@@ -34,4 +35,5 @@
3435
is_structured,
3536
to_binary_http,
3637
to_structured_http,
38+
to_json,
3739
]

cloudevents/tests/test_backwards_compatability.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,19 @@ def test_util():
5555

5656
def test_event_type():
5757
from cloudevents.http.event_type import is_binary, is_structured # noqa
58+
59+
60+
def test_http_module_imports():
61+
from cloudevents.http import ( # noqa
62+
CloudEvent,
63+
from_dict,
64+
from_http,
65+
from_json,
66+
is_binary,
67+
is_structured,
68+
to_binary,
69+
to_binary_http,
70+
to_json,
71+
to_structured,
72+
to_structured_http,
73+
)

0 commit comments

Comments
 (0)