Django v4.0 support
MisterGlass opened this issue · comments
Hello!
Django 4.0 is due out next week and I was attempting to test the release candidate with my project. Have there been any efforts to check/fix compatibility with the new version?
Hi!
I have error django-4 with graphene-2.15:
ImportError: cannot import name 'force_text' from 'django.utils.encoding'
Hi - Any update/ETA on this ?
I'll try to complete reviews related to Python / Django versions before the week ends.
Quick workaround is to just change it to force_str
in your library code until patch. I haven't seen any other immediate breakages
After overcoming the force_str problem via monkeypatching, I have the problem of getting GraphiQL integrated.
With the previous code:
from graphene_django.views import GraphQLView
urlpatterns = [
re_path(r'^api/graphql', csrf_exempt(GraphQLView.as_view(graphiql=True)), name='graphql'),
]
only this error message appears:
ImportError: cannot import name 'get_default_backend' from 'graphql'
Does anyone have an idea how to get this fixed?
Edit: In the current beta version (v3.0.0b7) the problem is already fixed!
Hi! I have error django-4 with graphene-2.15: ImportError: cannot import name 'force_text' from 'django.utils.encoding'
right, and you can shoud replace 'force_text' to 'force_str'
@firaskafri Can you please give a reference / small explanation when closing issues, for the paper trail? Thank you.
@firaskafri is it closed because graphene works with Django 4 now?
Sorry guys, yes v3 supports Django 4 now