[New-bugs-announce] [issue46437] Non-required `hasattr` checks in `test_typing`

Nikita Sobolev report at bugs.python.org
Wed Jan 19 12:42:38 EST 2022

New submission from Nikita Sobolev <mail at sobolevn.me>:

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.

components: Tests
messages: 410974
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Non-required `hasattr` checks in `test_typing`
type: behavior
versions: Python 3.11

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list