Update dependency django-stubs to v4
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
django-stubs (changelog) | dependencies | major |
^1.1 -> ^4.2
|
Release Notes
typeddjango/django-stubs
v4.2.0
Headline changes
- New version scheme: django-stubs will now use the same major.minor version number as Django. Our Django support policy remains the same: Older versions are still partially supported, and we will continue supporting them as long as it's not a maintenance burden.
- Django 4.2: This release adds initial support for some new features in 4.2. There is still work to do, feel free to open issues or submit pull requests!
- mypy 1.2.0: Recommended mypy version updated to 1.2.0
- Compatibility: This is the last release to support Python version 3.7 and Django 4.0.
Django 4.2 additions
- Added
django.utils.http.content_disposition_header()
function by @alexmv in https://github.com/typeddjango/django-stubs/pull/1448 - Add stubs for new async
Model
methods by @bigfootjon in https://github.com/typeddjango/django-stubs/pull/1443
Other stubs additions
- Added
Query.join()
method by @RyanWalker277 in https://github.com/typeddjango/django-stubs/pull/1404 - Added
Query.where
attribute by @RyanWalker277 in https://github.com/typeddjango/django-stubs/pull/1407 - Added
Model
methodsdate_error_message()
,get_constraints()
,serializable_value()
,prepare_database_save()
Addedapp_label=
argument toAdminSite.get_app_list()
by @RyanWalker277 in https://github.com/typeddjango/django-stubs/pull/1413 - Added
BaseConstraint.default_violation_error_message
attribute by @RyanWalker277 in https://github.com/typeddjango/django-stubs/pull/1419 - Added
BaseUserCreationForm
class by @monosans in https://github.com/typeddjango/django-stubs/pull/1424 - Improve
Form
,FormSet
,BoundField
,ErrorDict
andErrorList
rendering types. AddedIntegerField.step_size
attribute and argument by @monosans in https://github.com/typeddjango/django-stubs/pull/1427 - Added type
JSONObject.__init__()
constructor by @realsuayip in https://github.com/typeddjango/django-stubs/pull/1430 - Added
RenameIndex
migration from Django 4.1 by @karamanolev in https://github.com/typeddjango/django-stubs/pull/1438 - Added
STORAGES
setting by @federicobond in https://github.com/typeddjango/django-stubs/pull/1439
Stubs fixes
- Allow lazy translation strings for constraint
violation_error_message
arguments, attributes by @realsuayip in https://github.com/typeddjango/django-stubs/pull/1418 - Allow setting
SECRET_KEY
to be str or bytes, addSECRET_KEY_FALLBACKS
, updatePasswordResetTokenGenerator
by @christianbundy in https://github.com/typeddjango/django-stubs/pull/1411 - Allow passing
BaseExpression
toUniqueConstraint.expressions
by @realsuayip in https://github.com/typeddjango/django-stubs/pull/1420 - Allow middlewares to return
StreamingReponse
by @rik in https://github.com/typeddjango/django-stubs/pull/1421 - Removed
Manager.delete()
method which is not accessible onManager
by @mschoettle in https://github.com/typeddjango/django-stubs/pull/1431 - Allow lazy translation strings in email contexts by @realsuayip in https://github.com/typeddjango/django-stubs/pull/1442
- Fixed
aiterator()
method ofQuerySet
andBaseManager
by @kjagiello in https://github.com/typeddjango/django-stubs/pull/1449 - Syndication
Feed
items do not need to beModel
instances by @bigfootjon in https://github.com/typeddjango/django-stubs/pull/1444
Mypy plugin fixes
- Allow custom
Manager
andQuerySet
classes to be inner class ofModel
by @federicobond in https://github.com/typeddjango/django-stubs/pull/1392 - Fixed handling of
ForeignKey
in abstract models when usingto=
with a string reference by @Kircheneer in https://github.com/typeddjango/django-stubs/pull/1436 - Handle repeated field lookups in calls to
QuerySet.values_list()
by @leamingrad in https://github.com/typeddjango/django-stubs/pull/1441 - Handle
Model
relations created withForeignObject
/ForeignObjectRel
by @Photonios in https://github.com/typeddjango/django-stubs/pull/1451
Other improvements
- Don't require
tomli
dependency on Python>=3.11 by @monosans in https://github.com/typeddjango/django-stubs/pull/1423
Tests & CI
- Add tests for
QuerySet.select_related
returning queryset type by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1400 - Add test for overriding User model manager by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1401
- CI: Add Django 4.2 to typecheck and update other Django versions by @intgr in https://github.com/typeddjango/django-stubs/pull/1455
- CI: Stop testing with Python 3.7 by @intgr in https://github.com/typeddjango/django-stubs/pull/1453
- Run CI with Django 4.2 and declare support in package metadata by @intgr in https://github.com/typeddjango/django-stubs/pull/1452
Dependencies
- Sync pre-commit and requirements by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1417
- Update compatible-mypy & CI to mypy 1.2.0 by @intgr in https://github.com/typeddjango/django-stubs/pull/1429
- Bump isort to 5.12.0 by @leamingrad in https://github.com/typeddjango/django-stubs/pull/1440
- Version 4.2.0 release (django-stubs, django-stubs-ext) by @intgr in https://github.com/typeddjango/django-stubs/pull/1458
Deferred for next release
- Added
decorators.AsyncGetResponseCallable
Protocol, but is not yet used anywhere by @RyanWalker277 in https://github.com/typeddjango/django-stubs/pull/1425 - Added
BaseModelMeta
for typing Model inner Meta class by @intgr in https://github.com/typeddjango/django-stubs/pull/1375 - Rename
BaseModelMeta
toTypedModelMeta
and document it by @intgr in https://github.com/typeddjango/django-stubs/pull/1456
New Contributors
- @realsuayip made their first contribution in https://github.com/typeddjango/django-stubs/pull/1418
- @monosans made their first contribution in https://github.com/typeddjango/django-stubs/pull/1424
- @karamanolev made their first contribution in https://github.com/typeddjango/django-stubs/pull/1438
- @Kircheneer made their first contribution in https://github.com/typeddjango/django-stubs/pull/1436
- @kjagiello made their first contribution in https://github.com/typeddjango/django-stubs/pull/1449
- @alexmv made their first contribution in https://github.com/typeddjango/django-stubs/pull/1448
- @bigfootjon made their first contribution in https://github.com/typeddjango/django-stubs/pull/1443
Full Changelog: https://github.com/typeddjango/django-stubs/compare/1.16.0...4.2.0
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.