Skip to content

refactor: remaining 3.10+ cleanup - #3323

Open
vmphase wants to merge 13 commits into
masterfrom
refactor/py3.10-cleanup
Open

refactor: remaining 3.10+ cleanup#3323
vmphase wants to merge 13 commits into
masterfrom
refactor/py3.10-cleanup

Conversation

@vmphase

@vmphase vmphase commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up cleanup to the automated pyupgrade --py310-plus pass in #2988, covering things that tool didn't handle:

  • Replace typing_extensions.ParamSpec with typing.ParamSpec
  • Replace deprecated typing.Deque/Deque[...] with collections.deque/deque[...]
  • Replace collections.OrderedDict with plain dict (insertion-orderguaranteed since 3.7)
  • Drop the hasattr(types, "UnionType") guard
  • Convert big if/elif chain to match/case
  • Remove PY_310 version check, pre-3.10 branch, utils.flatten_literal_params and utils.classproperty

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.
  • I have read the Contributing Guidelines.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@vmphase
vmphase requested review from a team July 30, 2026 09:18
@vmphase
vmphase requested review from Lulalaby and plun1331 July 30, 2026 09:18
@github-project-automation github-project-automation Bot moved this to Todo in Pycord Jul 30, 2026
@pycord-app

pycord-app Bot commented Jul 30, 2026

Copy link
Copy Markdown

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/3323/head:pr-3323
git checkout pr-3323

This pull request can be installed with:

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

@vmphase

vmphase commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

I didn't update the changelog because all the changes are internal.
Furthermore, the #2988's changelog was not updated as well.

@Paillat-dev Paillat-dev added this to the 2.9.0rc1 milestone Jul 30, 2026
Comment thread discord/enums.py Outdated
Comment thread discord/enums.py Outdated
Comment thread discord/utils.py Outdated
@Lulalaby
Lulalaby force-pushed the refactor/py3.10-cleanup branch from 8586889 to fea27ed Compare July 30, 2026 13:01
@vmphase
vmphase requested review from Lulalaby and Paillat-dev and removed request for Lulalaby August 7, 2026 08:50
@Paillat-dev Paillat-dev added the hold: testing This pull request requires further testing label Aug 7, 2026
@Lulalaby
Lulalaby requested a review from ToothyDev August 7, 2026 09:00
ToothyDev
ToothyDev previously approved these changes Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold: testing This pull request requires further testing PA: Maintainers pending

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants