fix: to_json breaking change (#191)

* 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>
This commit is contained in:
Alexander Tkachev 2022-08-25 08:58:51 +03:00 committed by GitHub
parent 5e64e3fea1
commit eba24db1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 2 deletions

View File

@ -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
@ -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
@ -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

View File

@ -12,4 +12,4 @@
# License for the specific language governing permissions and limitations
# under the License.
__version__ = "1.6.0"
__version__ = "1.6.1"

View File

@ -22,6 +22,7 @@ from cloudevents.http.http_methods import ( # deprecated
to_structured,
to_structured_http,
)
from cloudevents.http.json_methods import to_json # deprecated
__all__ = [
to_binary,
@ -34,4 +35,5 @@ __all__ = [
is_structured,
to_binary_http,
to_structured_http,
to_json,
]

View File

@ -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,
)