gh-145754: Update signature retrieval in unittest.mock to use forwardref annotation format#145756
gh-145754: Update signature retrieval in unittest.mock to use forwardref annotation format#145756JelleZijlstra merged 8 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
This change looks right to me, please add a unit test and we'll hopefully get it merged! |
Thanks, @JelleZijlstra! I added a unit test. Are you able to review it or does it require @cjw296 as the code owner? |
JelleZijlstra
left a comment
There was a problem hiding this comment.
Sorry, looks like I never submitted this review.
I am comfortable merging this once I'm happy with the code.
Misc/NEWS.d/next/Library/2026-03-10-14-57-15.gh-issue-145754.YBL5Ko.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
Thanks @mschoettle for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…orwardref annotation format (pythonGH-145756) (cherry picked from commit d357a7d) Co-authored-by: Matthias Schoettle <git@mattsch.com>
|
GH-146191 is a backport of this pull request to the 3.14 branch. |
|
Uses annotation format
FORWARDREFinstead of the defaultVALUEwhen callinginspect.signature.STRINGalso seems to work but affects existing tests that check the signature.unittest.mockis less robust with PEP 649 #145754Closes #145754