Conversation
Notices
-
Santa Claes πΈπͺππ°π (clacke@libranet.de)'s status on Wednesday, 20-Apr-2022 03:04:36 UTC Santa Claes πΈπͺππ°π We found a Python bug! It was fixed in 3.10, but we're still on 3.7.
class Abstract(ABC): @abstractmethod def __init__(self, asdf): pass @dataclass class Asdf(Abstract): asdf: str class Qwer(Asdf): passOn any Python 3.7+ this works:
>>> Qwer("zxcv") Qwer(asdf="zxcv")But on Python < 3.10 this breaks:
>>> Asdf("zxcv") TypeError: Can't instantiate abstract class Asdf with abstract method __init__We just won't use a dataclass there, it was a slightly weird thing to do anyway and it's not quite documented what to expect. But the inconsistent behavior between the dataclass and the child of the dataclass is definitely a bug.-
Your friendly 'net denizen (cstanhope@social.coop)'s status on Wednesday, 20-Apr-2022 03:46:48 UTC Your friendly 'net denizen @clacke We're using 3.7, and I have a patch against it so that threading.Timers work even if the system time changes while the Timer is running. That was a fun one to track down. π
Santa Claes πΈπͺππ°π likes this.
-