Skip to content

Commit 7ca13c1

Browse files
Update mypy, add a bit more metadata (#1997)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9d9dce2 commit 7ca13c1

File tree

6 files changed

+12
-30
lines changed

6 files changed

+12
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ We rely on different `django` and `mypy` versions:
4949

5050
| django-stubs | Mypy version | Django version | Django partial support | Python version |
5151
|----------------|--------------|----------------|------------------------|----------------|
52-
| (next release) | 1.8.x | 5.0 | 4.2, 4.1 | 3.8 - 3.12 |
52+
| (next release) | 1.9.x | 5.0 | 4.2, 4.1 | 3.8 - 3.12 |
5353
| 4.2.7 | 1.7.x | 4.2 | 4.1, 3.2 | 3.8 - 3.12 |
5454
| 4.2.6 | 1.6.x | 4.2 | 4.1, 3.2 | 3.8 - 3.12 |
5555
| 4.2.5 | 1.6.x | 4.2 | 4.1, 3.2 | 3.8 - 3.12 |

django-stubs/core/mail/message.pyi

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
from collections.abc import Sequence
2-
from email import charset as Charset
3-
from email._policybase import Policy
42
from email.message import Message
53
from email.mime.base import MIMEBase
64
from email.mime.message import MIMEMessage
@@ -27,30 +25,13 @@ class MIMEMixin:
2725
def as_string(self, unixfrom: bool = ..., linesep: str = ...) -> str: ...
2826
def as_bytes(self, unixfrom: bool = ..., linesep: str = ...) -> bytes: ...
2927

30-
class SafeMIMEMessage(MIMEMixin, MIMEMessage): # type: ignore[misc]
31-
defects: list[Any]
32-
epilogue: Any
33-
policy: Policy
34-
preamble: Any
35-
def __setitem__(self, name: str, val: str) -> None: ...
28+
class SafeMIMEMessage(MIMEMixin, MIMEMessage): ... # type: ignore[misc]
3629

3730
class SafeMIMEText(MIMEMixin, MIMEText): # type: ignore[misc]
38-
defects: list[Any]
39-
epilogue: None
40-
policy: Policy
41-
preamble: None
4231
encoding: str
4332
def __init__(self, _text: str, _subtype: str = ..., _charset: str = ...) -> None: ...
44-
def __setitem__(self, name: str, val: str) -> None: ...
45-
def set_payload(
46-
self, payload: list[Message] | str | bytes, charset: str | Charset.Charset | None = ...
47-
) -> None: ...
4833

4934
class SafeMIMEMultipart(MIMEMixin, MIMEMultipart): # type: ignore[misc]
50-
defects: list[Any]
51-
epilogue: None
52-
policy: Policy
53-
preamble: None
5435
encoding: str
5536
def __init__(
5637
self,
@@ -60,7 +41,6 @@ class SafeMIMEMultipart(MIMEMixin, MIMEMultipart): # type: ignore[misc]
6041
encoding: str = ...,
6142
**_params: Any,
6243
) -> None: ...
63-
def __setitem__(self, name: str, val: str) -> None: ...
6444

6545
_AttachmentContent: TypeAlias = bytes | EmailMessage | Message | SafeMIMEText | str
6646
_AttachmentTuple: TypeAlias = (

ext/setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
license_files=["LICENSE.md"],
2424
url="https://github.com/typeddjango/django-stubs",
2525
author="Simula Proxy",
26-
author_email="[email protected]",
2726
maintainer="Marti Raudsepp",
2827
maintainer_email="[email protected]",
2928
py_modules=[],
@@ -41,12 +40,12 @@
4140
"Programming Language :: Python :: 3.12",
4241
"Typing :: Typed",
4342
"Framework :: Django",
44-
"Framework :: Django :: 3.2",
4543
"Framework :: Django :: 4.1",
4644
"Framework :: Django :: 4.2",
4745
"Framework :: Django :: 5.0",
4846
],
4947
project_urls={
48+
"Funding": "https://github.com/sponsors/typeddjango",
5049
"Release notes": "https://github.com/typeddjango/django-stubs/releases",
5150
},
5251
)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Django==5.0.3; python_version >= '3.10'
1414
-e .[compatible-mypy]
1515

1616
# Overrides:
17-
mypy==1.8.0
17+
mypy==1.9.0

scripts/stubtest/allowlist_todo.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ django.contrib.gis.db.models.PositiveIntegerField.integer_field_class
420420
django.contrib.gis.db.models.PositiveSmallIntegerField.formfield
421421
django.contrib.gis.db.models.PositiveSmallIntegerField.integer_field_class
422422
django.contrib.gis.db.models.Q.XOR
423-
django.contrib.gis.db.models.Q.__init__
424423
django.contrib.gis.db.models.Q.check
425424
django.contrib.gis.db.models.Q.flatten
426425
django.contrib.gis.db.models.Q.resolve_expression
@@ -970,7 +969,6 @@ django.db.models.PositiveIntegerField.integer_field_class
970969
django.db.models.PositiveSmallIntegerField.formfield
971970
django.db.models.PositiveSmallIntegerField.integer_field_class
972971
django.db.models.Q.XOR
973-
django.db.models.Q.__init__
974972
django.db.models.Q.check
975973
django.db.models.Q.flatten
976974
django.db.models.Q.resolve_expression
@@ -1364,7 +1362,6 @@ django.db.models.query.prefetch_one_level
13641362
django.db.models.query_utils.DeferredAttribute.__get__
13651363
django.db.models.query_utils.InvalidQuery
13661364
django.db.models.query_utils.Q.XOR
1367-
django.db.models.query_utils.Q.__init__
13681365
django.db.models.query_utils.Q.check
13691366
django.db.models.query_utils.Q.flatten
13701367
django.db.models.query_utils.Q.resolve_expression
@@ -1673,3 +1670,9 @@ django.urls.path
16731670
django.urls.re_path
16741671
django.urls.resolvers.LocaleRegexDescriptor.__get__
16751672
django.urls.resolvers.ResolverMatch.__iter__
1673+
1674+
# mypy 1.9.0 new issues:
1675+
django.db.models.expressions.rhs
1676+
django.db.models.expressions.result
1677+
django.db.models.expressions.lhs
1678+
django.db.backends.postgresql.base.Cursor

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def find_stub_files(name: str) -> List[str]:
3131

3232
# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)
3333
extras_require = {
34-
"compatible-mypy": ["mypy~=1.8.0"],
34+
"compatible-mypy": ["mypy~=1.9.0"],
3535
}
3636

3737
setup(
@@ -66,12 +66,12 @@ def find_stub_files(name: str) -> List[str]:
6666
"Programming Language :: Python :: 3.12",
6767
"Typing :: Typed",
6868
"Framework :: Django",
69-
"Framework :: Django :: 3.2",
7069
"Framework :: Django :: 4.1",
7170
"Framework :: Django :: 4.2",
7271
"Framework :: Django :: 5.0",
7372
],
7473
project_urls={
74+
"Funding": "https://github.com/sponsors/typeddjango",
7575
"Release notes": "https://github.com/typeddjango/django-stubs/releases",
7676
},
7777
)

0 commit comments

Comments
 (0)