chore(deps): update dependency django-stubs to v5
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
django-stubs (changelog) | dev | major |
^4.0.0 -> ^5.0.0
|
Release Notes
typeddjango/django-stubs (django-stubs)
v5.0.0
Announcements
-
QuerySet
class no longer derives fromCollection
. If you run into errors likeincompatible type "_QuerySet[User, User]"; expected "Collection[User]"
, please read this announcement.
Headline changes
- Remove incorrect
Collection
base class and__contains__
method fromQuerySet
by @fidoriel in https://github.com/typeddjango/django-stubs/pull/1925 - Pyright joins the workflow in an advisory capacity by @jorenham in https://github.com/typeddjango/django-stubs/pull/2019
- feat: Allow setting django_settings_module from env by @armanckeser in https://github.com/typeddjango/django-stubs/pull/2021
- Add
ManyRelatedManager.through
attribute and generic type parameter by @flaeppe in https://github.com/typeddjango/django-stubs/pull/2026
What's Changed
- Make
StrPromise
not inherit fromSequence[str]
by @intgr in https://github.com/typeddjango/django-stubs/pull/1841 - Update and prepare for Django 5.0 by @intgr in https://github.com/typeddjango/django-stubs/pull/1859
- Ensure mypy plugin processes inherited many to many fields by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1864
- Include ModelBase subclasses in plugin base class hook condition by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1863
- [5.0] Added many new a-prefixed asynchronous methods by @bigfootjon in https://github.com/typeddjango/django-stubs/pull/1741
- Remove section regarding custom queryset methods from README by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1865
- Fix type of
AppConfig.models_module
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1866 - Allow
None
in settingsMIGRATION_MODULES
dict values by @asottile in https://github.com/typeddjango/django-stubs/pull/1871 - Add type hints for
JSONField.from_db_value
by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1879 - Fix/pyright unknown by @dephiros in https://github.com/typeddjango/django-stubs/pull/1873
- Fix type hints of
converters
inurls.resolvers
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1892 - Update mypy to 1.8.0 by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1885
- Add
@type_check_only
to all Protocols and known stubs-only classes by @intgr in https://github.com/typeddjango/django-stubs/pull/1894 - Fix types for UniqueConstraint instantiation by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1880
- Add
ModuleType
as a possible type toURLResolver.urlconf_name
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1891 - Fix type hint of
URLPattern.default_args
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1895 - Update ruff and silence
PYI046
by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1907 - Use PEP 570 syntax by @Viicos in https://github.com/typeddjango/django-stubs/pull/1908
- Fix readme settings example by @Viicos in https://github.com/typeddjango/django-stubs/pull/1910
- Fix type hint of
EmailBackend.ssl_keyfile
andEmailBackend.ssl_certfile
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1911 - Add type of
django.VERSION
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1916 - Added
CommandParser
tocommands.__init__
by @jamesbraza in https://github.com/typeddjango/django-stubs/pull/1927 - [5.0] add
assume_scheme
to forms.URLField by @asottile in https://github.com/typeddjango/django-stubs/pull/1929 - Fix return type of
BaseModelAdmin.formfield_for_dbfield
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1934 - Revert
pre-commit==3.6.1
by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1936 - Fix type hint of
Response.set_cookie.max_age
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1941 - 5.0: Add ChoicesType by @q0w in https://github.com/typeddjango/django-stubs/pull/1942
- Add through_defaults for RelatedManager methods by @mfosterw in https://github.com/typeddjango/django-stubs/pull/1943
- Update type hints of
core.signing
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1945 - [5.0] Update
core.validators
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1947 - [5.0] Update
core.paginator
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1946 - Generic
forms.ModelChoiceField
by @UnknownPlatypus in https://github.com/typeddjango/django-stubs/pull/1889 - Support processing of other relations and fields when one is broken by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1877
- Allowing
set
inmodel_to_dict
'sexclude
by @jamesbraza in https://github.com/typeddjango/django-stubs/pull/1952 - [5.0] Add django.db.models.GeneratedField by @palfrey in https://github.com/typeddjango/django-stubs/pull/1944
- Fix type hint of
BaseEngine.template_dirs
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1954 - Update type hints of contrib.auth.hashers by @yhay81 in https://github.com/typeddjango/django-stubs/pull/1955
- deps: Upgrade pre-commit for newer versions of python by @delfick in https://github.com/typeddjango/django-stubs/pull/1961
- 5.0: Add auth.middleware.auser by @q0w in https://github.com/typeddjango/django-stubs/pull/1966
- 5.0: Add ModelAdmin.show_facets by @q0w in https://github.com/typeddjango/django-stubs/pull/1967
- ruff: Fix config warnings by @q0w in https://github.com/typeddjango/django-stubs/pull/1964
- 5.0: Add BaseConstraint.violation_error_code by @q0w in https://github.com/typeddjango/django-stubs/pull/1969
- 5.0: Add Signal.asend and Signal.asend_robust by @q0w in https://github.com/typeddjango/django-stubs/pull/1965
- 5.0: Add QuerySet.(a)update_or_create new create_defaults arg by @q0w in https://github.com/typeddjango/django-stubs/pull/1970
- 5.0: Add AdminSite.get_log_entries by @q0w in https://github.com/typeddjango/django-stubs/pull/1963
- 5.0: Add gis ClosestPoint by @q0w in https://github.com/typeddjango/django-stubs/pull/1968
- 5.0: Rename save_existing arg instance to obj by @q0w in https://github.com/typeddjango/django-stubs/pull/1971
- 5.0: Remove admin.helpers.checkbox by @q0w in https://github.com/typeddjango/django-stubs/pull/1972
- 5.0: Change annotation_select_mask from set[str] to list[str] by @q0w in https://github.com/typeddjango/django-stubs/pull/1973
- fixup: Pass violation_error_code to init by @q0w in https://github.com/typeddjango/django-stubs/pull/1975
- Avoid returning None from get_field_related_model_cls by @SingingTree in https://github.com/typeddjango/django-stubs/pull/1956
- 5.0: Pass positional args name and violation_error_message to BaseConstraint by @q0w in https://github.com/typeddjango/django-stubs/pull/1974
- 5.0: Remove pytz support by @q0w in https://github.com/typeddjango/django-stubs/pull/1980
- 5.0: Remove global setting USE_L10N by @q0w in https://github.com/typeddjango/django-stubs/pull/1979
- 5.0: Remove OSMGeoAdmin, GeoModelAdmin by @q0w in https://github.com/typeddjango/django-stubs/pull/1981
- 5.0: Remove extra_tests arg for DiscoverRunner.build_suite/run_tests by @q0w in https://github.com/typeddjango/django-stubs/pull/1978
- 5.0: Remove django.utils baseconv and datetime_safe modules by @q0w in https://github.com/typeddjango/django-stubs/pull/1977
- 5.0: Add request arg to ModelAdmin.lookup_allowed by @q0w in https://github.com/typeddjango/django-stubs/pull/1976
- Add URL converter protocol type by @adamchainz in https://github.com/typeddjango/django-stubs/pull/1984
- Fix type annotation for RegisterLookupMixin.class_lookups by @avoronov-box in https://github.com/typeddjango/django-stubs/pull/1962
- Update django to 5.0.3 by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1990
- Remove some deprecated Django 3.x APIs by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1991
- Fix BaseModelAdmin.view_on_site annotation by @cuu508 in https://github.com/typeddjango/django-stubs/pull/1993
- Allow immutable
extra_context
onTemplateView
s by @samueljsb in https://github.com/typeddjango/django-stubs/pull/1994 - Add BoundField.html() by @pelme in https://github.com/typeddjango/django-stubs/pull/1999
- Allow timedelta type for session.set_expiry() argument by @mlazar-endear in https://github.com/typeddjango/django-stubs/pull/2001
- Bump
pytest-mypy-plugins
to 3.1.1 by @sobolevn in https://github.com/typeddjango/django-stubs/pull/2003 - Update mypy, add a bit more metadata by @sobolevn in https://github.com/typeddjango/django-stubs/pull/1997
- 5.0: Update
django.contrib.auth
by @ngnpope in https://github.com/typeddjango/django-stubs/pull/2009 - 5.0: Update
django.conf
by @ngnpope in https://github.com/typeddjango/django-stubs/pull/2008 - 5.0: Update
django.views
by @ngnpope in https://github.com/typeddjango/django-stubs/pull/2007 - 5.0: Update
django.test
by @ngnpope in https://github.com/typeddjango/django-stubs/pull/2005 - 5.0: Update
django.utils
by @ngnpope in https://github.com/typeddjango/django-stubs/pull/2006 - Specify d.c.serializers.base.DeserializedObject.object type by @j00bar in https://github.com/typeddjango/django-stubs/pull/2010
- Clean the cache on each run of
stubtest
by @sobolevn in https://github.com/typeddjango/django-stubs/pull/2015 - Keep abstract Django models internally in the plugin by @flaeppe in https://github.com/typeddjango/django-stubs/pull/2017
- Add GitHub actions release workflow by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1950
- Adding missing
Q
methods:check()
,flatten()
by @Alexerson in https://github.com/typeddjango/django-stubs/pull/1899 - Improve types in
utils.termcolors
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1901 - Set the calculated metaclass when creating type info in the plugin by @flaeppe in https://github.com/typeddjango/django-stubs/pull/2025
- Do not annotate MRs with pyright by @sobolevn in https://github.com/typeddjango/django-stubs/pull/2023
- Use
PRI_MYPY
inget_additional_deps
hook by @sobolevn in https://github.com/typeddjango/django-stubs/pull/2024 - Update
_default_manager
and_base_manager
to beManager
by @flaeppe in https://github.com/typeddjango/django-stubs/pull/2022 - Determine the type of queryset methods on unions by @delfick in https://github.com/typeddjango/django-stubs/pull/2027
- Add first stub for get_model_admin by @nebiyuelias1 in https://github.com/typeddjango/django-stubs/pull/2029
- 5.0: Update
django.contrib.admin
by @ngnpope in https://github.com/typeddjango/django-stubs/pull/2004 - [5.0] Update
core.files
by @Viicos in https://github.com/typeddjango/django-stubs/pull/1949 - [5.0] Update
core.cache.backends
, addRedisCache
and related classes by @Viicos in https://github.com/typeddjango/django-stubs/pull/1948 - Fix
AsyncClient.defaults
attribute typing by @flaeppe in https://github.com/typeddjango/django-stubs/pull/1878 - Relax type for
fields
argument ofModel.refresh_from_db()
by @mthuurne in https://github.com/typeddjango/django-stubs/pull/2035 - [5.0] Add missing stubs for geos by @nebiyuelias1 in https://github.com/typeddjango/django-stubs/pull/2034
- Make
AdminSite.get_model_admin
generic by @Viicos in https://github.com/typeddjango/django-stubs/pull/2038 - [5.0] Add
db_default=
parameter to modelsField
classes by @Skorpyon in https://github.com/typeddjango/django-stubs/pull/1876 - Remove
class Meta
fromModel
andForm
class stubs by @jorenham in https://github.com/typeddjango/django-stubs/pull/2000 - Add datetime.timedelta as valid type for HttpRequest.get_signed_cookie() max_age argument. by @pelme in https://github.com/typeddjango/django-stubs/pull/2045
- CI: Update Django 4.2 version used for test suite by @intgr in https://github.com/typeddjango/django-stubs/pull/2049
- Refine return type for
ManyToOneRel.get_accessor_name()
by @mthuurne in https://github.com/typeddjango/django-stubs/pull/2052 - Add
DeferredAttribute.__get__()
by @mthuurne in https://github.com/typeddjango/django-stubs/pull/2050 - Add missing methods and superclass to
FieldFile
by @mthuurne in https://github.com/typeddjango/django-stubs/pull/2051 - Add
db_comment=
parameter to Postgres and GIS model fields by @saJaeHyukc in https://github.com/typeddjango/django-stubs/pull/2054 - Correct type for
db.models.sql.query.Query.join()
argument by @mthuurne in https://github.com/typeddjango/django-stubs/pull/2055 - 5.0: Update
django.db.backends.oracle.base
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2057 - 5.0: Update
django.test.client
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2059 - 5.0: Update
django.test.html
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2060 - 5.0: Update
django.test.runner
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2061 - 5.0: Update
django.template
,django.templatetags
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2063 - 5.0: Update
django.test.testcases
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2062 - 5.0: Update
django.http
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2064 - 5.0: Update
django.core.management
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2067 - 5.0: Update
django.core.handlers
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2066 - 5.0: Update
django.contrib.sessions.serializers
,django.core.serializers
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2068 - Update django app related types by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2071
- Add a
returncode
attribute toCommandError
by @flaeppe in https://github.com/typeddjango/django-stubs/pull/2072 - Disable mypy
ignore_missing_imports
option by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2058 - fix typing for URL validator.call by @asottile in https://github.com/typeddjango/django-stubs/pull/2074
- Use field generic types for descriptors by @md384 in https://github.com/typeddjango/django-stubs/pull/2048
- 5.0: Update
django.core.servers.basehttp
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2070 - Update
django.template.base.Template.render()
argument type by @Majsvaffla in https://github.com/typeddjango/django-stubs/pull/1160 - 5.0: Add
django.utils.choices
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2075 - 5.0: Update
django.contrib.sitemaps
,django.contrib.staticfiles
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2076 - Update pyright report options (
reportMissingTypeArgument
,reportPrivateUsage
) by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2077 - 5.0: Update
django.contrib.postgres
by @sudosubin in https://github.com/typeddjango/django-stubs/pull/2078 - Add
path
signature for async views by @jlost in https://github.com/typeddjango/django-stubs/pull/2085 - Remove incorrect
Reversible
base class fromQuerySet
by @intgr in https://github.com/typeddjango/django-stubs/pull/2094 - Version 5.0.0 release (django-stubs, django-stubs-ext) by @flaeppe in https://github.com/typeddjango/django-stubs/pull/2087
New Contributors
- @Viicos made their first contribution in https://github.com/typeddjango/django-stubs/pull/1866
- @dephiros made their first contribution in https://github.com/typeddjango/django-stubs/pull/1873
- @jamesbraza made their first contribution in https://github.com/typeddjango/django-stubs/pull/1927
- @mfosterw made their first contribution in https://github.com/typeddjango/django-stubs/pull/1943
- @palfrey made their first contribution in https://github.com/typeddjango/django-stubs/pull/1944
- @yhay81 made their first contribution in https://github.com/typeddjango/django-stubs/pull/1955
- @delfick made their first contribution in https://github.com/typeddjango/django-stubs/pull/1961
- @SingingTree made their first contribution in https://github.com/typeddjango/django-stubs/pull/1956
- @avoronov-box made their first contribution in https://github.com/typeddjango/django-stubs/pull/1962
- @cuu508 made their first contribution in https://github.com/typeddjango/django-stubs/pull/1993
- @samueljsb made their first contribution in https://github.com/typeddjango/django-stubs/pull/1994
- @pelme made their first contribution in https://github.com/typeddjango/django-stubs/pull/1999
- @mlazar-endear made their first contribution in https://github.com/typeddjango/django-stubs/pull/2001
- @j00bar made their first contribution in https://github.com/typeddjango/django-stubs/pull/2010
- @jorenham made their first contribution in https://github.com/typeddjango/django-stubs/pull/2019
- @fidoriel made their first contribution in https://github.com/typeddjango/django-stubs/pull/1925
- @armanckeser made their first contribution in https://github.com/typeddjango/django-stubs/pull/2021
- @nebiyuelias1 made their first contribution in https://github.com/typeddjango/django-stubs/pull/2029
- @Skorpyon made their first contribution in https://github.com/typeddjango/django-stubs/pull/1876
- @saJaeHyukc made their first contribution in https://github.com/typeddjango/django-stubs/pull/2054
- @sudosubin made their first contribution in https://github.com/typeddjango/django-stubs/pull/2057
- @md384 made their first contribution in https://github.com/typeddjango/django-stubs/pull/2048
- @Majsvaffla made their first contribution in https://github.com/typeddjango/django-stubs/pull/1160
- @jlost made their first contribution in https://github.com/typeddjango/django-stubs/pull/2085
Full Changelog: https://github.com/typeddjango/django-stubs/compare/4.2.7...5.0.0
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.