Skip to content

[6.17.z] Fix test_identical_args to ignore type annotations in signature comparison - #1422

Merged
vsedmik merged 1 commit into
6.17.zfrom
cherry-pick-6.17.z-cbfb67fd65063e4d82703eb33b2024b0fbda7efe
Jun 3, 2026
Merged

[6.17.z] Fix test_identical_args to ignore type annotations in signature comparison#1422
vsedmik merged 1 commit into
6.17.zfrom
cherry-pick-6.17.z-cbfb67fd65063e4d82703eb33b2024b0fbda7efe

Conversation

@Satellite-QE

Copy link
Copy Markdown
Contributor

Cherrypick of PR: #1421

Summary

  • requests 2.33.0 added type annotations (e.g. url: '_t.UriType', **kwargs: 'Unpack[...]') to its public functions
  • test_identical_args used inspect.signature() to compare nailgun's wrappers directly against requests functions, which failed because nailgun's wrappers intentionally don't replicate those annotations
  • Added a _strip_annotations helper that removes annotations from both signatures before comparing, so the test still validates parameter names, kinds, and defaults

Test plan

  • make test passes with requests>=2.33.0

🤖 Generated with Claude Code

…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)
@Satellite-QE Satellite-QE added 6.17.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Jun 2, 2026
@vsedmik
vsedmik merged commit dbf03dd into 6.17.z Jun 3, 2026
19 checks passed
@vsedmik
vsedmik deleted the cherry-pick-6.17.z-cbfb67fd65063e4d82703eb33b2024b0fbda7efe branch June 3, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.17.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants