Skip to content

Commit

Permalink
fix: to_json breaking change (#191)
Browse files Browse the repository at this point in the history
* fix: missing to_json import #190

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* test: backwards compatability import from http module #190

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

* [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 <sasha64sasha@gmail.com>

* [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 <sasha64sasha@gmail.com>

* feat: bump version

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
sasha-tkachev and pre-commit-ci[bot] authored Aug 25, 2022
1 parent 5e64e3f commit eba24db
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.6.1] — 2022-08-18
### Fixed
- Missing `to_json` import. ([#191])


## [1.6.0] — 2022-08-17
### Added
- A new `CloudEvent` optional `pydantic` model class is available in the
Expand Down Expand Up @@ -141,7 +146,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.0.1] - 2018-11-19
### Added
- Initial release

[1.6.1]: https://github.com/cloudevents/sdk-python/compare/1.6.0...1.6.1
[1.6.0]: https://github.com/cloudevents/sdk-python/compare/1.5.0...1.6.0
[1.5.0]: https://github.com/cloudevents/sdk-python/compare/1.4.0...1.5.0
[1.4.0]: https://github.com/cloudevents/sdk-python/compare/1.3.0...1.4.0
Expand Down Expand Up @@ -204,3 +209,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#184]: https://github.com/cloudevents/sdk-python/pull/184
[#186]: https://github.com/cloudevents/sdk-python/pull/186
[#188]: https://github.com/cloudevents/sdk-python/pull/188
[#191]: https://github.com/cloudevents/sdk-python/pull/191
2 changes: 1 addition & 1 deletion cloudevents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# License for the specific language governing permissions and limitations
# under the License.

__version__ = "1.6.0"
__version__ = "1.6.1"
2 changes: 2 additions & 0 deletions cloudevents/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
to_structured,
to_structured_http,
)
from cloudevents.http.json_methods import to_json # deprecated

__all__ = [
to_binary,
Expand All @@ -34,4 +35,5 @@
is_structured,
to_binary_http,
to_structured_http,
to_json,
]
16 changes: 16 additions & 0 deletions cloudevents/tests/test_backwards_compatability.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,19 @@ def test_util():

def test_event_type():
from cloudevents.http.event_type import is_binary, is_structured # noqa


def test_http_module_imports():
from cloudevents.http import ( # noqa
CloudEvent,
from_dict,
from_http,
from_json,
is_binary,
is_structured,
to_binary,
to_binary_http,
to_json,
to_structured,
to_structured_http,
)

0 comments on commit eba24db

Please sign in to comment.