pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Update utils.deprecated to use PEP 702

Open BobDotCom opened this issue 1 year ago • 0 comments

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.

BobDotCom avatar Feb 10 '23 16:02 BobDotCom