Skip to content
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

Mypy 1.5 Release Planning #15588

Closed
svalentin opened this issue Jul 4, 2023 · 39 comments
Closed

Mypy 1.5 Release Planning #15588

svalentin opened this issue Jul 4, 2023 · 39 comments
Assignees
Labels
meta Issues tracking a broad area of work

Comments

@svalentin
Copy link
Collaborator

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.

@svalentin svalentin added the meta Issues tracking a broad area of work label Jul 4, 2023
@svalentin svalentin self-assigned this Jul 4, 2023
@svalentin
Copy link
Collaborator Author

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

@AlexWaygood
Copy link
Member

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:

I'm pretty seasoned with these by now 😆

@svalentin
Copy link
Collaborator Author

Ah, thanks! :D

@cdce8p
Copy link
Collaborator

cdce8p commented Jul 5, 2023

I would like to see this included. It's just missing a final review.

@cdce8p
Copy link
Collaborator

cdce8p commented Jul 9, 2023

Small fix for a sqlalchemy issue with the PEP 681 implementation

@ikonst
Copy link
Contributor

ikonst commented Jul 12, 2023

Fixes a crash introduced in 1.4:

@svalentin
Copy link
Collaborator Author

svalentin commented Jul 13, 2023

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 python/typeshed@9e86c60 fixes it
Filed python/typeshed#10457 for record keeping

@cdce8p
Copy link
Collaborator

cdce8p commented Jul 13, 2023

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.

@sobolevn
Copy link
Member

I think that this is important enough to have a special note: #15668

@svalentin
Copy link
Collaborator Author

I think it's best if we leave #15668 for the next release

@svalentin
Copy link
Collaborator Author

Created the release-1.5 branch

@svalentin
Copy link
Collaborator Author

svalentin commented Jul 14, 2023

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

@cdce8p
Copy link
Collaborator

cdce8p commented Jul 14, 2023

Hmm, I think we have an issue, but can't find out what changed. Did we remove typeshed for attr or 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. 3bf9fdc

@svalentin
Copy link
Collaborator Author

Ah, thanks!

@AlexWaygood
Copy link
Member

Did we remove typeshed for attr or 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 :)

@svalentin
Copy link
Collaborator Author

I made #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.

@AlexWaygood
Copy link
Member

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:

@AlexWaygood
Copy link
Member

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.)

@cdce8p
Copy link
Collaborator

cdce8p commented Jul 18, 2023

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.

@JukkaL
Copy link
Collaborator

JukkaL commented Jul 19, 2023

I think the release will be postponed until early August since I'm on vacation for three weeks.

@AlexWaygood
Copy link
Member

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.0 has been out for about a month now

@AlexWaygood
Copy link
Member

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.0 has been out for about a month now

Opened #15745 to do that

@hauntsaninja
Copy link
Collaborator

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

@AlexWaygood
Copy link
Member

AlexWaygood commented Jul 22, 2023

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 #15588 (comment)...

@svalentin
Copy link
Collaborator Author

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.

@hauntsaninja
Copy link
Collaborator

Anything release related you could use help with?

@svalentin
Copy link
Collaborator Author

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!

@svalentin
Copy link
Collaborator Author

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/

@svalentin
Copy link
Collaborator Author

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!

@AlexWaygood
Copy link
Member

AlexWaygood commented Aug 11, 2023

@svalentin I think something's gone wrong with #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 :(

@svalentin
Copy link
Collaborator Author

Hmm, yes, I see it too.

Commit 7a9418356 is in. That's the commit in where we branched off from main for release 1.5.
Commit 9dd0d396e is in as well.
But 373b73abe or 2ff7c0de5 are not.

I think it maybe grabbed the wrong wheels to upload for pypi.

Let me check with Jukka. We might have to do a 1.5.1 release to pick up those two commits as well as they fix regressions.

@svalentin
Copy link
Collaborator Author

svalentin commented Aug 11, 2023

Will make a 1.5.1 release to pick them up!
This is because I had already removed the +dev from the version. And the wheels are built at that point and don't get overridden after our next 2 cherry picks. It wasn't obvious to me the wheels get fixed once we remove the +dev from version.

@svalentin svalentin reopened this Aug 11, 2023
@svalentin
Copy link
Collaborator Author

Bumped version to 1.5.1 in de4f2ad99
Once wheels are built I'll upload them. Follow along in https://github.com/mypyc/mypy_mypyc-wheels/actions/runs/5832823688

@svalentin
Copy link
Collaborator Author

Unfortunately we hit a 10GB limit for the pypi project.
Jukka filed an issue to increase this limit - pypi/support#3094

We don't think the regressions are serious enough to warrant us deleting some old version of mypy to make room for this point release right now. We can probably wait until pypi increases our limits. Hopefully it shouldn't be longer than a few days.

@erictraut
Copy link

Is there anything remaining for the 1.5 release, or can this be closed?

@JelleZijlstra
Copy link
Member

We should probably keep this open for the 1.5.1 release (currently blocked on PyPI size limits) and potentially for another bugfix release if there are further regressions.

@AlexWaygood
Copy link
Member

The PyPI project limit has been bumped to 20GB: pypi/support#3094 (comment)

@svalentin
Copy link
Collaborator Author

Uploaded v1.5.1 to PyPI!

@AlexWaygood
Copy link
Member

And we've successfully upgraded over at typeshed: python/typeshed@ef758b6

Thanks @svalentin! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues tracking a broad area of work
Projects
None yet
Development

No branches or pull requests

9 participants