graphql-python / graphene-django

Build powerful, efficient, and flexible GraphQL APIs with seamless Django integration.
http://docs.graphene-python.org/projects/django/en/latest/
MIT License
4.29k stars 767 forks source link

Backport Python 3.11 and Django 4.2 in v2 #1456

Closed wongcht closed 1 year ago

wongcht commented 1 year ago

v2.16.0 supports Django 4.1, actually it also passes the tests in Python 3.11 and Django 4.2.

Suggest changing the latest supported version to cover Django 4.2 LTS, while currently 4.1 EOL in 3 months (2023-12-1).

cpd67 commented 1 year ago

@firaskafri @kiendang Hey guys, I apologize for commenting on a closed MR, but will this be part of a v2 release soon? We're in the middle of attempting to upgrade to Django 4.2, but currently cannot because the current graphene-django v2 release doesn't support Django 4.2. We've tried using graphene-django v3, but ran into issues because some of our resolvers are async and it looks like graphene-django v3 doesn't support async resolvers yet.

kiendang commented 1 year ago

@cpd67 This PR only added tests for Django 4.2 to CI and made no changes to the code. You could already use the current graphene-django v2 release with Django 4.2. I suggest you try that and see if there are problems.

We've tried using graphene-django v3, but ran into issues because some of our resolvers are async and it looks like graphene-django v3 doesn't support async resolvers yet.

We currently have a PR open for adding async to v3 #1394 which we are considering releasing as an experimental feature soon (see this discussion). Are you interested in trying that out? Would help us a lot. You can try the PR right now with

pip install git+https://github.com/jaw9c/graphene-django.git@support-async
cpd67 commented 1 year ago

@kiendang Thanks for the reply! And apologies for misunderstanding the purpose of this PR :sweat_smile:.

I was aware of that PR and attempted to contribute a bit through this PR. I can certainly test it out on a local project of mine and offer feedback.

kiendang commented 1 year ago

@cpd67 I see. Yup I'm aware of your PR, just didn't recognize it was you haha.

I can certainly test it out on a local project of mine and offer feedback.

Thank you so much!