Closed denangeles closed 4 years ago
First, my apology for slow response. I have work, and personal issues.
The app was ported/built in Python 3.8.2 and Django 3.1.1, in a homemade virtual environment.
I do not know about Punycode, but assume the general area is https://tools.ietf.org/html/rfc3490.html.
Source code from Django 3.1.1 tells me punycode method/function is this simple,
def punycode(domain): """Return the Punycode of the given domain if it's non-ASCII.""" return domain.encode('idna').decode('ascii')
';idna' is a custom Python codec, see bottom of this page https://docs.python.org/3/library/codecs.html
Where that places your project I am not sure. The shift from V2 to V3 of Python is large. It includes Unicode, which is relevant to the error you report. You could try implement a Punycode function, though how to do that within Python 2, if that is what you are using, I do not know. The reverse approach would be to eliminate Punycode from the app code. Python can do conditional imports, but how much would you/we need to change?
I'm leaving this issue open for a time, to allow time for respose.
Thats OK, for now i have forked this repo and implemented my own changes, literally that code you put above.
Appreciate your response, and i might submit a PR soon!
Hello,
First of all, thanks for this port, im trying to integrate it in my projects!
My project uses django 2.2.x and ive encountered the following:
Digging in the django source code, i can see
punycode
is in django 3.0, but not 2.2.xIs there anyway to maintain compatibility with older django versions?