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

Update dependencies #99

Merged
merged 15 commits into from
Dec 25, 2022
Merged

Conversation

kiendang
Copy link
Collaborator

@kiendang kiendang commented Dec 20, 2022

Update dependencies so that the package works with the latest framework versions in preparation for a stable v3 release. See #96 for context.

The PR's been rebased for convenient commit by commit review.

From sanic v21 view now requires defining the method get, post, ... independently otherwise will throw 405, thus the current approach of overriding dispatch_request won't work. The workaround is to just assign the individual method to dispatch_request

async def __handle_request(self, request, ...): ... # previously dispatch_request

get = post = put = head = options = patch = delete = __handle_request

Close #86
Close #92
Close #94
Close #98

Supersede #87, #89, #91, #95.

@erikwrede

@kiendang kiendang force-pushed the update-dependencies branch 8 times, most recently from 2e064b3 to 7956f6e Compare December 21, 2022 15:51
gcampax and others added 4 commits December 25, 2022 13:15
Fix quart.request.get_data signature

QuartClient -> TestClientProtocol
DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
Was working by accident before
cannot collect test class 'TestClientProtocol' because it has a __init__ constructor
Copy link
Member

@erikwrede erikwrede left a comment

Choose a reason for hiding this comment

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

Great Job! The minimum version changes look reasonable, given the long time this library has been resting dormant.

Please see my comments attached below.

setup.py Outdated
install_requires = ["graphql-core>=3.2,<3.3", "typing-extensions>=4,<5"]
install_requires = [
"graphql-core>=3.2,<3.3",
"Jinja2>=3.1,<4",
Copy link
Member

Choose a reason for hiding this comment

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

Why is jinja now a required dependency? AFAIK it's only used for GraphiQL, which users can disable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup you're right. Just moved it back to test dependencies.

Comment on lines 9 to 11

GRAPHIQL_VERSION = "1.0.3"
GRAPHIQL_VERSION = "1.4.7"

Copy link
Member

Choose a reason for hiding this comment

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

Any reason to not update to 2.2.0 straight away?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We definitely should upgrade to 2.2.0. I was basing this on https://github.com/graphql/express-graphql/blob/main/src/renderGraphiQL.ts plus the graphiql readme recommending upgrading to 1.4.7 so I was under the impression that 1.4.7 is the latest version. Will try upgrading to 2.2.0 and verifying that everything's working, but maybe we should merge this first and I'll submit a subsequent PR for that?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good!

@kiendang
Copy link
Collaborator Author

Push a few more commits to add python 3.11 and remove 3.6 (EOL) which I suspect is what makes the tests fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants