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

List:       pykde
Subject:    Re: Deprecated method/class
From:       Julien Cabieces <julien.cabieces () oslandia ! com>
Date:       2024-03-06 12:59:55
Message-ID: 87le6vldjl.fsf () julienlaptop ! home
[Download RAW message or body]


Done : https://github.com/Python-SIP/sip/issues/8


> On 06/03/2024 08:48, Julien Cabieces wrote:
>> Hi,
>> According to quite recent PEP 702 [0] targeted for python version
>> 3.13,
>> it will be possible to add @deprecated decorator to functions and
>> classes so they could be identified statically by linter.
>> For now, thanks to the Deprecated annotation, SIP is able to flag a
>> method/class deprecated and will display a message whenever the
>> class/method is called at runtime.
>> But, it would be a nice improvment to detect them statically.
>> I think that one way to do it would be to add the decorator in SIP
>> generated pyi files. I have tested it with pyright and it works.
>> Could this be implemented ?
>> And could it be possible to add a specific message to the Deprecated
>> annotation, like "This method X() is deprecated, use Y() instead"
>> Regards,
>> Julien
>> [0] https://peps.python.org/pep-0702/
>
> Can you raise an issue...
>
> https://github.com/Python-SIP/sip/issues
>
> Thanks,
> Phil


-- 

Julien Cabieces
Senior Developer at Oslandia
julien.cabieces@oslandia.com
[prev in list] [next in list] [prev in thread] [next in thread] 

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