https://code.djangoproject.com/ticket/23308