Skip to content

CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow - #125592

Merged
Eclips4 merged 3 commits into
python:mainfrom
Eclips4:bump-python-ci
Oct 16, 2024
Merged

CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow#125592
Eclips4 merged 3 commits into
python:mainfrom
Eclips4:bump-python-ci

Conversation

@Eclips4

Copy link
Copy Markdown
Member

I think that we're ready to bump python to 3.12 in mypy workflow, from what I can see at python/mypy#15277, mypy almost supports 3.12 except for python/mypy#15313.

@sobolevnsobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A big +1 from me :)

@Eclips4

Copy link
Copy Markdown
MemberAuthor

FYI: There is a PR which failed due to Python 3.11 in the mypy workflow: #125589

@JelleZijlstraJelleZijlstra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note that "supporting" a version in the mypy issue tracker is often a bit of a misnomer. Mypy has long supported running on Python 3.12 fine; it just may not necessarily have good support for type checking all new features in Python 3.12.

@JelleZijlstra

Copy link
Copy Markdown
Member

We could even run it on 3.13 if we update to the latest mypy release (1.12).

@AlexWaygood

AlexWaygood commented Oct 16, 2024

Copy link
Copy Markdown
Member

(Mypy will still reject new-in-Python 3.12 features in some of the various directories it checks, even with this change, without changes such as the one Pablo is proposing to make to the mypy.ini file in #125589. And that's deliberate: we want to ensure that some of our build tools can be run on older versions of Python.)

@Eclips4Eclips4 changed the title CI: Bump Python to 3.12 in mypy workflowCI: Bump Python to 3.13 and mypy to 1.12 in mypy workflowOct 16, 2024
@AlexWaygood

Copy link
Copy Markdown
Member

You get to remove a type: ignore comment from Argument Clinic that we don't need anymore, now 😃

@AlexWaygoodAlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@Eclips4
Eclips4 enabled auto-merge (squash) October 16, 2024 14:14
@Eclips4
Eclips4 merged commit d83fcf8 into python:mainOct 16, 2024
@Eclips4
Eclips4 deleted the bump-python-ci branch October 16, 2024 14:27
@Eclips4

Copy link
Copy Markdown
MemberAuthor

Do you think this should be backported to 3.13?

@AlexWaygood

Copy link
Copy Markdown
Member

If it backports cleanly, it's nice to have a consistent "CI experience" between the actively maintained branches. But I also wouldn't spend too much time on it if it doesn't backport cleanly :-)

@Eclips4Eclips4 added the needs backport to 3.13 bugs and security fixes label Oct 16, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @Eclips4 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @Eclips4, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d83fcf8371f2f33c7797bc8f5423a8bca8c46e5c 3.13

@bedevere-app

Copy link
Copy Markdown

GH-125596 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Oct 16, 2024
Eclips4 added a commit to Eclips4/cpython that referenced this pull request Oct 16, 2024
…honGH-125592)
* Bump mypy to 1.12 & Python to 3.13
* Remove unnecessary `type: ignore`
(cherry picked from commit d83fcf8)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
@Eclips4

Copy link
Copy Markdown
MemberAuthor

If it backports cleanly, it's nice to have a consistent "CI experience" between the actively maintained branches. But I also wouldn't spend too much time on it if it doesn't backport cleanly :-)

Talking about the 3.12 branch, I'm not sure if this should be done there. Running mypy on the 3.13 version may give false positives for the 3.12 version, so... what do you think?

@AlexWaygood

Copy link
Copy Markdown
Member

Talking about the 3.12 branch, I'm not sure if this should be done there. Running mypy on the 3.13 version may give false positives for the 3.12 version, so... what do you think?

As long as the python_version field is set to 3.12 or less in all the mypy.ini files on the 3.12 branch, it shouldn't theoretically be an issue to backport it to the 3.12 branch

@Eclips4Eclips4 added the needs backport to 3.12 only security fixes label Oct 16, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @Eclips4 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @Eclips4, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d83fcf8371f2f33c7797bc8f5423a8bca8c46e5c 3.12

Eclips4 added a commit to Eclips4/cpython that referenced this pull request Oct 16, 2024
…honGH-125592)
* Bump mypy to 1.12 & Python to 3.13
* Remove unnecessary `type: ignore`
(cherry picked from commit d83fcf8)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Eclips4 added a commit that referenced this pull request Oct 16, 2024
#125596)
[3.13] CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (GH-125592)
(cherry picked from commit d83fcf8)
@Eclips4Eclips4 removed the needs backport to 3.12 only security fixes label Oct 16, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
)
* Bump mypy to 1.12 & Python to 3.13
* Remove unnecessary `type: ignore`
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Eclips4@JelleZijlstra@AlexWaygood@sobolevn