Skip to content

Python 3.10 & bot-core migration#1092

Merged
ChrisLovering merged 18 commits into
mainfrom
bot-core-migration
Sep 23, 2022
Merged

Python 3.10 & bot-core migration#1092
ChrisLovering merged 18 commits into
mainfrom
bot-core-migration

Conversation

@ChrisLovering
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering commented Aug 23, 2022

Description

This bumps the bot up to 3.10, bumps all deps. The bumped deps include bot-core which comes with a move to the stable Discord.py 2.0 release.

Sir-Lancebot never had the async cog loading treatment, so this PR also includes that.

There are also miscellaneous fixes included in here for breaking changes in dep bumps.

Something worth mentioning is that I had to change our approach to dry running the bot in CI, see ab218f2. This is because cog laoding is managed by bot-core in the bot's setup_hook, which is called after logging in. Obviously we don't want to give CI a bot token, so these changes were required.
This new approach does output some warnings, see the recent successful action, which can safely be ignored, but may confuse users if they actually get an error in that step, and see all the extra output.

Did you:

@python-discord-policy-bot python-discord-policy-bot Bot requested a review from a team August 23, 2022 20:43
@ChrisLovering ChrisLovering added priority: 1 - high High Priority area: dependencies Related to package dependencies and management status: needs review Author is waiting for someone to review and approve type: enhancement Changes or improvements to existing features category: core Related to core functionality labels Aug 23, 2022
@ChrisLovering ChrisLovering force-pushed the bot-core-migration branch 3 times, most recently from 22cf4e2 to ce407f9 Compare August 23, 2022 21:10
@Xithrius Xithrius requested review from Bluenix2, HassanAbouelela and jchristgit and removed request for Den4200 and ks129 August 23, 2022 21:34
@ChrisLovering ChrisLovering force-pushed the bot-core-migration branch 4 times, most recently from c55deb4 to a9c4778 Compare August 24, 2022 16:01
ChrisLovering added a commit that referenced this pull request Aug 28, 2022
1<<15 is the flag for message content intent, so adding this value to the intents value hard codes that to always be enabled.

Doing it this way also bypasses the need to patch the flags themselvse in discord.py.

This is required until #1092 is merged.
Comment thread bot/__init__.py
Copy link
Copy Markdown
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

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

Great stuff 🎉

@ChrisLovering
Copy link
Copy Markdown
Member Author

ChrisLovering commented Sep 21, 2022

Rebased onto main. Looking at the diff there are no conflicting changes

This moves away from an infinite loop, to a task scheduling approach. Doing it this way avoids an infinitely running cog_load
Copy link
Copy Markdown
Contributor

@HassanAbouelela HassanAbouelela left a comment

Choose a reason for hiding this comment

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

This was a big PR. Some would say it was too big. Others are simply wrong.

@ChrisLovering ChrisLovering merged commit f9cc77f into main Sep 23, 2022
@ChrisLovering ChrisLovering deleted the bot-core-migration branch September 23, 2022 21:58
@Xithrius Xithrius removed the status: needs review Author is waiting for someone to review and approve label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dependencies Related to package dependencies and management category: core Related to core functionality priority: 1 - high High Priority type: enhancement Changes or improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants