[V3 WIP] create and use a fork of discord.py #1961
No reviewers
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!1961
Loading…
Reference in a new issue
No description provided.
Delete branch "V3/use-d.py-fork"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP
This is still a work in progress, but given the scope of changes proposed, putting it forward for discussion prior to completion provides more time for discussion.
Why?
Several behaviors of discord.py are undesirable to how we use it, and discussion with the maintainer of that library of bringing changes which would not majorly change the overall behavior but help in the specific edge cases we were experiencing was not promising. While this was initially partially solved by using a custom commands module, there are several places we could benefit from underlying changes to this which would already require enforcing our overwritten commands module. In doing this via fork, we can maintain our changes in a much cleaner manner.
This significantly reduces the complexity of much of the existing code in the bot, as well as give us sane avenues for handling several currently open issues.
This also gives us a greater level of control over keeping discord.py compatible with the bot given the original lib's maintainer's stance on breaking changes.
Plan to maintain the fork
The fork should track upstream changes manually to ensure we don't break anything in the process.
We should tag releases on this fork which correspond to the bot version it was tested for, and specifically use that tagged version. We should periodically update the bot version when the lib adds anything new which when we are able to accommodate it and verify it does not break expectations we have for behavior.
What does this actually improve?
We'll get performance improvements on autohelp.
We'll be able to collect checks to run when a view is consumed, rather than run checks incrementally, allowing us to discard duplicate checks, and ensure full compatibility with our permission model, without requiring view modification from a check #1931
We won't need to reimplement certain things like Command.parents in a not OOP manner or enforce our command usage through type checking, or class modification to allow use in things like fuzzy search (example #1880)
We gain the ability to implement things in a cleaner fashion where otherwise we are butting heads with the lib in use in some cases.
I like the idea of using our fork of discord.py, especially because they're not responsive with their pull requests.
I made a PR which adds some infos to the application info but it's not getting merged, while everything is correct (I did everything Danny asked to do, but, even with the recent breaking changes pushed, it's still pending...)
https://github.com/Rapptz/discord.py/pull/1341
Btw, this PR is needed for #1847
Given the discussion about this in discord, I will leave this open until a final decision, but it's likely to be fixed by a combination of 3 other things instead, and won't receive any more work towards this solution unless that changes.
Closing in favor of more suitable fix #1963
Pull request closed