-
-
Notifications
You must be signed in to change notification settings - Fork 485
Run checks against Django 4.1 and Python 3.11 #1223
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
Conversation
@@ -15,6 +15,7 @@ | |||
"2.2": "44e7cca62382f2535ed0f5d2842b433f0bd23a57", | |||
"3.2": "0153a63a674937e4a56d9d5e4ca2d629b011fbde", | |||
"4.0": "67d0c4644acfd7707be4a31e8976f865509b09ac", | |||
"4.1": "7dfd29b84e5a27d61ae62cb5ed9122d5a99ee1be", |
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.
4.1.3 because it's the first release that supports Python 3.11. I can point that to 4.0 if required.
django/django@7dfd29b
Technically 3.11 is not fully supported by the current mypy. |
@@ -34,5 +40,5 @@ class _TextChoicesMeta(ChoicesMeta): | |||
values: List[str] = ... | |||
|
|||
class TextChoices(str, Choices, metaclass=_TextChoicesMeta): | |||
@property | |||
@enum_property |
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.
This won't be supported by mypy
.
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.
Without it the mypy-self-check
job failed with
> Run mypy --cache-dir=/dev/null --no-incremental django-stubs
django-stubs/db/models/enums.pyi:16: error: Signature of "value" incompatible with supertype "Enum"
django-stubs/db/models/enums.pyi:27: error: Signature of "value" incompatible with supertype "Enum"
django-stubs/db/models/enums.pyi:38: error: Signature of "value" incompatible with supertype "Enum"
Found 3 errors in 1 file (checked 675 source files)
Error: Process completed with exit code 1.
See https://github.com/michael-k/django-stubs/actions/runs/3385444913/jobs/5623591875
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.
Yes I think this is necessary. The same errors also appear in #1223
Maybe add a test with reveal_type()
on the value
property just in case?
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.
The same errors also appear in #1223
That is this PR, did you mean to link to a different one?
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.
Ah yes, I meant typeddjango/djangorestframework-stubs#284
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, let's try it!
mypy-self-check
andtypecheck
jobs on GitHub Actions against Python 3.11typecheck
job on GitHub Actions against Django 4.1PY310
andPY311
Related issues
n/a