pycord
pycord copied to clipboard
Update utils.deprecated to use PEP 702
Summary
PEP 702 introduces a new typing.deprecated decorator, we should use it.
What is the feature request for?
The core library
The Problem
A more standard way of declaring deprecations
The Ideal Solution
Internally call typing.deprecated
inside of utils.deprecated
, instead of manually creating a warning (or maybe both?)
The Current Solution
No response
Additional Context
Although @typing.deprecated
is slated for python 3.12, it was added to typing-extensions in python/typing_extensions#105, and we should use this for backwards support.