Skip to content

Update utils.deprecated to use PEP 702 #1917

@BobDotCom

Description

@BobDotCom

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions