GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-109413: Add more type hints to `libregrtest` by sobolevn · Pull Request #126352 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Nov 3, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

While working on #126237 I've noticed that there are quite a lot of simple and uncontroversial type hints that I can add to libregrtest.

I also bumped mypy to the recent version (it is the same as 1.12, but faster).

  • Issue: libregrtest: Improve type hints; explore running mypy in CI #109413

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sobolevn
pythongh-109413: Add more type hints to libregrtest
67dea59
@sobolevn
sobolevn requested review from AlexWaygood and vstinner November 3, 2024 09:14
@bedevere-app bedevere-app Bot added the awaiting core review label Nov 3, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Nov 3, 2024
libregrtest: Improve type hints; explore running mypy in CI #109413
Closed
@sobolevn sobolevn added the skip news label Nov 3, 2024
vstinner
vstinner approved these changes Nov 4, 2024
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Nov 4, 2024
@sobolevn
sobolevn merged commit bfc1d25 into python:main Nov 4, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Nov 4, 2024
@sobolevn

sobolevn commented Nov 4, 2024

Copy link
Copy Markdown
Member Author

Thank you! I think that we backport such changes (based on experience of #109413), so I will add labels!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn sobolevn added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Nov 4, 2024
@miss-islington-app

miss-islington-app Bot commented Nov 4, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Nov 4, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Nov 4, 2024

Copy link
Copy Markdown

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

cherry_picker bfc1d2504c183a9464e65c290e48516d176ea41f 3.12
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned sobolevn Nov 4, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 4, 2024
@sobolevn @miss-islington
pythongh-109413: Add more type hints to libregrtest (pythonGH-126352)
0f8ab5c
(cherry picked from commit bfc1d25)

Co-authored-by: sobolevn <[email protected]>
@bedevere-app

bedevere-app Bot commented Nov 4, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Nov 4, 2024
@sobolevn

sobolevn commented Nov 4, 2024

Copy link
Copy Markdown
Member Author

I will try to create a manual backport to 3.12, but it is not easy: #125597

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood

AlexWaygood commented Nov 4, 2024

Copy link
Copy Markdown
Member

Thanks! If you're interested in working in more improvements here, the mypy config we use for libregrtest is extremely lenient at the moment; ideally we'd make it stricter. In particular, we still have strict_optional = false for several submodules of libregrtest 😱 https://github.com/python/cpython/blob/main/Lib/test/libregrtest/mypy.ini

I will try to create a manual backport to 3.12, but it is not easy: #125597

I wouldn't worry about it too much if it's hard. I wouldn't say that these changes are important to backport in and of themselves. The main reason to backport them is to reduce the risk of merge conflicts when backporting future bugfixes (which are important to backport) to libregrtest. If we run into such merge conflicts in the future, I think it shouldn't be too hard to just remove the type hints from certain functions in order to solve the conflicts with the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn added a commit to sobolevn/cpython that referenced this pull request Nov 4, 2024
@sobolevn
[3.12] pythongh-109413: Add more type hints to libregrtest (pythonG…
a450024
…H-126352)

(cherry picked from commit bfc1d25)

Co-authored-by: sobolevn <[email protected]>
sobolevn added a commit to sobolevn/cpython that referenced this pull request Nov 4, 2024
@sobolevn
[3.12] pythongh-109413: Add more type hints to libregrtest (pythonG…
9a111d5
…H-126352)

(cherry picked from commit bfc1d25)

Co-authored-by: sobolevn <[email protected]>
@bedevere-app

bedevere-app Bot commented Nov 4, 2024

Copy link
Copy Markdown

GH-126389 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Nov 4, 2024
@sobolevn

sobolevn commented Nov 4, 2024

Copy link
Copy Markdown
Member Author

Yes, I am working on some further fixes :)
But before I fix fixes here, I have to fix fixes in mypy first 😆
python/mypy#18103

AlexWaygood reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn sobolevn mentioned this pull request Nov 4, 2024
Replace strict_concatenate = True with extra_checks = True #126391
Merged
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
@sobolevn @picnixz
pythongh-109413: Add more type hints to libregrtest (python#126352)
93f9c6f
sobolevn added a commit that referenced this pull request Jan 8, 2025
@miss-islington @sobolevn
[3.13] gh-109413: Add more type hints to libregrtest (GH-126352) (#…
32012ed
…126388)

gh-109413: Add more type hints to `libregrtest` (GH-126352)
(cherry picked from commit bfc1d25)

Co-authored-by: sobolevn <[email protected]>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
@sobolevn @ebonnal
pythongh-109413: Add more type hints to libregrtest (python#126352)
affbdb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@AlexWaygood AlexWaygood Awaiting requested review from AlexWaygood

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@sobolevn sobolevn

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@sobolevn @AlexWaygood @vstinner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.