[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thanks Nikita.

--
components: +Tests -Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c1ff4cb98b11c00aee765019364544c71e7dd2df by Nikita Sobolev in 
branch '3.10':
[3.10] bpo-46611: add coverage to instance and class checks in `typing.py` 
(GH-31078) (GH-31182)
https://github.com/python/cpython/commit/c1ff4cb98b11c00aee765019364544c71e7dd2df


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
pull_requests: +29354
pull_request: https://github.com/python/cpython/pull/31182

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 067c03bf40d13393209f0138fa9c4d5980c4ff8a by Nikita Sobolev in 
branch 'main':
bpo-46611: add coverage to instance and class checks in `typing.py` (GH-31078)
https://github.com/python/cpython/commit/067c03bf40d13393209f0138fa9c4d5980c4ff8a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
keywords: +patch
pull_requests: +29262
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31078

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
nosy: +AlexWaygood, gvanrossum, kj

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev

New submission from Nikita Sobolev :

There are several problem reported by coverage:
1. This line is never reached in `_SpecialGenericAlias.__subclasscheck__`: 
https://github.com/python/cpython/blob/08f8301b21648d58d053e1a513db8ed32fbf37dd/Lib/typing.py#L1140
2. `__instancecheck__` and `__subclasscheck__` for `_UnionGenericAlias` are not 
covered at all: 
https://github.com/python/cpython/blob/08f8301b21648d58d053e1a513db8ed32fbf37dd/Lib/typing.py#L1243-L1249
 I suspect this happened because of `types.UnionType` / `typing.Union` duality

I am going to add these today! 

By the way, this is the last coverage issue in typing! 

--
components: Library (Lib)
messages: 412361
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Improve coverage of `__instancecheck__` and `__subclasscheck__` methods 
in `typing.py`
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com