Skip to content

fix(asgi.App): correctly pass params when using orjson.dumps#2102

Merged
vytas7 merged 6 commits intofalconry:masterfrom
CaselIT:json_handler_fix
Aug 31, 2022
Merged

fix(asgi.App): correctly pass params when using orjson.dumps#2102
vytas7 merged 6 commits intofalconry:masterfrom
CaselIT:json_handler_fix

Conversation

@CaselIT
Copy link
Copy Markdown
Member

@CaselIT CaselIT commented Aug 30, 2022

Summary of Changes

Replace this text with a high-level summary of the changes included in this PR.

Related Issues

Please reference here any issue #'s that are relevant to this PR, or simply enter "N/A" if this PR does not relate to any existing issues.

#2100

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

  • Applied changes to both WSGI and ASGI code paths and interfaces (where applicable).
  • Added tests for changed code.
  • Prefixed code comments with GitHub nick and an appropriate prefix.
  • Coding style is consistent with the rest of the framework.
  • Updated documentation for changed code.
    • Added docstrings for any new classes, functions, or modules.
    • Updated docstrings for any modifications to existing code.
    • Updated both WSGI and ASGI docs (where applicable).
    • Added references to new classes, functions, or modules to the relevant RST file under docs/.
    • Updated all relevant supporting documentation files under docs/.
    • A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Changes (and possible deprecations) have towncrier news fragments under docs/_newsfragments/, with the file name format {issue_number}.{fragment_type}.rst. (Run towncrier --draft to ensure it renders correctly.)

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template inspired by the attrs project.

@CaselIT CaselIT requested review from kgriffs and vytas7 August 30, 2022 18:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 30, 2022

Codecov Report

Merging #2102 (92f3580) into master (e4d70e2) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2102   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         6746      6746           
  Branches      1255      1255           
=========================================
  Hits          6746      6746           
Impacted Files Coverage Δ
falcon/media/json.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@vytas7 vytas7 changed the title fix issue when using orjson as json serializer with asyncio… fix(asgi.App): correctly pass params when using orjson.dumps Aug 30, 2022
Copy link
Copy Markdown
Member

@vytas7 vytas7 left a comment

Choose a reason for hiding this comment

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

LGTM except the newsfragment 👍

Comment thread docs/_newsfragments/2100.bugfix.rst Outdated
Comment thread falcon/media/json.py
@CaselIT CaselIT requested a review from vytas7 August 30, 2022 20:11
Copy link
Copy Markdown
Member

@vytas7 vytas7 left a comment

Choose a reason for hiding this comment

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

LGTM now :shipit:

@CaselIT
Copy link
Copy Markdown
Member Author

CaselIT commented Aug 30, 2022

thanks for the update on the news fragment

@vytas7 vytas7 merged commit 6c68f86 into falconry:master Aug 31, 2022
@CaselIT CaselIT deleted the json_handler_fix branch August 31, 2022 20:51
@vytas7 vytas7 mentioned this pull request Nov 5, 2022
12 tasks
@vytas7 vytas7 added this to the Version 3.1.1 milestone Nov 5, 2022
vytas7 added a commit that referenced this pull request Nov 5, 2022
* fix: this change fixes an issue when using orjson as json serializer with asyncio

* docs: improve newsfragment

* test: ensure _serialize_async_b is also tested using the app

* docs(newsfragments): capitalize JSON

Co-authored-by: Vytautas Liuolia <vytautas.liuolia@gmail.com>
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.

2 participants