[issue47055] `issubclass` on two different subclasses of abstract base class like `os.PathLike` returns unexpected value on early versions of Py3.7 and Py3.8

2022-03-20 Thread mobiusklein


mobiusklein  added the comment:

Understood. It's probably good practice to keep the interpreter version up to 
date in any case when debugging.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue47055] `issubclass` on two different subclasses of abstract base class like `os.PathLike` returns unexpected value on early versions of Py3.7 and Py3.8

2022-03-18 Thread Eric V. Smith


Eric V. Smith  added the comment:

Since those releases are no longer supported, I don't think there's any place 
you could put this that would be seen. And we wouldn't want to put a note in a 
current release about a bug in a non-supported version that was fixed in 
another non-supported version.

--
nosy: +eric.smith

___
Python tracker 

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



[issue47055] `issubclass` on two different subclasses of abstract base class like `os.PathLike` returns unexpected value on early versions of Py3.7 and Py3.8

2022-03-17 Thread mobiusklein


New submission from mobiusklein :

The following code looks correct:

```python
import os

class A(os.PathLike):
pass

class B(os.PathLike):
pass

assert issubclass(A, os.PathLike) # direct inheritance relationship
assert issubclass(B, os.PathLike) # direct inheritance relationship
assert not issubclass(A, B) # A is not derived from B or vice-versa
```

On Python 3.7.0-3.7.6 and 3.8.0-3.8.1 the third assertion fails. The expected 
behavior was restored in 3.7.7 and 3.8.2. This seems to be around when the 
internals of `abc` were translated to C.

Given that the behavior was fixed, but a bug fix matching this behavior wasn't 
listed in the changelog, the only resolution is to document that this behavior 
may be extant in older but still supported minor versions of Python. Where 
should that text be placed?

--
components: Library (Lib)
messages: 415467
nosy: mobiusklein
priority: normal
severity: normal
status: open
title: `issubclass` on two different subclasses of abstract base class like 
`os.PathLike` returns unexpected value on early versions of Py3.7 and Py3.8
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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