Re: Please revert f4be03b3 (libvirtaio: Drop object(*args, **kwargs)) for theoretical reasons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Am 20.08.20 um 11:20 schrieb Daniel P. Berrangé:
> On Wed, Aug 19, 2020 at 11:32:10PM +0200, Wojtek Porczyk wrote:
>> Hi Philipp,
>> (Cc: Daniel, because IIUC you reviewed !16 which got this merged),
>>
>> I'm sorry I didn't notice this earlier, but the commit f4be03b3 dated
>> 2020-04-20 [0] is wrong. The super().__init__(*args, **kwargs) in
>> Callback.__init__ was there on purpose, because of how Python's inheritance in
>> new-style classes works.
>>
>> Let me explain this a bit, because it is not obvious.
...
Thank you for that excellent explanation - I learned something new.
Sorry for the noise.

>> I don't think this breaks anything (I very much doubt anyone would need to
>> write code that would trigger this), nevertheless, as the commit is both
>> pointless and wrong, and as the original author of libvirtaio I'd like to ask
>> for this commit to be reverted. If this breaks some static analysis tool,
>> could you just suppress it for this particular line?

I've reverted my change and instead added a `  # type: ignore` comment
to silence mypy.

> Could you open a merge request providing the revert along with your
> description of why the change was wrong and I'll review & approve it.

Done: <https://gitlab.com/libvirt/libvirt-python/-/merge_requests/19>

Sorry for the delay, but I was on vaccation and my first week back at
work was quiet busy. Have a nice weekend.

Philipp

PS: I will continue with the next chunk of changed for type annotations
when !19 is merged.





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux