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.

Author glaubich
Recipients glaubich
Date 2018-09-21.08:28:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537518516.08.0.956365154283.issue34760@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure if this is a bug, or a known breaking change. I didn't find anything related in the changelog, except for a rewrite of abc. But hovever, I want this to be documented.

In 3.7.0:

import abc
def f():
    pass

class A(metaclass=abc.ABCMeta):
    pass

issubclass(f, A)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/abc.py", line 143, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class


python up to 3.6 (including 2.7) happily return false.

Found real world usage in osc-lib
* https://github.com/openstack/osc-lib/blob/46e2fb0a58fc06cfce1bb535f432405767d6b78b/osc_lib/utils/__init__.py#L495
* https://storyboard.openstack.org/#!/story/2003322
History
Date User Action Args
2018-09-21 08:28:36glaubichsetrecipients: + glaubich
2018-09-21 08:28:36glaubichsetmessageid: <1537518516.08.0.956365154283.issue34760@psf.upfronthosting.co.za>
2018-09-21 08:28:35glaubichlinkissue34760 messages
2018-09-21 08:28:35glaubichcreate