Terry J. Reedy added the comment: I pulled your pr, did some minor edits, committed, and tried to push back following this line from the devguide Bootcamp page.
git push g...@github.com:<contributor>/cpython <pr_XXX>:<branch_name> -------------- F:\dev\cpython>git commit -m "Fix and stop repeating invalid signature message" [pr_1382 bb46c06645] Fix and stop repeating invalid signature message 2 files changed, 6 insertions(+), 5 deletions(-) F:\dev\cpython>git push g...@github.com:lulouie/cpython pr_1382:pr_1382 The authenticity of host 'github.com (192.30.253.112)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ------------- Did I do something wrong or do you need to allow me to push? https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/ ############################################################ There current PR is incomplete. The main reason to switch to signature() is to get the signature of C-coded functions that have been converted to use Argument Clinic. But... >>> import re >>> import inspect as i >>> str(i.signature(i.signature)) '(obj, *, follow_wrapped=True)' >>> str(i.signature(re.sub)) '(pattern, repl, string, count=0, flags=0)' >>> p = re.compile('') >>> str(i.signature(p.sub)) '(repl, string, count=0)' >>> p.sub( After "i.signature(" and "re.sub(" (both 'function's), the popup has the signature. After p.sub (a 'builtin_function_or_method'), there is only the beginning of the doc string, as before. Signature is not called because of the current guard. It must be removed. Returning _invalid_signature (defined in my patch) on ValueError should only be done when the message is 'invalid method signature'. (Can there be an invalid function signature that compiles? In not, removing 'method' (in my patch) is a mistake). signature(int) raises "no signature found for builtin type <class 'int'>". In such cases, argspec should be left as '', to be augmented by the docstring as now. Tests need to include some builtins that have been converted. Serhiy, can you suggest a suitable module with converted functions and class methods? Any of the builtins? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19903> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com