[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Warning when calling obsolete Qt methods?
From:       Florian Bruhin <me () the-compiler ! org>
Date:       2021-08-27 11:58:22
Message-ID: 20210827115822.fdn2gvdbv75surbg () aragog ! localdomain
[Download RAW message or body]


Hi,

On Fri, Aug 27, 2021 at 02:35:42PM +0300, Dmitry Shachnev wrote:
> On Fri, Aug 27, 2021 at 12:22:58PM +0100, Phil Thompson wrote:
> > I'm against it because of the maintenance overhead

Fair point - I don't know how metasip works exactly, but I suppose it
would be possible for it to let you know if something was obsoleted in a
new Qt release?

> > and the possible appearance of annoying warnings to the user of an
> > application.

IIRC Python hides deprecation warnings outside of __main__ by default:
https://www.python.org/dev/peps/pep-0565/

> > It would be different if the deprecated methods where to be removed but they
> > never are.
> 
> A lot of methods that were deprecated in Qt 5 were removed in Qt 6.
> 
> So having deprecation warnings in PyQt6 would help developers to make their
> apps compatible with future Qt 7.

Indeed - but also, there's usually a good reason a method gets
deprecated. Sometimes it's just "whoops, we found a better name", but
often it's "oh, this method actually does something unexpected in a
certain corner case, but we can't fix it in a backwards-compatible way".

Even if they aren't getting removed, they are potential footguns, and
(contrary to the C++ world) there's currently no way for a PyQt
developer to find out which footguns they might be using accidentally.

Florian

-- 
            me@the-compiler.org | https://www.qutebrowser.org 
       https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
       GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
             I love long mails! | https://email.is-not-s.ms/

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic