See https://www.python.org/dev/peps/pep-0565/ we might be able to remove some custom code on 3.7+ and/or have a behavior which is closer to what is defined in the pep.
[EDIT]
This code is now conditionally run on < 3.7 (see #11396), once Python 3.6 is dropped this can actually be removed.
See https://www.python.org/dev/peps/pep-0565/ we might be able to remove some custom code on 3.7+ and/or have a behavior which is closer to what is defined in the pep.
[EDIT]
This code is now conditionally run on < 3.7 (see #11396), once Python 3.6 is dropped this can actually be removed.