Releases: typeddjango/djangorestframework-stubs
3.14.1
Headline changes
- mypy 1.3.0: Recommended mypy version updated to 1.3.0
- Compatibility: Support for Python 3.7 has been dropped.
Stubs changes
- Changed
BaseMetadata.determine_metadata()
return type toAny
by @realsuayip in #394 - Allow passing lazy translation strings to
RelatedField
and subclasses by @nils-van-zuijlen in #405 - Replaced
OrderedDict
withdict
by @terencehonles in #414 - Changed from
list
to abstractSequence
type for http verbs by @namper in #415 - Removed long-deprecated
Request
propertiesDATA
,QUERY_PARAMS
by @intgr in #420
Housekeeping
- Drop Python 3.7 compatibility by @intgr in #399
- Run pre-commit only on pre-commit.ci by @intgr in #408
- CI: Always install django-stubs from git master by @intgr in #417
- Update compatible-mypy to 1.3.0 by @intgr in #416
- Version 3.14.1 release by @intgr in #422
New Contributors
- @realsuayip made their first contribution in #394
- @namper made their first contribution in #415
Full Changelog: 3.14.0...3.14.1
3.14.0
Headline changes
- New version scheme: djangorestframework-stubs will now use the same major.minor version number as Django REST Framework.
- mypy 1.2.0: Recommended mypy version updated to 1.2.0
- Compatibility: This is the last release to support Python 3.7.
Stubs changes
- Fixed
OrderingFilter.get_default_ordering()
return type it may returnNone
by @albertocerrone in #379 - Improve
APIException
input and detail types by @intgr in #387
Housekeeping
- Update compatible-mypy 1.2.0 by @dependabot in #392
- Version 3.14.0 release by @intgr in #398
New Contributors
- @albertocerrone made their first contribution in #379
Full Changelog: 1.10.0...3.14.0
1.10.0
What's Changed
This release updates recommended mypy version to 1.1.x.
Stubs fixes
- Allow passing
user=None
toAPIClient.force_authenticate()
method by @joshuadavidthomas in #367
Housekeeping
- Release script: Also clean build directories before a build by @intgr in #366
- Update recommended mypy & CI to 1.1.1 by @intgr in #374
- Update
django-stubs
inrequirements.txt
by @sobolevn in #376 - Version 1.10.0 release by @intgr in #377
New Contributors
- @joshuadavidthomas made their first contribution in #367
Full Changelog: 1.9.1...1.10.0
1.9.1
Emergency release to fix packaging issues in yesterday's version.
For yet unknown reasons, the wheel package of djangorestframework-stubs 1.9.0 also contained the full source code of Django REST Framework version 3.11. Thus installing djangorestframework-stubs 1.9.0 would overwrite djangorestframework files.
To fix an installation with this issue: pip uninstall djangorestframework djangorestframework-stubs && pip install djangorestframework djangorestframework-stubs==1.9.1
(tweak as necessary if you need a particular djangorestframework version)
Thanks to @monosans for debugging this issue. For details, see #362
What's Changed
Housekeeping
- Update package metadata: release notes URL, classifiers, maintainer by @intgr in #359
- Version 1.9.1 release by @intgr in #365
Project CI
- Adds
pre-commit
CI by @sobolevn in #360 - Fix strict mypy errors in plugin and scripts by @intgr in #363
- CI: Run mypy on self check by @sobolevn in #361
Full Changelog: 1.9.0...1.9.1
1.9.0
This release updates recommended mypy version to 1.0.x.
In addition to code contributions, I'd like to thank @PedroPerpetua @sobolevn @mschoettle @piotrszyma for helping out with reviews.
What's Changed
Type stubs
- Allow subclasses of APIView to override get_permissions with return type implementing _SupportsHasPermission by @guldfisk in #320
- Add return type to APIClient.get method by @piotrszyma in #330
- Fix type of data parameter in get test requests by @nils-van-zuijlen in #267
Type stubs: Serializer fields
- Fix encoder and decoder params on JSONField by @zetahernandez in #304
- Add missing allow_empty arg to ManyRelatedField by @guldfisk in #322
- Add max_length and min_length args for ListSerializer signature by @imamatory in #336
Type stubs: Strings/translations
- Allow StrPromise to be used in exceptions by @XF-FW in #297
- Allow StrOrPromise in various places by @terencehonles & @piotrszyma in #301 & #331
Dependencies
- Upgrade to Mypy 1.0 by @christianbundy in #339
- Update Black to 23.1.0 and reformat with new style by @intgr in #335
CI & Housekeeping
- Run pre-commit isort on pyi files by @intgr in #347
- Fix CI: add typecheck suppression & upgrade flake8-pyi by @intgr in #303
- Fix CI typecheck (add new ignore) by @intgr in #311
- Fix CI: Run apt-get update before install by @intgr in #316
- Fix CI typecheck (add new ignores) by @intgr in #323
- CI: Freeze DRF commit used in typecheck_tests and types-requests/types-urllib3 by @intgr in #345
- CI: Use django-stubs 1.14.0 for testing by @intgr in #346
- CI: Enable testing with Python 3.11 by @intgr in #284
- Version 1.9.0 release by @intgr in #357
New Contributors
- @zetahernandez made their first contribution in #304
- @guldfisk made their first contribution in #320
- @piotrszyma made their first contribution in #330
- @imamatory made their first contribution in #336
- @christianbundy made their first contribution in #339
- @nils-van-zuijlen made their first contribution in #267
Full Changelog: 1.8.0...1.9.0
Version 1.8.0
What's Changed
-
Now testing compatibility with django-stubs 1.13.0, Python 3.10 and mypy 0.991
-
Make coreapi & markdown requirements optional by @intgr in #243
-
Preserve generic in extended generic views and viewsets by @henribru in #215
-
Add missing PageNumberPagination.get_page_number() method by @intgr in #263
-
Fixes #230 - Add missing attributes to APIClient method Response objects by @mattwwarren in #283
-
Introduce
flake8-pyi
inpre-commit
checks by @hoefling in #286This converts our
.pyi
files to follow mostly the same conventions as typeshed project, such as new|
union syntax and using lowercase types dict/list.https://github.com/python/typeshed/blob/main/CONTRIBUTING.md#conventions
-
Add 'HEAD' to accepted HTTP verbs list by @mvandenburgh in #249
-
Add DecimalField(normalize_output=) from DRF master by @intgr in #294
Continuous integration
- Fix errors in CI by @intgr in #273
- Fix CI: Use flake8 from GitHub not GitLab by @intgr in #289
- CI: Enable testing with Python 3.10 by @intgr in #292
- CI: Remove unused typecheck ignores by @intgr in #295
Dependency updates
- Bump types-pytz from 2022.1.0 to 2022.1.1 by @dependabot in #240
- Bump actions/setup-python from 3 to 4 by @dependabot in #231
- Bump pre-commit from 2.19.0 to 2.20.0 by @dependabot in #241
- Bump types-pytz from 2022.1.1 to 2022.1.2 by @dependabot in #245
- Update django-stubs, mypy, pytest-mypy-plugins & fix tests by @intgr in #279
- Update to mypy 0.991 for compatible-mypy & CI by @intgr in #280
- Bump types-pytz from 2022.1.2 to 2022.6.0.1 by @dependabot in #272
- Bump gitpython from 3.1.27 to 3.1.29 by @dependabot in #266
- Bump pytest from 7.1.2 to 7.2.0 by @dependabot in #269
- Bump djangorestframework from 3.13.1 to 3.14.0 by @dependabot in #256
- Version 1.8.0 release by @intgr in #293
New Contributors
- @github-actions made their first contribution in #246
- @mattwwarren made their first contribution in #283
- @hoefling made their first contribution in #286
- @mvandenburgh made their first contribution in #249
Full Changelog: 1.7.0...1.8.0
Version 1.7.0
Version 1.7.0
Version 1.6.0
- mypy 0.950 support
Version 1.5.0
Version 1.5.0
Version 1.4.0
Version 1.4.0