Skip to content

4.2.2

Compare
Choose a tag to compare
@intgr intgr released this 27 Jun 17:51
· 397 commits to master since this release
5806511

Headline changes

  • mypy 1.4: Recommended mypy version updated to 1.4.x

  • Support for django-split-settings, django-configurations and other Django settings addons with strict_settings = false option, see README for details

  • We have now adopted mypy's stubtest to automatically find discrepancies between Django and django-stubs.

    If you want to contribute to django-stubs but are not sure where to start, have a look at stubtest's TODO list file, which lists the many issues discovered by stubtest.

Django 4.2 changes

  • Applied Django 4.2 deprecations by @Alexerson in #1523
  • Updated global settings and AppConfig class to match Django 4.2 by @Alexerson in #1524
  • Added types for new 'system checks' in Django 4.2 by @Alexerson in #1526
  • Added ManifestStaticFilesStorage new parameters by @Alexerson in #1528
  • Added new methods to Sitemap class by @Alexerson in #1527
  • Added new headers= parameter to (Async)RequestFactory and (Async)Client classes by @Alexerson in #1529
  • GDAL-related GeoDjango updates in Django 4.2 by @Alexerson in #1525
  • Added ORM ^ and ~ operator support, JSON lookup classes, Postgres lookup classes, ModelForm changes, json_script template filter parameters by @Alexerson in #1536
  • Added and updated db.backends DatabaseIntrospection and DatabaseOperations classes by @GabDug in #1571

Stubs additions

Stubs fixes

  • Fixed create_model_instance incorrect data argument type by @namper in #1521
  • Marked RequestSite.{save,delete} methods as NoReturn since they always raise by @sobolevn in #1530
  • Updated SafeExceptionReporterFilter attributes and removed obsolete CLEANSED_SUBSTITUTE by @mthuurne in #1540
  • Changed AppConfig.default_auto_field to attribute instead of method by @mthuurne in #1541
  • Fixed default_error_messages attribute type of base Field and GenericIPAddressField classes by @asottile in #1538
  • Improved spatialite DatabaseWrapper attributes by @filbasi in #1544
  • Improved types for Signal dispatch.dispatcher by @GabDug in #1567
  • Accept str field names for Window.order_by(), allow None for asc/desc arguments by @GabDug in #1574
  • Updated many django.utils.* types from stubtest by @GabDug in #1575
  • Updated many db.migrations.operations types from stubtest by @GabDug in #1583
  • Added StepValueValidator, fixed argument for SRIDCacheEntry/EmailValidator, improved urls.resolvers types by @GabDug in #1589

Plugin changes

  • Fixed ForeignKey queryset filters on un-swapped models by @UnknownPlatypus in #1495
  • Add strict_settings option, allow runtime fallbacks for custom settings by @sobolevn in #1557
  • Automatically reset mypy cache when plugin settings change by @sobolevn in #1578
  • Fixed unhandled exception KeyError: 'model_bases' and related errors by @intgr in #1563

django-stubs-ext

  • Added TypedDatabaseRouter as database router base class by @intgr in #1522

CI/testing

  • CI: Replace isort with Ruff import sorting by @intgr in #1507
  • CI: Auto-remove unused imports using Ruff by @intgr in #1508
  • CI: Enable Ruff pyupgrade fixes by @intgr in #1509
  • CI: Run django-stubs-ext tests in full build matrix by @intgr in #1552
  • Remove typecheck test and clean things up by @sobolevn in #1556
  • Add stubtest with lots of errors (currently) by @sobolevn in #1560

Housekeeping

New Contributors

Full Changelog: 4.2.1...4.2.2