File python-django-upgrade.changes of Package python-django-upgrade

-------------------------------------------------------------------
Sat Mar 21 14:32:10 UTC 2026 - Dirk Müller <dmueller@suse.com>

- update to 1.30.0:
  * Support parsing Django versions without a minor part from
    pyproject.toml. For example, django>=6 will be parsed as for
    Django 6.0+. PR #625.
  * Drop Python 3.9 support.
  * Remove the AppConfig rewriting behaviour of
    :ref:`default_auto_field <default_auto_field>`. It was unsafe
    for projects setting DEFAULT_AUTO_FIELD to a field other than
    BigAutoField, triggering regressive migrations for primary
    keys in affected apps. PR #606.
  * Add Django 6.0+ fixer :ref:`mail_api_kwargs
    <mail_api_kwargs>` to rewrite positional arguments to keyword
    arguments for some django.core.mail APIs. PR #600.
  * Add Django 6.0+ fixer :ref:`default_auto_field
    <default_auto_field>` to remove now-redundant auto field
    specifications. The fixer removes the DEFAULT_AUTO_FIELD
    setting and AppConfig.default_auto_field attribute when they
    are set to the new default of django.db.models.BigAutoField.
    Thanks to q0w in PR #591.
  * Add Django 6.0+ fixer :ref:`stringagg <stringagg>` to rewrite
    StringAgg imports from django.contrib.postgres.aggregates to
    django.db.models. This fixer replaces the compatibility
    import rewrite added in 1.27.0, and now correctly wraps the
    delimiter argument in Value() when it is a string literal. PR
    #596.
  * Add Django 6.0+ fixer :ref:`settings_admins_managers
    <settings_admins_managers>` to rewrite the ADMINS and
    MANAGERS settings to drop the previously-unused name parts of
    the tuples. PR #601.
  * Support Python 3.14.
  * Support Django 6.0 as a target version.
  * Add Django 6.0+ fixer
    :ref:`settings_forms_urlfield_assume_https
    <settings_forms_urlfield_assume_https>` to remove the
    transitional setting FORMS_URLFIELD_ASSUME_HTTPS. PR #585.
  * Add Django 6.0+ compatibility import rewrite of StringAgg
    from django.contrib.postgres.aggregates to django.db.models.
    PR #586.
  * Improve :ref:`the django_urls fixer <django_urls>` slightly:
    Regular expression URLs with a . are now converted to path()
    syntax. Thanks to Iteron-dev for the report in Issue #567.
    Invalid group names are no longer converted to path() syntax.
    PR #584.
  * Regular expression URLs with a . are now converted to path()
    syntax. Thanks to Iteron-dev for the report in Issue #567.
  * Invalid group names are no longer converted to path() syntax.
  * Add --check option that only reports which files would be
    changed. Thanks to berzi in PR #581.
  * Improve stdin handling: exit with code 0 even when changes
    were made for stdin, and print all other output to stderr. PR
    #583.
  * Fix the request_headers fixer for non-string in comparisons
    like 1 in request.META (unlikely in real code). PR #579.
  * Add support for class-based settings files in the use_l10n
    fixer.
  * Parse target Django version from pyproject.toml. Now, if you
    don’t specify a version with :option:`--target-version`,
    django-upgrade will try to parse your minimum-supported
    target Django version from project.dependencies in
    pyproject.toml. It supports several common formats, like
    django>=5.2,<6.0. PR #543.
  * Add Django 5.2+ fixer :ref:`postgres_aggregate_order_by
    <postgres_aggregate_order_by>` to rewrite PostgreSQL
    aggregate functions using the old argument name ordering to
    the new name order_by. Issue #538.
  * Add Django 5.2+ fixer :ref:`staticfiles_find_all
    <staticfiles_find_all>` to rewrite calls to the staticfiles
    find() function using the old argument name all to the new
    name find_all. Issue #539.
  * Restore Django 5.0+ fixer :ref:`model_field_choices
    <model_field_choices>`, with a restriction to only apply when
    the enumeration type is defined in the same file. Thanks to
    Thibaut Decombe for initially contributing it in PR #369.
  * Add Django 2.0+ compatibility import rewrite of
    django.http.cookie.SimpleCookie to http.cookies.SimpleCookie.
    Thanks to Thibaut Decombe in PR #537.
  * Fix :ref:`django_urls <django_urls>` fixer bug that failed
    for indented path strings. This bug was introduced in 1.23.0.
    Thanks to Michal Čihař for the report in Issue #528.
  * Support Django 5.2 in :option:`--target-version`.
  * Extend versioned block fixer to support comparisons with
    single-item tuples, like django.VERSION >= (4,). Thanks to
    Thibaut Decombe in PR #517.
  * Fix :ref:`versioned_test_skip_decorators
    <versioned_test_skip_decorators>` fixer to remove all
    indentation tokens from the decorator line. Thanks to Thibaut
    Decombe in PR #518.
  * Fix :ref:`django_urls <django_urls>` fixer handling of
    implicitly concatenated strings. Thanks to Gunther Waidacher
    for the report in Issue #524.

