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.

Title: Remove deprecated inspect functions
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hugovk, lukasz.langa, xtreak
Priority: normal Keywords: patch

Created on 2021-09-29 12:22 by hugovk, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 28618 merged hugovk, 2021-09-29 12:48
PR 29813 merged hugovk, 2021-11-27 08:45
Messages (6)
msg402860 - (view) Author: Hugo van Kemenade (hugovk) * (Python triager) Date: 2021-09-29 12:22
inspect.getargspec was deprecated in docs since 3.0 (, raising a DeprecationWarning since 3.5 (bpo-20438,

inspect.formatargspec was deprecated in docs since 3.5 (, raising a DeprecationWarning since 3.8 (bpo-33582,

Undocumented inspect.Signature.from_function and inspect.Signature.from_builtin in docs and by raising a DeprecationWarning since 3.5 (bpo-20438,

These can be removed in Python 3.11.
msg402877 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-09-29 14:17
Have you done any checks how much external code is using the deprecated callables in the wild? I remember when the 3.5 deprecations started, a lot of libraries started emitting them because they stuck to `getargspec` which was Python 2 compatible.
msg402890 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2021-09-29 16:40
Slightly related, inspect.getfullargspec was also deprecated and later undeprecated. Please find the discussion post this message
msg402906 - (view) Author: Hugo van Kemenade (hugovk) * (Python triager) Date: 2021-09-29 20:43
Of the 188 repos I managed to clone of 200 top PyPI packages, looks like these 9 are still calling them:


Details at
msg404515 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-20 18:49
New changeset d89fb9a5a610a257014d112bdceef73d7df14082 by Hugo van Kemenade in branch 'main':
bpo-45320: Remove long-deprecated inspect methods (GH-28618)
msg404516 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-20 18:49
Thanks, Hugo! ✨ 🍰 ✨
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89483
2021-11-27 08:45:34hugovksetpull_requests: + pull_request28046
2021-10-20 18:49:31lukasz.langasetstatus: open -> closed
resolution: fixed
messages: + msg404516

stage: patch review -> resolved
2021-10-20 18:49:03lukasz.langasetmessages: + msg404515
2021-09-29 20:43:05hugovksetmessages: + msg402906
2021-09-29 16:40:42xtreaksetnosy: + xtreak
messages: + msg402890
2021-09-29 14:17:50lukasz.langasetnosy: + lukasz.langa
messages: + msg402877
2021-09-29 12:48:03hugovksetkeywords: + patch
stage: patch review
pull_requests: + pull_request26989
2021-09-29 12:22:30hugovkcreate