Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace deprecated pkg_resources with importlib.metadata to clear DeprecationWarning #2392

Merged
merged 6 commits into from Mar 17, 2024

Conversation

Revnoplex
Copy link
Contributor

@Revnoplex Revnoplex commented Mar 13, 2024

Summary

Replaced pkg_resources with importlib.metadata as favoured here. Hence replacing get_distribution() with version().

This clears the following deprecation warning:

/home/username/pycord/venv/lib/python3.11/site-packages/discord/__main__.py:33: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

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.

@Lulalaby Lulalaby enabled auto-merge (squash) March 13, 2024 14:10
Lulalaby
Lulalaby previously approved these changes Mar 13, 2024
@Lulalaby Lulalaby requested review from BobDotCom and removed request for plun1331 March 13, 2024 14:10
@plun1331
Copy link
Member

Should we have a changelog entry for this?

@JustaSqu1d
Copy link
Member

Should we have a changelog entry for this?

I don't think so because it doesn't affect the end-user?

@plun1331
Copy link
Member

Should we have a changelog entry for this?

I don't think so because it doesn't affect the end-user?

It removes a deprecation warning that appears in their terminal

Copy link
Member

@JustaSqu1d JustaSqu1d left a comment

Choose a reason for hiding this comment

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

Please add a changelog entry

@Revnoplex
Copy link
Contributor Author

alr, I'll get onto it soon

auto-merge was automatically disabled March 15, 2024 07:43

Head branch was pushed to by a user without write access

@Revnoplex
Copy link
Contributor Author

Done

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
plun1331
plun1331 previously approved these changes Mar 15, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
auto-merge was automatically disabled March 16, 2024 00:17

Head branch was pushed to by a user without write access

Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com>
Signed-off-by: Revnoplex <62947003+Revnoplex@users.noreply.github.com>
@Lulalaby Lulalaby merged commit 0c68e5f into Pycord-Development:master Mar 17, 2024
31 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting review Awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants