distutils/setuptools: Don't use wildcards for allowlist entries #9900
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.
These entries are causing more functions to be allowlisted than was intended: for example, none of these methods are generated methods, but they're all currently included by the
distutils.dist.Distribution.get_.*
entry:typeshed/stdlib/distutils/dist.pyi
Lines 106 to 108 in 2d990ee
This caused a bit of confusion for me, as I was fiddling around with a stubtest patch, and expected stubtest to emit an error if I deleted this allowlist entry:
typeshed/tests/stubtest_allowlists/py3_common.txt
Line 89 in 2d990ee
...But stubtest didn't emit an error, because
distutils.dist.Distribution.get_command_obj
was still allowlisted, even with that entry deleted, due to these regex entries here.