pycord icon indicating copy to clipboard operation
pycord copied to clipboard

refactor: :recycle: update deprecated usage to use `typing.deprecated`

Open Paillat-dev opened this issue 6 months ago • 3 comments

Summary

Fixes #1917 Redo of #2655

The previous version of the PR did not work correctly with type checkers, this one does, with the compromise of needing to use the @deprecated(deprecated_message(...)) syntax. This allows for type checkers to mark methods as deprecated and do some kind of strike trough like shown below:

image

Information

  • [x] This PR fixes an issue.
  • [ ] This PR adds something new (e.g. new method or parameters).
  • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • [ ] This PR is not a code change (e.g. documentation, README, typehinting, examples, ...).

Checklist

  • [x] I have searched the open pull requests for duplicates.
  • [x] If code changes were made then they have been tested.
    • [ ] I have updated the documentation to reflect the changes.
  • [ ] If type: ignore comments were used, a comment is also left explaining why.
  • [ ] I have updated the changelog to include these changes.

Paillat-dev avatar Jul 13 '25 16:07 Paillat-dev

This pull request is in the In review step of the Pycord workflow.

Waiting for review from these teams:

  • All Contributors (1 of 2 required)
    • Pending reviewers: @Paillat-dev, @plun1331
  • Maintainers (0 of 1 required)
    • Pending reviewers: @plun1331

Waiting on these users to move the PR forward: @Paillat-dev, @ChickenDevs, @plun1331.

pullapprove4[bot] avatar Aug 06 '25 08:08 pullapprove4[bot]

@Pycord-Development/library-contributors

I need some input, specifically we should probably ditch the strict formatting for deprecation messages entirely to stay in confomrity with python syle guides so idk pls give opinions

Ref: https://discord.com/channels/881207955029110855/903819190274764800/1412100052780056627 Discussion here or https://discord.com/channels/881207955029110855/881735314987708456

Lulalaby avatar Sep 01 '25 15:09 Lulalaby

Please hold this one

Paillat-dev avatar Oct 20 '25 11:10 Paillat-dev