Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

feat: Add Python 3.11 support #687

Merged
merged 6 commits into from
Oct 25, 2022
Merged

feat: Add Python 3.11 support #687

merged 6 commits into from
Oct 25, 2022

Conversation

zevaryx
Copy link
Contributor

@zevaryx zevaryx commented Oct 23, 2022

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

This changes a few dependencies to allow for Python 3.11 support

Note

Python 3.11.0rc2 is out, with full 3.11 releasing in a few days. This adds preliminary support, but is far from complete. This does not break anything on 3.10, but currently causes issues with commands not working properly on 3.11

Python 3.11.0 is fully released, and the breaking changes are fixed with the release. The branch is working as intended, and local tests pass with flying colors

Changes

  • Change required Python version to >=3.10 from ^3.10
  • Update aiohttp to 3.8.3
  • Copy enum._decompose from the Python 3.10.8 source code into naff/models/discord/enums.py

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@silasary
Copy link
Collaborator

enum._decompose is still needed in 3.10, and tests are failing without it

@zevaryx
Copy link
Contributor Author

zevaryx commented Oct 24, 2022

Hmmmm, I didn't see that locally. I'm going to have to find an alternative to using enum._decompose since it's gone

@zevaryx
Copy link
Contributor Author

zevaryx commented Oct 24, 2022

Looks like another issue is that super() was changed to be super(type, obj). From running pytest locally:
image

@zevaryx
Copy link
Contributor Author

zevaryx commented Oct 24, 2022

The above issue was resolved by updating Python 3.11, so whatever the issue was was resolved. The code currently works and is pending Python 3.11.0 release and updating tests to check 3.11 as well

@zevaryx
Copy link
Contributor Author

zevaryx commented Oct 24, 2022

image

Python 3.11.0 is released, and this branch is passing. Once the docker images are released, we should be able to integrate multi-version testing into the actions to make sure we don't break either version

@silasary silasary marked this pull request as ready for review October 25, 2022 13:39
Copy link
Collaborator

@silasary silasary left a comment

Choose a reason for hiding this comment

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

I am happy with this

@LordOfPolls LordOfPolls merged commit 46ca1a0 into 2.x Oct 25, 2022
@LordOfPolls LordOfPolls deleted the py3.11 branch October 25, 2022 13:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants