browniebroke / django-codemod

A tool to automatically fix Django deprecations.

Home Page:https://django-codemod.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removed compatibility imports in 3.1

browniebroke opened this issue · comments

Link to Django docs
Link to release note section where the change and suitable replacement is mentioned:

https://docs.djangoproject.com/en/3.1/releases/3.1/#id1

Quote of the relevant paragraph

In case links gets outdated/removed:

The compatibility imports of django.core.exceptions.EmptyResultSet in django.db.models.query, django.db.models.sql, and django.db.models.sql.datastructures are removed.

The compatibility import of django.core.exceptions.FieldDoesNotExist in django.db.models.fields is removed.

The compatibility imports of django.forms.utils.pretty_name() and django.forms.boundfield.BoundField in django.forms.forms are removed.

The compatibility imports of Context, ContextPopException, and RequestContext in django.template.base are removed.

The compatibility import of django.contrib.admin.helpers.ACTION_CHECKBOX_NAME in django.contrib.admin is removed.

Deprecation timeline

  • Removed in: 3.1
  • EmptyResultSet - deprecated in: 1.11
  • FieldDoesNotExist - deprecated in: 1.8
  • pretty_name - deprecated in: 1.9
  • BoundField - deprecated in: 1.9
  • Context - deprecated in: 1.7
  • ContextPopException - deprecated in: 1.7
  • RequestContext - deprecated in: 1.7
  • ACTION_CHECKBOX_NAME - deprecated in: 1.3