Skip to content

Stubtest: allowlist all of distutils on 3.11#8411

Merged
AlexWaygood merged 4 commits intomasterfrom
fix-ci
Jul 27, 2022
Merged

Stubtest: allowlist all of distutils on 3.11#8411
AlexWaygood merged 4 commits intomasterfrom
fix-ci

Conversation

@AlexWaygood
Copy link
Member

Fixes #8410

@AlexWaygood AlexWaygood marked this pull request as ready for review July 27, 2022 18:56
@AlexWaygood
Copy link
Member Author

AlexWaygood commented Jul 27, 2022

I hoped we could just add a distutils\..* entry to the 3.11 allowlist. But that's not sufficient, because stubtest still complains about all sorts of unused allowlist entries from the py3_common allowlist. So those need to be removed from the py3_common allowlist and pasted into the {3.10, 3.9, 3.8, 3.7} allowlists instead.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

In case it's useful in the future, there's the x -> (x)? trick if you want to avoid unused allowlist errors. A hidden feature of stubtest is that it will not complain about an unused allowlist entry if it's a regex that could match the empty string. In this case, we could have used it to mark all the distutils things in py3_common.txt.

@AlexWaygood
Copy link
Member Author

In case it's useful in the future, there's the x -> (x)? trick if you want to avoid unused allowlist errors. A hidden feature of stubtest is that it will not complain about an unused allowlist entry if it's a regex that could match the empty string. In this case, we could have used it to mark all the distutils things in py3_common.txt.

Yah, I considered this, but it felt vaguely immoral for this situation somehow ¯\_(ツ)_/¯

@AlexWaygood AlexWaygood merged commit 78e0b3c into master Jul 27, 2022
@AlexWaygood AlexWaygood deleted the fix-ci branch July 27, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Many stubtest_stdlib failures for distutils on 3.11b5

2 participants