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(HTTPClient): use orjson if it's installed #262

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

EmreTech
Copy link

@TAG-Epic
Copy link
Member

What about json_loads?

@EmreTech
Copy link
Author

Oh, whoops.

@EmreTech
Copy link
Author

Nevermind, this PR isn't going to work. Sorry, I got confused and thought json_serialize was for loading and not dumping.

@EmreTech EmreTech closed this Sep 10, 2023
@TAG-Epic
Copy link
Member

we do still dump so the PR is useful. We do also want something for deserialization too, however! But one is still progress.

@EmreTech EmreTech reopened this Sep 10, 2023

if TYPE_CHECKING:
from typing import Any, Final, Literal

# ClientResponse is still imported here because ours is "incompatible"
Copy link
Member

Choose a reason for hiding this comment

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

This is incredibly cursed. Wouldnt it make more sense to make ours compatible?

Copy link
Author

Choose a reason for hiding this comment

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

Pyright isn't being specific on how it's "incompatible", so I'm not sure how to make it compatible.

Copy link
Author

Choose a reason for hiding this comment

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

/nextcore/nextcore/http/client/client.py:316:28 - error: Expression of type "ClientResponse" cannot be assigned to return type "ClientResponse"
"aiohttp.client_reqrep.ClientResponse" is incompatible with "nextcore.http.client.client_response.ClientResponse" (reportGeneralTypeIssues)

Here's what I'm getting, for reference.

Copy link
Member

Choose a reason for hiding this comment

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

Weird. Will look into it eventually tm

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.

None yet

2 participants