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

Version 4.2.0 release (django-stubs, django-stubs-ext) #1458

Merged
merged 6 commits into from Apr 27, 2023

Conversation

intgr
Copy link
Collaborator

@intgr intgr commented Apr 27, 2023

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thank you!

README.md Outdated
| 0.12.x | old semantic analyzer (<0.711), dmypy support | 2.1.x | ^3.6
| django-stubs | mypy version | django version | python version
|--------------|--------------|----------------------------------| ---- |
| 4.2.0 | 1.2.x | 3.2.x or 4.0.x or 4.1.x or 4.2.x | ^3.7
Copy link
Member

Choose a reason for hiding this comment

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

Maybe like this?

Suggested change
| 4.2.0 | 1.2.x | 3.2.x or 4.0.x or 4.1.x or 4.2.x | ^3.7
| 4.2.0 | 1.2.x | 4.2.x (other versions are partly supported) | ^3.8

Note that we don't support 3.7 anymore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that we don't support 3.7 anymore.

I just removed testing with Python 3.7, but we're still fully compatible Python 3.7.

I want to write in release notes that this is the last django-stubs that works with Python 3.7, and drop it officially after that.

Copy link
Member

Choose a reason for hiding this comment

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

But, django says:

Django 4.2 supports Python 3.8, 3.9, 3.10, and 3.11. We highly recommend and only officially support the latest release of each series.

In my opinion, it is better to raise this contraint. Otherwise, people might think that 3.7 + 4.2 is supported.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but django-stubs doesn't require Django 4.2. As you note, older Django versions are "partly supported".

People may still be using django-stubs with Django 3.2 and Python 3.7. And continuing to support this for one release doesn't require us to do any extra work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As for "4.2.x (other versions are partly supported)", maybe we should still list Django versions that our CI is testing with? So maybe add a new column "Django partial support" that lists "4.1, 4.0, 3.2"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because if we ever need to do a hard break in Django compatibility, this would be a good way to communicate that.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, good idea! 👍

Copy link
Member

Choose a reason for hiding this comment

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

I am going to insist on removing 3.7 though:

  1. It is 2 month before sunsetting
  2. It is not tested anymore (so any commit might break this support)
  3. Some django versions do not support it
  4. It is not very popular among our users

Снимок экрана 2023-04-27 в 14 04 54

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is 2 month before sunsetting

So it's still supported by upstream.

It is not tested anymore (so any commit might break this support)

Yes, but I want to make this release right away when we get this over with. I'm not merging any new commits between now and the release.

It is not very popular among our users

It's over 5%, seems significant to me.

Copy link
Member

Choose a reason for hiding this comment

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

Ok :)

django_stubs_ext/setup.py Outdated Show resolved Hide resolved
| 4.2.0 | 1.2.x | 4.2 | 4.1, 4.0, 3.2 | 3.7 - 3.11 |
| 1.16.0 | 1.1.x | 4.1 | 4.0, 3.2 | 3.7 - 3.11 |
| 1.15.0 | 1.0.x | 4.1 | 4.0, 3.2 | 3.7 - 3.11 |
| 1.14.0 | 0.990+ | 4.1 | 4.0, 3.2 | 3.7 - 3.11 |
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does this look good to you now? Should I go ahead with the release?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, thank you! 🎉 🥳

@intgr intgr merged commit 87f48b3 into typeddjango:master Apr 27, 2023
15 checks passed
@intgr intgr deleted the version-4.2.0 branch April 27, 2023 12:44
@MichaelVoelkel
Copy link

Sorry, one question, what do you mean with "partial support" even? We need to stick with Django 3.2 for now, so does it now make sense to go down to a version that does not say "partial support" or is it still best to use the latest version?

@intgr
Copy link
Collaborator Author

intgr commented Oct 4, 2023

The changes between major Django versions aren't that big. I think you're better off upgrading, because django-stubs gets more accurate with every version, most improvements apply to all relevant Django versions.

When you experience mypy errors due to differences between Django versions, I think # type: ignore comments are a better way to deal with it than staying stuck with old django-stubs. But YMMV.

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.

Next release planning (4.2.0) django-stubs-ext version schema Release schedule
3 participants