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: Non-required `hasattr` checks in `test_typing`
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, kj, miss-islington, sobolevn
Priority: normal Keywords: patch

Created on 2022-01-19 17:42 by sobolevn, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30704 merged sobolevn, 2022-01-19 17:43
PR 30713 merged miss-islington, 2022-01-19 21:24
PR 30714 merged miss-islington, 2022-01-19 21:24
Messages (4)
msg410974 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2022-01-19 17:42
There are several legacy `hasattr` checks that are always `True` in newer Python versions:

1. https://github.com/python/cpython/blob/d45cd2d20770f72a000ba6dfa9ac88dd49423c27/Lib/test/test_typing.py#L3516
2. https://github.com/python/cpython/blob/d45cd2d20770f72a000ba6dfa9ac88dd49423c27/Lib/test/test_typing.py#L5133

I think it is safe to delete them.
msg410985 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2022-01-19 21:24
New changeset 263c0dd16017613c5ea2fbfc270be4de2b41b5ad by Nikita Sobolev in branch 'main':
bpo-46437: remove useless `hasattr` from `test_typing` (#30704)
https://github.com/python/cpython/commit/263c0dd16017613c5ea2fbfc270be4de2b41b5ad
msg410986 - (view) Author: miss-islington (miss-islington) Date: 2022-01-19 22:12
New changeset 3b51926ee9838e746a5cdb08c7eb985646bd133c by Miss Islington (bot) in branch '3.9':
bpo-46437: remove useless `hasattr` from `test_typing` (GH-30704)
https://github.com/python/cpython/commit/3b51926ee9838e746a5cdb08c7eb985646bd133c
msg410987 - (view) Author: miss-islington (miss-islington) Date: 2022-01-19 22:30
New changeset 07b12fdf5545a20e0fb7be9d6ad35344337e00ae by Miss Islington (bot) in branch '3.10':
bpo-46437: remove useless `hasattr` from `test_typing` (GH-30704)
https://github.com/python/cpython/commit/07b12fdf5545a20e0fb7be9d6ad35344337e00ae
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90595
2022-01-20 08:59:44AlexWaygoodsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-01-19 22:30:31miss-islingtonsetmessages: + msg410987
2022-01-19 22:12:31miss-islingtonsetmessages: + msg410986
2022-01-19 21:24:39miss-islingtonsetpull_requests: + pull_request28906
2022-01-19 21:24:35miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request28905
2022-01-19 21:24:31gvanrossumsetnosy: + gvanrossum
messages: + msg410985
2022-01-19 17:43:37sobolevnsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28900
2022-01-19 17:43:17sobolevnsetnosy: + kj
2022-01-19 17:42:38sobolevncreate