New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix overriding AppConfig.default_auto_field with string value #1596
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have approve perms, but this LGTM. Thanks for the fix!
We should make a release with this fix. Unfortunately, I have issues with my computer and won't be able to release a fixed django-stubs until tomorrow evening. Anyone else up for it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing the fix so quickly!
I'll go ahead and do a quick release it to close the regression.
This was fixed in django-stubs 4.2.3. |
Thanks! |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [django-stubs](https://togithub.com/typeddjango/django-stubs) ([changelog](https://togithub.com/typeddjango/django-stubs/releases)) | dev | patch | `4.2.2` -> `4.2.3` | --- ### Release Notes <details> <summary>typeddjango/django-stubs (django-stubs)</summary> ### [`v4.2.3`](https://togithub.com/typeddjango/django-stubs/releases/tag/4.2.3) [Compare Source](https://togithub.com/typeddjango/django-stubs/compare/4.2.2...4.2.3) This version fixes two regressions in previons `django-stubs` release and also a few other fixes and improvements. Special thanks to [@​GabDug](https://togithub.com/GabDug) for contributing regression fixes on a short order. This time there is no corresponding release of `django-stubs-ext`. ##### Stubs fixes - Fixed type error when subclassing `AppConfig` and assigning string to `default_auto_field` by [@​GabDug](https://togithub.com/GabDug) in [typeddjango/django-stubs#1596 - Fixed type error when subclassing `MiddlewareMixin.__call__()` and using `return self.get_response()` by [@​GabDug](https://togithub.com/GabDug) in [typeddjango/django-stubs#1595 - Allow `None` as `redirect_field_name` value for `@user_passes_test` and `@login_required` decorators by [@​JoeHitchen](https://togithub.com/JoeHitchen) in [typeddjango/django-stubs#1600 ##### Plugin fixes - Fixed long-standing issue with `Date(Time)Field` when using mypy setting `disallow_any_explicit` by [@​sobolevn](https://togithub.com/sobolevn) in [typeddjango/django-stubs#1599 ##### Stubs changes - Added `BigIntegerField.MAX_BIGINT` attribute by [@​asottile](https://togithub.com/asottile) in [typeddjango/django-stubs#1598 - Improved Jinja2 types and updated `pytest-mypy-plugins` by [@​sobolevn](https://togithub.com/sobolevn) in [typeddjango/django-stubs#1601 ##### CI/Testing - Run tests in multiple shards and all Python versions by [@​sobolevn](https://togithub.com/sobolevn) in [typeddjango/django-stubs#1603 ##### Housekeeping - Converted `_typeshed.Self` usages to `typing_extensions.Self` (PEP 673) by [@​intgr](https://togithub.com/intgr) in [typeddjango/django-stubs#1591 - Version 4.2.3 release (django-stubs only) by [@​intgr](https://togithub.com/intgr) in [typeddjango/django-stubs#1604 #### New Contributors - [@​JoeHitchen](https://togithub.com/JoeHitchen) made their first contribution in [typeddjango/django-stubs#1600 **Full Changelog**: typeddjango/django-stubs@4.2.2...4.2.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xLjExIiwidXBkYXRlZEluVmVyIjoiMzYuMS4xMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
I have made things!
Loosen the typing for
AppConfig.default_auto_field
to allowstr
or@property
-likeRelated issues
Format is:
AppConfig.default_auto_field
-- Incompatible types in assignment #1593