[6.17.z] Fix test_identical_args to ignore type annotations in signature comparison - #1422
Merged
vsedmik merged 1 commit intoJun 3, 2026
Conversation
…rison (#1421) requests 2.33.0 added type annotations to its public functions, causing inspect.signature() comparisons to fail since nailgun's wrappers don't replicate those annotations. Strip annotations from both sides before comparing so the test validates parameter names/kinds/defaults only. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit cbfb67f)
vsedmik
approved these changes
Jun 3, 2026
vsedmik
deleted the
cherry-pick-6.17.z-cbfb67fd65063e4d82703eb33b2024b0fbda7efe
branch
June 3, 2026 08:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherrypick of PR: #1421
Summary
requests2.33.0 added type annotations (e.g.url: '_t.UriType',**kwargs: 'Unpack[...]') to its public functionstest_identical_argsusedinspect.signature()to compare nailgun's wrappers directly againstrequestsfunctions, which failed because nailgun's wrappers intentionally don't replicate those annotations_strip_annotationshelper that removes annotations from both signatures before comparing, so the test still validates parameter names, kinds, and defaultsTest plan
make testpasses withrequests>=2.33.0🤖 Generated with Claude Code