Django-upgrade

Latest version: v1.22.1

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

1.17.0

-------------------

* Add fixer selection options: ``--only <name>``, ``--skip <name>``, and ``--list-fixers``.

Thanks to Gav O'Connor and David Szotten in `PR 443 <https://github.com/adamchainz/django-upgrade/pull/443>`__.

* Run per-file conditions once, yielding a performance improvement of ~2% measured on a real-world project.

1.16.0

-------------------

* Remove the Django 5.0+ fixer that dropped ``.choices`` from model field ``choices`` parameters.
It was too unreliable because it could break use for “DIY” enumeration types.

Thanks to Niccolò Mineo and washeck for reporting in `Issue 417 <https://github.com/adamchainz/django-upgrade/issues/417>`__.

* Add Django 1.10+ fixer to rewrite ``request.user`` functions that changed to boolean attributes: ``is_authenticated`` and ``is_anonymous``.

Thanks to Alessandro Ferrini in `PR 423 <https://github.com/adamchainz/django-upgrade/pull/423>`__.

* Add Django 2.0+ imports fixes for names moved from ``django.core.urlresolvers`` to ``django.urls``.

Thanks to Thibaut Decombe in `PR 404 <https://github.com/adamchainz/django-upgrade/pull/404>`__.

1.15.0

-------------------

* Support Django 5.0 as a target version.

* Add Django 5.0+ fixer to drop ``.choices`` on model field ``choices`` parameters when using an enumeration type.

Thanks to Thibaut Decombe in `PR 369 <https://github.com/adamchainz/django-upgrade/pull/369>`__.

* Add some compatibility import replacements for Django 4.0 and below.

Thanks to Thibaut Decombe in `PR 368 <https://github.com/adamchainz/django-upgrade/pull/368>`__.

* Fix issue with ``admin.register()`` checker

Thanks to Jan Pieter Waagmeester for the report in `Issue 337 <https://github.com/adamchainz/django-upgrade/issues/337>`__, and to Thibaut Decombe for the review in `PR #338 <https://github.com/adamchainz/django-upgrade/pull/338>`__.

1.14.1

-------------------

* Fix bug in ``STORAGES`` fixer when only one of ``DEFAULT_FILE_STORAGE`` or ``STATICFILES_STORAGE`` was defined.

Thanks to Bruno Alla in `PR 376 <https://github.com/adamchainz/django-upgrade/pull/376>`__.

1.14.0

-------------------

* Support Python 3.12.

1.13.0

-------------------

* Add Django 4.2+ fixer to combine deprecated ``DEFAULT_FILE_STORAGE`` and ``STATICFILES_STORAGE`` settings into the new ``STORAGES`` setting.

* Add Django 4.2+ fixer to rewrite HTTP headers passed to test ``Client`` and ``RequestFactory``.

Thanks to David Wobrock in `PR 305 <https://github.com/adamchainz/django-upgrade/pull/305>`__.

* Add Django 4.2+ fixer to rewrite test case methods ``assertFormsetError()`` and ``assertQuerysetEqual()`` into the new spellings with capitalized “Set”.

Thanks to Michael Howitz in `PR 253 <https://github.com/adamchainz/django-upgrade/pull/253>`__.

* Add Django 4.0 fixer to rewrite ``django.contrib.admin.utils.lookup_needs_distinct`` -> ``lookup_spawns_duplicates``.

Thanks to Bruno Alla in `PR 313 <https://github.com/adamchainz/django-upgrade/pull/313>`__.

* Rewrite ``request.META`` -> ``request.headers`` on the *right hand side* of assignments.

* Group some compatibility import replacements into a single “fixer”, optimizing runtime by about 3%.

Thanks to Thibaut Decombe in `PR 295 <https://github.com/adamchainz/django-upgrade/pull/295>`__.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.