Version 1.13.0 and django-stubs-ext@0.7.0
What's Changed
- Set generic type of SimpleCookie by @w0rp in #1018
- Update RunSQL type to include parametrized sql by @lachtanek in #1015
- BaseContext.copy by @smithdc1 in #1012
- Add missing type for TestCase.captureOnCommitCallbacks by @lachtanek in #1016
- Fix nullability of blank charfields in values and values_list by @ljodal in #1020
- Improved type of template.loader.get_template() by @smithdc1 in #1011
- Bump black from 22.3.0 to 22.6.0 by @dependabot in #1027
- Fix
logger
type in all modules by @sobolevn in #1031 - Support cursor.execute(psycopg2.sql.Composable) by @andersk in #1029
- Bump requests from 2.28.0 to 2.28.1 by @dependabot in #1035
- Improved return type of render_to_string(). by @smithdc1 in #1036
- Resolve all queryset methods on managers as attributes by @ljodal in #1028
- Populate model argument for dynamically created managers by @flaeppe in #1033
- Fix type stubs for EmptyManager by @ljodal in #1039
- Improve stubs with minor fixes by @PIG208 in #1038
- Monkeypatch some more generics. by @ngnpope in #1050
- Bump pre-commit from 2.19.0 to 2.20.0 by @dependabot in #1057
- Use
_AsSqlType
foras_sql
by @PIG208 in #1052 - Made BaseContext setitem and getitem consistant. by @smithdc1 in #1040
- Add support for inline
from_queryset
in model classes by @ljodal in #1045 - Improve typing for unresolved managers by @ljodal in #1044
- Use a more general type for django.core.mail.send_mass_mail's datatuple by @jhhayashi in #1062
- Auto-update pre-commit hooks by @github-actions in #1070
- Improve type annotation of DiscoverRunner. by @PIG208 in #1069
- Fix overloads and remove
PathLike
infinders
by @andersk in #1063 - Fix type annotation of message_dict. by @PIG208 in #1073
- Tighten
management.get_commands
type by @andersk in #1074 - Improve stubs for contrib.postgres.operations. by @PIG208 in #1071
- Improve type for @require_http_methods by @adamchainz in #1075
- Auto-update pre-commit hooks by @github-actions in #1076
- Support Lookup generics. by @PIG208 in #1079
- Fix OutputWrapper.style_func type by @andersk in #1080
- Fix type of min_value and max_value on FloatField by @UnknownPlatypus in #1081
- docs(README): Fix indentation in list and examples by @tony in #1083
- Remove trailing whitespace in README to fix CI failure by @andersk in #1084
- Fix CI error introduced since Django 4.1 by @PIG208 in #1093
- Add preset options list to makemessages command. by @PIG208 in #1091
- Improve type annotation for RunSQL by @PIG208 in #1090
- Fix base_field type for SimpleArrayField by @adnathanail in #1097
- Prevent building an editable wheel with setuptools<64 by @andersk in #1123
- Improve hints for BaseCache by @adamchainz in #1117
- Add HttpResponseBase.contains by @adamchainz in #1099
- Add BaseDatabaseWrapper.operators by @adamchainz in #1119
- Add SimpleTestCase.assertURLEqual() by @adamchainz in #1102
- Allow None to be passed to Paginator.get_page by @adamchainz in #1101
- Improve types for CheckMessage subclasses by @adamchainz in #1107
- Expose HttpResponseBase in django.http by @adamchainz in #1121
- Improve types for DiscoverRunner by @adamchainz in #1106
- Improve return type for BaseCommand.execute() by @adamchainz in #1104
- Fix CI by @sobolevn in #1108
- Improve type hints for test client response.context by @adamchainz in #1100
- Add test client response.redirect_chain by @adamchainz in #1124
- Add different signatures for form assertions from Django 4.1 by @adamchainz in #1105
- Run stubs self-check on all python versions by @sobolevn in #1126
- Add database Field.non_db_attrs by @adamchainz in #1125
- Rewrite SessionBase properties to use
@property
by @adamchainz in #1129 - Add db Field.flatchoices by @adamchainz in #1128
- Add HttpRequest current_app and LANGUAGE_CODE attrs by @adamchainz in #1127
- Updating deconstructible by @karolyi in #1116
- Type
samesite
values as literals 'Lax', 'Strict' or 'None' by @flaeppe in #1110 - Enhance stubs for csrf decorators. by @PIG208 in #1130
- Return Promise for lazy functions. by @PIG208 in #689
- Add async queryset for Django 4.1 by @xncbf in #1131
- Add Q.xor by @adamchainz in #1133
- Improve database backend types by @adamchainz in #1132
- Improve types for QuerySet.contains and bulk_create by @adamchainz in #1134
- Fix Manager.contains and bulk_create by @adamchainz in #1135
- Add QuerySet.aiter() by @adamchainz in #1136
- Fix return type for django.shortcuts.render by @SebastiaanZ in #1140
- Bump black from 22.6.0 to 22.8.0 by @dependabot in #1141
- Auto-update pre-commit hooks by @github-actions in #1142
- fix type hint for GenericSitemap(info_dict) by @djbrown in #1111
- Reflect the deprecation of get_response being None. by @PIG208 in #1086
- Add django.db.models.functions.Collate by @syre in #1143
- Bump pytest from 7.1.2 to 7.1.3 by @dependabot in #1144
- Correct EmailMultiAlternatives.body by @adamchainz in #1146
- Add type and parameter fields to MediaType by @yrd in #1103
- Improve Flake8 config by @adamchainz in #1149
- Serialize
RelatedManager
attributes in cache by @flaeppe in #1152 - Auto-update pre-commit hooks by @github-actions in #1153
- Adjust
choices=
type variance for model fields by @flaeppe in #1154 - Broaden type annotation for verbose_name(_plural) to accept lazystr. by @PIG208 in #1139
- Improve stubs for runserver management command. by @PIG208 in #1037
- Relax
fields=
arg forrefresh_from_db
to acceptSequence
by @flaeppe in #1156 - Fix paramters for ParallelTestSuite and RemoteTestRunner. by @PIG208 in #1072
- Fix unresolved placeholder error during serialization by @ljodal in #1161
- Disable fallback to runtime types for Django settings by @andersk in #1163
- Auto-update pre-commit hooks by @github-actions in #1164
- Auto-update pre-commit hooks by @github-actions in #1165
- Update mypy to 0.981 by @sobolevn in #1167
- Allow Promise to be passed to ArrayField.verbose_name by @ljodal in #1168
- Disallow passing bytes for Field verbose_name by @intgr in #1170
- Don't allow promise to be passed to ArrayField.name by @ljodal in #1171
- Implement support for
<QuerySet>.as_manager()
by @flaeppe in #1025 - Add SETTINGS_MODULE to Settings and LazySettings by @ljodal in #1175
- Fix type of _id when using ForeignKey(to_field=) by @intgr in #1176
- Add UUIDField lookup types by @intgr in #1178
- Reparametrize managers without explicit type parameters by @ljodal in #1169
- Bump mypy from 0.981 to 0.982 by @dependabot in #1180
- Auto-update pre-commit hooks by @github-actions in #1181
- Add missing re-export for JSONObject. by @PIG208 in #1182
- Update utils.log.log_response type for Django 4.1 by @andersk in #1183
- Auto-update pre-commit hooks by @github-actions in #1186
- Bump gitpython from 3.1.27 to 3.1.28 by @dependabot in #1185
- Bump black from 22.8.0 to 22.10.0 by @dependabot in #1184
- Auto-update pre-commit hooks by @github-actions in #1188
- Bump gitpython from 3.1.28 to 3.1.29 by @dependabot in #1187
- Fix
RelatedManager
not callable by @UnknownPlatypus in #1191 - Update cache timeout parameters to floats by @adamchainz in #1193
- Standardize all context manager exit methods by @adamchainz in #1194
- Add hints for instance variables in console.EmailBackend by @leamingrad in #1200
- Generic sitemap by @UnknownPlatypus in #1198
- Allow
assertQuerysetEqual
to compare with a collection of values by @flaeppe in #1201 - Improve type of
TestCase.captureOnCommitCallbacks
by @flaeppe in #1202 - Bump pytest-mypy-plugins from 1.10.0 to 1.10.1 by @dependabot in #1205
- Bump pytest from 7.1.3 to 7.2.0 by @dependabot in #1203
- Add auto_now attrs to date and time model fields by @adamchainz in #1210
- Add django.db.models.base.model_unpickle by @adamchainz in #1209
- Add BaseDetailView.object by @adamchainz in #1211
- Add BaseDatabaseSchemaEditor.table_sql() by @adamchainz in #1212
- Add lots of missing argument & return type hints by @intgr in #1204
- Fixed
F
'sasc
anddesc
args by @g-as in #1213 - BaseDeleteView now extends FormMixin by @adamchainz in #1215
- Auto-update pre-commit hooks by @github-actions in #1216
- Add type hints to all test code by @intgr in #1217
- Fill remaining missing hints with Any & disallow partial hints by @intgr in #1206
- Remove bad redirect_chain attributes by @adamchainz in #1148
- Re-allow expressions in UniqueConstraint by @adamchainz in #1220
- Add some types to views by @adamchainz in #1221
New Contributors
- @lachtanek made their first contribution in #1015
- @smithdc1 made their first contribution in #1012
- @ngnpope made their first contribution in #1050
- @jhhayashi made their first contribution in #1062
- @UnknownPlatypus made their first contribution in #1081
- @tony made their first contribution in #1083
- @adnathanail made their first contribution in #1097
- @karolyi made their first contribution in #1116
- @SebastiaanZ made their first contribution in #1140
- @djbrown made their first contribution in #1111
- @syre made their first contribution in #1143
- @yrd made their first contribution in #1103
Full Changelog: https://github.com/typeddjango/django-stubs/compare/django-stubs@1.12.0...1.13.0