Issue 45320: Remove deprecated inspect functions
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) * ![]() |
Date: 2021-09-29 12:22 | |
inspect.getargspec was deprecated in docs since 3.0 (https://docs.python.org/3.0/library/inspect.html?highlight=getargspec#inspect.getargspec), raising a DeprecationWarning since 3.5 (bpo-20438, https://github.com/python/cpython/commit/3cfec2e2fcab9f39121cec362b78ac235093ca1c). inspect.formatargspec was deprecated in docs since 3.5 (https://docs.python.org/3.5/library/inspect.html?highlight=getargspec#inspect.formatargspec), raising a DeprecationWarning since 3.8 (bpo-33582, https://github.com/python/cpython/commit/46c5cd0f6e22bdfbdd3f0b18f1d01eda754e7e11). Undocumented inspect.Signature.from_function and inspect.Signature.from_builtin in docs and by raising a DeprecationWarning since 3.5 (bpo-20438, https://github.com/python/cpython/commit/3cfec2e2fcab9f39121cec362b78ac235093ca1c). These can be removed in Python 3.11. |
|||
| msg402877 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
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) * ![]() |
Date: 2021-09-29 16:40 | |
Slightly related, inspect.getfullargspec was also deprecated and later undeprecated. Please find the discussion post this message https://bugs.python.org/issue36751#msg341128 https://bugs.python.org/issue37010 |
|||
| msg402906 - (view) | Author: Hugo van Kemenade (hugovk) * ![]() |
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: botocore client_python cython google-api-python-client grpc ipython pycodestyle pyrsistent wrapt Details at https://github.com/python/cpython/pull/28618#issuecomment-930524790 |
|||
| msg404515 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
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) https://github.com/python/cpython/commit/d89fb9a5a610a257014d112bdceef73d7df14082 |
|||
| msg404516 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2021-10-20 18:49 | |
Thanks, Hugo! ✨ 🍰 ✨ |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:50 | admin | set | github: 89483 |
| 2021-11-27 08:45:34 | hugovk | set | pull_requests: + pull_request28046 |
| 2021-10-20 18:49:31 | lukasz.langa | set | status: open -> closed resolution: fixed messages: + msg404516 stage: patch review -> resolved |
| 2021-10-20 18:49:03 | lukasz.langa | set | messages: + msg404515 |
| 2021-09-29 20:43:05 | hugovk | set | messages: + msg402906 |
| 2021-09-29 16:40:42 | xtreak | set | nosy:
+ xtreak messages: + msg402890 |
| 2021-09-29 14:17:50 | lukasz.langa | set | nosy:
+ lukasz.langa messages: + msg402877 |
| 2021-09-29 12:48:03 | hugovk | set | keywords:
+ patch stage: patch review pull_requests: + pull_request26989 |
| 2021-09-29 12:22:30 | hugovk | create | |

