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

remove dead code: singledispatch has been in the standard library ... #1534

Merged
merged 2 commits into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions graphene_django/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,7 @@ def is_valid_django_model(model):


def import_single_dispatch():
try:
from functools import singledispatch
except ImportError:
singledispatch = None

if not singledispatch:
try:
from singledispatch import singledispatch
except ImportError:
pass

if not singledispatch:
raise Exception(
"It seems your python version does not include "
"functools.singledispatch. Please install the 'singledispatch' "
"package. More information here: "
"https://pypi.python.org/pypi/singledispatch"
)
from functools import singledispatch

return singledispatch

Expand Down
Loading