Remove bytes encoder that was specifically for Django 1.11 (#490)

This commit is contained in:
Ryan Siemens
2021-09-02 19:02:27 -07:00
committed by GitHub
parent 8f1fd73dd3
commit 355520dae0

View File

@ -195,13 +195,6 @@ class Connection(_mysql.connection):
self.cursorclass = cursorclass
self.encoders = {k: v for k, v in conv.items() if type(k) is not int}
# XXX THIS IS GARBAGE: While this is just a garbage and undocumented,
# Django 1.11 depends on it. And they don't fix it because
# they are in security-only fix mode.
# So keep this garbage for now. This will be removed in 1.5.
# See PyMySQL/mysqlclient-python#306
self.encoders[bytes] = bytes
self._server_version = tuple(
[numeric_part(n) for n in self.get_server_info().split(".")[:2]]
)