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