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

gh-109413: Enable strict_optional = true for libregrtest/run_workers #126855

Merged
merged 8 commits into from
Nov 18, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Nov 15, 2024

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

Lib/test/libregrtest/run_workers.py Show resolved Hide resolved
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@sobolevn
Copy link
Member Author

Failure is related:

     raise ValueError(
        'Should never call `.test_name` before calling `.run()`'
    )
ValueError: Should never call `.test_name` before calling `.run()`

Fixing

Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
@@ -102,6 +102,9 @@ def __init__(self,
super().__init__()


_NOT_RUNNING = "<not running>"
Copy link
Member

Choose a reason for hiding this comment

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

You can make it public, it's not a deep secret.

Copy link
Member Author

@sobolevn sobolevn Nov 18, 2024

Choose a reason for hiding this comment

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

I don't think that it needs to be public, since it is not used outside of this module and probably won't be. If you prefer to have it as public - I will change it :)

Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

Lib/test/libregrtest/run_workers.py Outdated Show resolved Hide resolved
@sobolevn sobolevn merged commit a1d9c8a into python:main Nov 18, 2024
42 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 18, 2024
…_workers` (pythonGH-126855)

(cherry picked from commit a1d9c8a)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 18, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 18, 2024
@sobolevn
Copy link
Member Author

Thanks everyone for so many helpful suggestions! It turned out very good! 👍

@vstinner
Copy link
Member

Thanks for your nice change.

sobolevn added a commit that referenced this pull request Nov 18, 2024
…n_workers` (GH-126855) (#126967)

gh-109413: Enable `strict_optional = true` for `libregrtest/run_workers` (GH-126855)
(cherry picked from commit a1d9c8a)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sign up for free to 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.

3 participants