This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: instancemethod_call should use PyInstanceMethod_GET_FUNCTION macro
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: colesbury, corona10, miss-islington
Priority: normal Keywords: patch

Created on 2021-07-16 19:43 by colesbury, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27202 merged corona10, 2021-07-17 03:13
PR 27408 merged miss-islington, 2021-07-28 13:10
PR 27409 merged miss-islington, 2021-07-28 13:10
Messages (5)
msg397660 - (view) Author: Sam Gross (colesbury) * (Python triager) Date: 2021-07-16 19:43
The instancemethod_call function should use the PyInstanceMethod_GET_FUNCTION macro instead of the PyMethod_GET_FUNCTION macro. The current code is incorrect, but still works okay (doesn't crash)  because PyInstanceMethodObject.func is at the same offset as PyMethodObject.im_func.

https://github.com/python/cpython/blob/c90c591e5158ab7b531dcd6e2a5f00bc70ba7637/Objects/classobject.c#L465
msg398371 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-07-28 13:10
New changeset ddf8ae31a0f371eff2db14c7f7a45976b86d56ea by Dong-hee Na in branch 'main':
bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)
https://github.com/python/cpython/commit/ddf8ae31a0f371eff2db14c7f7a45976b86d56ea
msg398378 - (view) Author: miss-islington (miss-islington) Date: 2021-07-28 13:29
New changeset c558e12695e5fe39778eb3eead9df48870356800 by Miss Islington (bot) in branch '3.10':
bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)
https://github.com/python/cpython/commit/c558e12695e5fe39778eb3eead9df48870356800
msg398379 - (view) Author: miss-islington (miss-islington) Date: 2021-07-28 13:33
New changeset c48720576d63f9a7de15a6e46b07262dd3d04a8d by Miss Islington (bot) in branch '3.9':
bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)
https://github.com/python/cpython/commit/c48720576d63f9a7de15a6e46b07262dd3d04a8d
msg398380 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-07-28 13:33
Thank you Sam for the valuable report!!
History
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88823
2021-07-28 13:33:38corona10setstatus: open -> closed
resolution: fixed
messages: + msg398380

stage: patch review -> resolved
2021-07-28 13:33:07miss-islingtonsetmessages: + msg398379
2021-07-28 13:29:21miss-islingtonsetmessages: + msg398378
2021-07-28 13:10:52miss-islingtonsetpull_requests: + pull_request25942
2021-07-28 13:10:47miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request25941
2021-07-28 13:10:43corona10setmessages: + msg398371
2021-07-18 03:04:03corona10setversions: - Python 3.6, Python 3.7, Python 3.8
2021-07-17 03:13:57corona10setkeywords: + patch
stage: patch review
pull_requests: + pull_request25736
2021-07-17 03:11:06corona10setnosy: + corona10
2021-07-16 19:49:41colesburysettype: enhancement -> behavior
2021-07-16 19:43:58colesburycreate