-------------------------------------------------------------------
Thu Dec  5 14:51:27 UTC 2024 - Dirk Müller <dmueller@suse.com>

- update to 1.22.2:
  * Make these fixers work when django.contrib.gis.db.models is
    used to import objects from django.db.models:
    check_constraint_condition index_together  Issue #513.

-------------------------------------------------------------------
Mon Oct 28 12:27:08 UTC 2024 - Dirk Müller <dmueller@suse.com>

- update to 1.22.1:
  * Fix circular import error when running django-upgrade. Thanks
    to Michal Čihař for the report in Issue #503.
  * Avoid accidental removal of comments a removed if block in
    the versioned block fixer. Thanks to Tobias Funke for the
    report in Issue #495.
  * Add all-version fixer to remove outdated test skip
    decorators. Issue #364.
  * Drop Python 3.8 support.
  * Support Python 3.13.
  * Add Django 5.0+ fixer to rewrite format_html() calls without
    args or kwargs probably using str.format() incorrectly. Issue
    #477.

-------------------------------------------------------------------
Sat Aug 31 15:08:08 UTC 2024 - Dirk Müller <dmueller@suse.com>

- update to 1.20.0:
  * Fix the admin_register fixer to avoid rewriting when there
    are duplicate ModelAdmin classes in the file. Issue #471.

-------------------------------------------------------------------
Mon Jul  8 09:50:35 UTC 2024 - Dirk Müller <dmueller@suse.com>

- update to 1.19.0:
  * Add Django 4.2+ fixer to rewrite index_together declarations
    into indexes declarations in model Meta classes. This fixer
    can make changes that require migrations. Add a test for
    pending migrations to ensure that you do not miss these. PR
    #464.
  * Fix tracking of AST node parents. This may have fixed some
    subtle bugs in these fixers:  admin_register
    assert_form_error default_app_config management_commands
    request_headers settings_database_postgresql
    settings_storages testcase_databases use_l10n utils_timezone
  * If you see any new changes, or had them previously disabled,
    please report an issue so we can extra tests to the test
    suite.

-------------------------------------------------------------------
Wed Jun 12 09:21:45 UTC 2024 - Dirk Müller <dmueller@suse.com>

- update to 1.18.0:
  * Support Django 5.1 as a target version.
  * Add Django 5.1+ fixer to rewrite the check keyword argument
    of CheckConstraint to condition.
  * Add fixer selection options: --only <name>, --skip <name>,
    and --list-fixers.

-------------------------------------------------------------------
Sun Apr  7 09:08:11 UTC 2024 - Dirk Müller <dmueller@suse.com>

- update to 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.
  * 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.
  * Add Django 1.10+ fixer to rewrite request.user functions that
    changed to boolean attributes: is_authenticated and
    is_anonymous.
  * Add Django 1.10+ fixer to rewrite request.user functions that
    changed to boolean attributes: is_authenticated and
    is_anonymous.
  * Add Django 2.0+ imports fixes for names moved from
    django.core.urlresolvers to django.urls.
  * Add Django 2.0+ imports fixes for names moved from
    django.core.urlresolvers to django.urls.

-------------------------------------------------------------------
Sat Dec  2 16:25:38 UTC 2023 - Dirk Müller <dmueller@suse.com>

- update to 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.
  * Add some compatibility import replacements for Django 4.0 and
    below.
  * Fix issue with ``@admin.register()`` checker

