Related: #1079
PR #1080 (which fixes the above linked issue) added a new dependency to this project, Unidecode.
I'd like to suggest dropping this dependency, and possibly removing this utility function.
From what I can tell the to_const utility is not actually used in this library at all, and just from spot checking seems to only be used by graphene-django. The linked issue specifically uses a graphene-django example. If this is only used upstream in one spot, it might be worth moving the utility + dependency there instead.
It's possible the average use case also involves graphene-djagno and would require this dependency regardless, but for those that don't it would be nice not to require unidecode for a single-line utility function that may or may not be used.
While neither package is huge, unidecode is a few times larger than graphene according to pypi's downloads.
Depending on what the best option forward here is, I am happy to submit a PR that either:
- removes the
to_const function + drops unidecode
- makes
unidecode an optional dependency specified by
extras_require: { 'unidecode': "unidecode>=1.1.1,<2", ... }
- reverts to a simpler unicode decode handler, with something like
str(string, errors="ignore") + drops unidecode
Related: #1079
PR #1080 (which fixes the above linked issue) added a new dependency to this project,
Unidecode.I'd like to suggest dropping this dependency, and possibly removing this utility function.
From what I can tell the
to_constutility is not actually used in this library at all, and just from spot checking seems to only be used bygraphene-django. The linked issue specifically uses agraphene-djangoexample. If this is only used upstream in one spot, it might be worth moving the utility + dependency there instead.It's possible the average use case also involves
graphene-djagnoand would require this dependency regardless, but for those that don't it would be nice not to requireunidecodefor a single-line utility function that may or may not be used.While neither package is huge,
unidecodeis a few times larger thangrapheneaccording to pypi's downloads.Depending on what the best option forward here is, I am happy to submit a PR that either:
to_constfunction + dropsunidecodeunidecodean optional dependency specified byextras_require: { 'unidecode': "unidecode>=1.1.1,<2", ... }str(string, errors="ignore")+ dropsunidecode