Mypy 1.5 Release Planning
Planning to make the 1.5 release around middle of July.
Please post here any issues you'd like to see fixed in the release, or PRs you'd like to have merged. Will make the release branch as release-1.5.
Looks like typeshed syncing is having a conflict when cherry picking "Remove use of LiteralString in builtins" (6f913a148) https://github.com/python/mypy/actions/workflows/sync_typeshed.yml
Looks like typeshed syncing is having a conflict when cherry picking "Remove use of LiteralString in builtins" (6f913a148) https://github.com/python/mypy/actions/workflows/sync_typeshed.yml
Here you go:
- #15590
I'm pretty seasoned with these by now 😆
Ah, thanks! :D
I would like to see this included. It's just missing a final review.
- #15512
Small fix for a sqlalchemy issue with the PEP 681 implementation
- #15628
Fixes a crash introduced in 1.4:
- https://github.com/python/mypy/pull/15629
Looks like we have a typeshed bug:
from unittest.mock import patch
def addition(a: int, b:int) -> int:
return a+b
@patch('test.addition')
def patch_test(mock):
print(mock)
if __name__ == "__main__":
patch_test()
In this simple example mypy says:
test.py:12: error: Missing positional argument "mock" in call to "patch_test" [call-arg]
Undoing https://github.com/python/typeshed/commit/9e86c6026a00a7bcc6c77ec8f7925a99930ee983 fixes it Filed https://github.com/python/typeshed/issues/10457 for record keeping
A usability improvement with invalid generic instances. This PR reuses existing args whenever possible instead of replacing everything with Any. This would match the pyright behavior.
- #15656
I think that this is important enough to have a special note: https://github.com/python/mypy/pull/15668
I think it's best if we leave https://github.com/python/mypy/pull/15668 for the next release
Created the release-1.5 branch
Hmm, I think we have an issue, but can't find out what changed. Did we remove typeshed for attr or something like that?
For this example
import attr
@attr.s(frozen=True)
class SomeProperties(object):
x = attr.ib(type=str)
y = attr.ib(type=int)
for field in attr.fields(SomeProperties):
print(field.name)
print(field.metadata)
mypy-1.4.1 finds no issues, but master (and release-1.5):
test2.py:9: error: "object" has no attribute "name" [attr-defined]
test2.py:10: error: "object" has no attribute "metadata" [attr-defined]
Found 2 errors in 1 file (checked 1 source file)
The issue is type should be attr.Attribute, not object
Hmm, I think we have an issue, but can't find out what changed. Did we remove typeshed for
attror something like that?
You might want to revert #15021 for 1.5, too. That was one of the first commits in the release-1.4 branch. https://github.com/python/mypy/commit/3bf9fdc347ff1d27baead7660442d645a77cb2c6
Ah, thanks!
Did we remove typeshed for
attror something like that?
(attrs hasn't had stubs in typeshed for quite a while; they're a py.typed package and bundle their own stubs :)
I made https://github.com/python/mypy/pull/15674 to revert it for 1.5 too. But we should probably figure out a more permanent solution. If we are going to keep reverting the change for every release, might as well revert it in master too.
This PR fixes a new stubtest false positive that would be somewhat annoying for typeshed -- would be great to get it (or an alternative fix) in for v1.5:
- #15689
This PR fixes a new stubtest false positive that would be somewhat annoying for typeshed -- would be great to get it (or an alternative fix) in for v1.5:
There's some discussion on the PR about whether this is the correct fix or not. It would only cause two false positives for typeshed's CI, which can be fairly easily suppressed, so maybe it shouldn't block the release. (Having said that, it might also cause false positives for other projects using stubtest as well, if they're using dataclasses.)
FYI The build failure on master today was related to the cython 3.0 release and a build issue with PyYAML==6.0.0 (required through pre-commit). That was resolved with PyYAML==6.0.1. Restarting the any failed workflows should be enough if necessary.
I think the release will be postponed until early August since I'm on vacation for three weeks.
It would be great if we could cherry-pick https://github.com/python/typeshed/commit/f577c4c133ae6bb57cade534179b41ef04b5731f onto the 1.5 release branch, so that mypy users will be able to use the latest typing_extensions features -- typing_extensions 4.7.0 has been out for about a month now
It would be great if we could cherry-pick python/typeshed@f577c4c onto the 1.5 release branch, so that mypy users will be able to use the latest typing_extensions features --
typing_extensions 4.7.0has been out for about a month now
Opened #15745 to do that
I merged your cherry pick, but it looks like the tag was already made. We'll see what happens, worst case we can do a 1.5.1
I merged your cherry pick
Thanks!
but it looks like the tag was already made.
Ah, I didn't spot that :/ there's also the unresolved issue of the stubtest regression I mentioned in https://github.com/python/mypy/issues/15588#issuecomment-1637124243...
Ah, sorry, I didn't realize that creating the tag could cause problems. Thinking about it now, it makes sense. Some people might follow the git tags for releases instead of blog announcements.
Anything release related you could use help with?
Thanks for the offer, but we should be good to go. I was waiting for Jukka to help with the blog post as he has context on all the mypy works. He was on vacation until recently. Yesterday he did finish the blog post and we’re unblocked. I’m looking to finish the release today!
mypy 1.5 is out! Read the blog post here - https://mypy-lang.blogspot.com/2023/08/mypy-15-released.html Also updated the news on the website https://mypy-lang.org/
Closing this issue as the release is "done". Of course, if there's any issues please post them and we can reopen for a point release!
@svalentin I think something's gone wrong with https://github.com/python/mypy/pull/15751 (which backported a stubtest fix to the release-1.5 branch).
I can see the change included in the 1.5.0 tag and the release-1.5 branch on GitHub. But if I actually pip install mypy==1.5 into a virtual environment and then open up Lib/site-packages/mypy/stubtest.py in the directory of the virtual environment, the change isn't there. That means I've got a very red CI for my PR trying to upgrade typeshed's mypy pin :(
- https://github.com/python/typeshed/pull/10559