-------------------------------------------------------------------
Mon Sep 11 20:40:27 UTC 2023 - Dirk Müller <dmueller@suse.com>

- update to 1.14.1:
  * Fix bug in ``STORAGES`` fixer when only one of
    ``DEFAULT_FILE_STORAGE`` or ``STATICFILES_STORAGE`` was
    defined.

-------------------------------------------------------------------
Tue Jul 11 13:20:25 UTC 2023 - Dirk Müller <dmueller@suse.com>

- update to 1.14.0:
  * Support Python 3.12.

-------------------------------------------------------------------
Thu Mar 30 07:50:14 UTC 2023 - Dirk Müller <dmueller@suse.com>

- update to 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``.
  * Add Django 4.2+ fixer to rewrite test case methods
    ``assertFormsetError()`` and ``assertQuerysetEqual()`` into
    the new spellings with capitalized “Set”.
  * Add Django 4.0 fixer to rewrite
    ``django.contrib.admin.utils.lookup_needs_distinct`` ->
    ``lookup_spawns_duplicates``.
  * 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%.

-------------------------------------------------------------------
Fri Jan 20 12:11:48 UTC 2023 - Dirk Müller <dmueller@suse.com>

- update to 1.12.0:
  * Make ``re_path`` -> ``path`` fixer also convert ``include()``\'s with
    unterminated regexes.
  * Avoid rewriting ``request.META`` to ``request.headers`` in ``del``
    statements.
  * Add Django 1.9+ fixer to rename the legacy engine name
    ``django.db.backends.postgresql_psycopg2`` in ``settings.DATABASES`` to
    ``django.db.backends.postgresql``.
  * Make detection of management commands and migration files detect both
    forward and backward slashes as directory separators.
- update to 1.11.0:
  * See also `the release blog post
    <https://adamj.eu/tech/2022/10/26/django-upgrade-mega-release/>`__.
  * Add Django 1.7+ fixer to rewrite ``admin.site.register()`` calls into
    ``@admin.register()`` when eligible.
  * Add Django 3.2+ fixer to rewrite admin action function attributes to use
    the ``@admin.action()`` decorator.
  * Add Django 3.2+ fixer to rewrite admin display function attributes to
    use the ``@admin.display()`` decorator.
  * Add Django 4.1+ fixer to rewrite calls to test case methods
    ``assertFormError()`` and ``assertFormsetError()`` from their old
    signatures to the new ones.
  * Add Django 2.0+ fixer to drop assignments of ``allow_tags`` attributes
    to ``True``.
  * Add Django 3.1+ fixer to replace ``list`` error message key with
    ``list_invalid`` on ``ModelMultipleChoiceField``.
  * Make ``request.headers`` fixer also rewrite accesses of the ``content-
    length`` and ``content-type`` headers.
  * Extend ``request.headers`` fixer to rewrite ``in`` and ``not in``
    comparisons on ``request.META``.
  * The ``request.headers`` fixer now uses lowercase for header lookups, as
    per the HTTP/2 specification.
  * Make ``on_delete`` fixer also support ``ForeignKey`` and
    ``OneToOneField`` imported from ``django.db.models``.
  * Make ``NullBooleanField`` fixer preserve existing ``null`` arguments.
  * Update ``timezone.utc`` fixer to only use absolute references from
    existing imports of the ``datetime`` module.
  * Make Django 2.0+ URL fixer avoid a loop of adding imports that already
    exist.
  * Fixers that modify string literals now match existing use of double
    quotes.
  * Make fixers that erase lines also erase any trailing comments.
  * Fix leaving a trailing comma when editing imports in certain cases.
  * Expand the range of files considered settings files.
  * Require at least one filename.
  * Update README with info on how to run an upgrade on entire project.
- update to 1.10.0:
  * Add Django 3.2+ fixer to update ``requires_system_checks`` in management
    command classes.

-------------------------------------------------------------------
Thu Sep  1 10:20:54 UTC 2022 - John Vandenberg <jayvdb@gmail.com>

- Update to v1.9.0

-------------------------------------------------------------------
Sun Dec 26 21:46:08 UTC 2021 - John Vandenberg <jayvdb@gmail.com>

- Initial spec for v1.4.0
openSUSE Build Service is sponsored by