Skip to content

Conversation

sobolevn
Copy link
Member

We need this setting so we can test sentry in mypy-primer. To test it, we need to help Sentry's team to use our package, without their custom fork.

So, setting strict_model_abstract_attrs = false should do the trick for them.
It can be also helpful for other big projects to adopt django-stubs.

CC @flaeppe and @asottile-sentry

Refs hauntsaninja/mypy_primer#202

@sobolevn
Copy link
Member Author

@UnknownPlatypus do you have any ideas on why this happens? :)

@sobolevn
Copy link
Member Author

For the record: I added AUTH_USER_MODEL for all cache entries. It solved the problem.

Copy link
Contributor

@asottile-sentry asottile-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 this will work great for us

Co-authored-by: anthony sottile <103459774+asottile-sentry@users.noreply.github.com>
@sobolevn sobolevn merged commit 82c99e8 into master Sep 16, 2025
38 checks passed
@sobolevn sobolevn deleted the add-process_abstract_models branch September 16, 2025 17:04
asottile-sentry added a commit to getsentry/sentry-forked-django-stubs that referenced this pull request Sep 17, 2025
…cts` access (typeddjango#2830)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: anthony sottile <103459774+asottile-sentry@users.noreply.github.com>
asottile-sentry added a commit to getsentry/sentry-forked-django-stubs that referenced this pull request Sep 17, 2025
* Revert "don't remove objects / DoesNotExist / etc. from model classes (#2)"

This reverts commit 44e609b.

* Add `strict_model_abstract_attrs` setting to allow `models.Model.objects` access (typeddjango#2830)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: anthony sottile <103459774+asottile-sentry@users.noreply.github.com>

---------

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants