Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: _json_or_string no longer fails on malformed unicode buffers #184

Conversation

sasha-tkachev
Copy link
Contributor

@sasha-tkachev sasha-tkachev commented Jul 18, 2022

Fixes #183

Changes

  • Add the missing exception to the list
  • Add more type information

One line description for the changelog

  • Tests pass
  • Appropriate changes to README are included in PR

@sasha-tkachev sasha-tkachev changed the title Bugfix/json or string unicode decode issue fix: _json_or_string no longer fails on malformed unicode buffers Jul 18, 2022
@sasha-tkachev sasha-tkachev changed the title fix: _json_or_string no longer fails on malformed unicode buffers fix: _json_or_string no longer fails on malformed unicode buffers Jul 18, 2022
Copy link
Member

@xSAVIKx xSAVIKx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sasha-tkachev please consider using standard AnyStr over custom typevar.

Also, can you please take care of adding appropriate docs to the function?

cloudevents/http/util.py Outdated Show resolved Hide resolved
Copy link
Member

@xSAVIKx xSAVIKx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sasha-tkachev LGTM. Please fix the DCO and you should be good to go.

sasha-tkachev and others added 9 commits July 24, 2022 21:44
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
for more information, see https://pre-commit.ci

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Co-authored-by: Yurii Serhiichuk <xSAVIKx@users.noreply.github.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
@sasha-tkachev sasha-tkachev force-pushed the bugfix/json-or-string-unicode-decode-issue branch from 2f4c86e to 8525a95 Compare July 24, 2022 18:46
@xSAVIKx xSAVIKx merged commit 61c8657 into cloudevents:main Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_json_or_string fails on malformed unicode buffers
2 participants