Skip to content

Commit 17889ce

Browse files
committed
remove dead code: singledispatch has been in the stard library for many years
(BTW this function does not seems to be used anywhere anymore)
1 parent 28c71c5 commit 17889ce

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

graphene_django/utils/utils.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,7 @@ def is_valid_django_model(model):
111111

112112

113113
def import_single_dispatch():
114-
try:
115-
from functools import singledispatch
116-
except ImportError:
117-
singledispatch = None
118-
119-
if not singledispatch:
120-
try:
121-
from singledispatch import singledispatch
122-
except ImportError:
123-
pass
124-
125-
if not singledispatch:
126-
raise Exception(
127-
"It seems your python version does not include "
128-
"functools.singledispatch. Please install the 'singledispatch' "
129-
"package. More information here: "
130-
"https://pypi.python.org/pypi/singledispatch"
131-
)
132-
114+
from functools import singledispatch
133115
return singledispatch
134116

135117

0 commit comments

Comments
 (0)