Skip to content

fix: remove internal use of deprecated role type methods#3167

Merged
Lulalaby merged 18 commits intoPycord-Development:masterfrom
Revnoplex:fix/internal-deprecated-method-use
Mar 30, 2026
Merged

fix: remove internal use of deprecated role type methods#3167
Lulalaby merged 18 commits intoPycord-Development:masterfrom
Revnoplex:fix/internal-deprecated-method-use

Conversation

@Revnoplex
Copy link
Copy Markdown
Contributor

@Revnoplex Revnoplex commented Mar 22, 2026

Caution

Feature freeze is active, as described by our Release Schedule.

Summary

#2708 deprecated the use of certain role type methods (eg. Role.is_premium_subscriber) in favour of the RoleType enum. Now I found the library throwing several deprecation warnings when firing the on_guild_update event and upon tracing the lines the warnings were emitted from found several uses of the old methods. This pr replaces the found internal usage of these old methods.

Information

  • 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

  • I have searched the open pull requests for duplicates.
  • 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.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@Revnoplex Revnoplex requested review from a team, Icebluewolf and NeloBlivion March 22, 2026 21:58
@Revnoplex Revnoplex requested a review from JustaSqu1d March 22, 2026 21:58
@Revnoplex Revnoplex requested a review from a team as a code owner March 22, 2026 21:58
@github-project-automation github-project-automation bot moved this to Todo in Pycord Mar 22, 2026
@Revnoplex Revnoplex requested review from Lulalaby and removed request for a team March 22, 2026 21:58
@pycord-app
Copy link
Copy Markdown

pycord-app bot commented Mar 22, 2026

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3167/head:pr-3167
git checkout pr-3167

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3167/head

@Revnoplex Revnoplex requested a review from a team as a code owner March 22, 2026 21:59
@Paillat-dev Paillat-dev self-requested a review March 22, 2026 21:59
@Paillat-dev
Copy link
Copy Markdown
Member

My fault...

@Paillat-dev Paillat-dev added this to the v2.8.0 milestone Mar 22, 2026
@Revnoplex
Copy link
Copy Markdown
Contributor Author

Revnoplex commented Mar 22, 2026

I'm assuming I need a changelog entry this time as theres an entry for 2.8.0rc1 and the problem was introduced before this

Lulalaby
Lulalaby previously approved these changes Mar 22, 2026
@Soheab
Copy link
Copy Markdown
Contributor

Soheab commented Mar 22, 2026

Should use is when comparing enums.

Copy link
Copy Markdown
Member

@Paillat-dev Paillat-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes needs a changelog as well.

Also please hold till I take a better look

@Paillat-dev Paillat-dev added hold: changelog This pull request is missing a changelog entry hold: discussion This pull request needs to be further discussed between maintainers labels Mar 22, 2026
@Paillat-dev Paillat-dev added hold: testing This pull request requires further testing and removed hold: discussion This pull request needs to be further discussed between maintainers labels Mar 23, 2026
Revnoplex and others added 2 commits March 24, 2026 09:54
Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: Revnoplex <62947003+Revnoplex@users.noreply.github.com>
@Revnoplex
Copy link
Copy Markdown
Contributor Author

What testing needs to be done?

@Paillat-dev
Copy link
Copy Markdown
Member

Not by you, I just wanna check that everything works as expected. hold: testing is there for other maintainers to signal to them to wait. Should all be alright though.

@Lulalaby Lulalaby requested a review from a team March 25, 2026 11:38
Paillat-dev
Paillat-dev previously approved these changes Mar 27, 2026
Copy link
Copy Markdown
Member

@Paillat-dev Paillat-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; tested; thanks for the pr !

@Lulalaby Lulalaby merged commit be4bea2 into Pycord-Development:master Mar 30, 2026
28 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Pycord Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working hold: testing This pull request requires further testing priority: medium Medium Priority

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants