[Tracking] An initiative to make codebase racially neutral #4048

Closed
opened 2020-07-07 18:58:33 +02:00 by Drapersniper · 7 comments
Drapersniper commented 2020-07-07 18:58:33 +02:00 (Migrated from github.com)

Making this issue to take place instead of #4047.

There is a few things to ensure while taking these steps.

  • This should not be done as one bulk PR
    • Each cog that has this applied to it should have individual PRs
    • An Individual PR for core changes should exist
  • We shouldn't make any breaking changes/changes that would confuse the existing user base
  • Before (if at all) removing all mentioned of blacklist and whitelist we should give users some grace period, because if not this would be a breaking change, that's not compliant with our guarantees.
  • When changing internals we should ensure everything they change is also changed.
  • When changing config defaults/existing values, we should ensure a data migration is performed.

Currently the following uses either whitelist or blacklist:

  • Audio Cog (redbot/cogs/audio/core/init.py)
    • Audioset commands (redbot/cogs/audio/core/commands/audioset.py)
    • Audio Utils (redbot/cogs/audio/core/utilities/validation.py)
    • Audio Lavalink Manager (redbot/cogs/audio/manager.py)
  • Bot Core (redbot/core/bot.py)
  • Bot Core commands (redbot/core/core_commands.py)
  • Bot Global checks (redbot/core/global_checks.py)
  • Bot Setting cache (redbot/core/settings_caches.py)
  • Permissions converters (redbot/cogs/permissions/converters.py)

Docs should auto update once the above are update.

The permission cogs currently allows "blacklist" and "whitelist" as a user input for it's converters I don't think this should ever be changed, although we should add the new keywords to this converter to also accept them.


We should focus on changing front facing commands first:

  • Audioset commands (redbot/cogs/audio/core/commands/audioset.py)
  • Bot Core commands (redbot/core/core_commands.py)
  • Permissions converters (redbot/cogs/permissions/converters.py)

Note: We should rename the user facing commands only at this stage, while aliasing the old names


Once the above are worked on we should then look at potentially implementing this in the backend and config.

  • Audio Cog (redbot/cogs/audio/core/init.py)
    • Audioset commands (redbot/cogs/audio/core/commands/audioset.py)
    • Audio Utils (redbot/cogs/audio/core/utilities/validation.py)
    • Audio Lavalink Manager (redbot/cogs/audio/manager.py)
  • Bot Core (redbot/core/bot.py)
  • Bot Core commands (redbot/core/core_commands.py)
  • Bot Global checks (redbot/core/global_checks.py)
  • Bot Setting cache (redbot/core/settings_caches.py)

Note: Due to audio being in a major rewrite currently I would ask that if you choose to pick up this PR to work on it, don't touch audio. as I will be following the above in Audio anyways as part of the rewrite.

Also if I missed anything on the summary above please feel free to flag it.

Making this issue to take place instead of #4047. There is a few things to ensure while taking these steps. - This should not be done as one bulk PR - Each cog that has this applied to it should have individual PRs - An Individual PR for core changes should exist - We shouldn't make any breaking changes/changes that would confuse the existing user base - Before (if at all) removing all mentioned of `blacklist` and `whitelist` we should give users some grace period, because if not this would be a breaking change, that's not compliant with our guarantees. - When changing internals we should ensure everything they change is also changed. - When changing config defaults/existing values, we should ensure a data migration is performed. Currently the following uses either `whitelist` or `blacklist`: - Audio Cog (redbot/cogs/audio/core/__init__.py) - Audioset commands (redbot/cogs/audio/core/commands/audioset.py) - Audio Utils (redbot/cogs/audio/core/utilities/validation.py) - Audio Lavalink Manager (redbot/cogs/audio/manager.py) - Bot Core (redbot/core/bot.py) - Bot Core commands (redbot/core/core_commands.py) - Bot Global checks (redbot/core/global_checks.py) - Bot Setting cache (redbot/core/settings_caches.py) - Permissions converters (redbot/cogs/permissions/converters.py) *Docs should auto update once the above are update.* The permission cogs currently allows "blacklist" and "whitelist" as a user input for it's converters I don't think this should ever be changed, although we should add the new keywords to this converter to also accept them. --- We should focus on changing front facing commands first: - [ ] Audioset commands (redbot/cogs/audio/core/commands/audioset.py) - [x] Bot Core commands (redbot/core/core_commands.py) - [ ] Permissions converters (redbot/cogs/permissions/converters.py) *Note: We should rename the user facing commands only at this stage, while aliasing the old names* --- Once the above are worked on we should then look at potentially implementing this in the backend and config. - [ ] Audio Cog (redbot/cogs/audio/core/__init__.py) - [ ] Audioset commands (redbot/cogs/audio/core/commands/audioset.py) - [ ] Audio Utils (redbot/cogs/audio/core/utilities/validation.py) - [ ] Audio Lavalink Manager (redbot/cogs/audio/manager.py) - [ ] Bot Core (redbot/core/bot.py) - [x] Bot Core commands (redbot/core/core_commands.py) - [ ] Bot Global checks (redbot/core/global_checks.py) - [ ] Bot Setting cache (redbot/core/settings_caches.py) --- Note: Due to audio being in a major rewrite currently I would ask that if you choose to pick up this PR to work on it, don't touch audio. as I will be following the above in Audio anyways as part of the rewrite. Also if I missed anything on the summary above please feel free to flag it.
owocado commented 2020-07-07 19:23:23 +02:00 (Migrated from github.com)

Thank you. This is astronomically better than my dirt work.

Thank you. This is astronomically better than my dirt work.
Jackenmen commented 2020-07-07 19:26:37 +02:00 (Migrated from github.com)

Once the above are worked on we should then look at potentially implementing this in the backend and config.

About the Config part, we can't get rid of this terminology in Config use anyway since the migration will still have to use the old names, so is there a point in changing those?

> Once the above are worked on we should then look at potentially implementing this in the backend and config. About the Config part, we can't get rid of this terminology in Config use anyway since the migration will still have to use the old names, so is there a point in changing those?
Drapersniper commented 2020-07-07 19:37:49 +02:00 (Migrated from github.com)

@thisisjvgrace Assigning to you as you opened the first PR and showed interest in working on it.

For now don't work on anything please are I would like to give some grace period to people to voice any concerns they may have it and/or suggest alternate ways.

If/once this is ready to be worked on We will indicate to you, so that the first stage can be addressed.

Jack jack thats a good point, due to old versions having it we would need to keep the defaults, hmm so yeah config changes here may not be able to be avoided. without completely breaking old users that arent up to date. which is not something I'm willing to accept in any way.

After all this should absolutely not be a breaking PR.

@thisisjvgrace Assigning to you as you opened the first PR and showed interest in working on it. For now don't work on anything please are I would like to give some grace period to people to voice any concerns they may have it and/or suggest alternate ways. If/once this is ready to be worked on We will indicate to you, so that the first stage can be addressed. Jack jack thats a good point, due to old versions having it we would need to keep the defaults, hmm so yeah config changes here may not be able to be avoided. without completely breaking old users that arent up to date. which is not something I'm willing to accept in any way. After all this should absolutely not be a breaking PR.
Jackenmen commented 2020-07-07 19:43:44 +02:00 (Migrated from github.com)

due to old versions having it we would need to keep the defaults

That is not what I meant - we wouldn't need to keep the config defaults as we can use get_raw for that. What I meant is that we would be using the old names in code that migrates it to the new place which seems to make this part (as in, changing names in config) unneeded and only results in complicating the code by adding a migration.

> due to old versions having it we would need to keep the defaults That is not what I meant - we wouldn't need to keep the config defaults as we can use `get_raw` for that. What I meant is that we would be using the old names in code that migrates it to the new place which seems to make this part (as in, changing names in config) unneeded and only results in complicating the code by adding a migration.
Dav-Git commented 2020-07-07 21:18:49 +02:00 (Migrated from github.com)

due to old versions having it we would need to keep the defaults

That is not what I meant - we wouldn't need to keep the config defaults as we can use get_raw for that. What I meant is that we would be using the old names in code that migrates it to the new place which seems to make this part (as in, changing names in config) unneeded and only results in complicating the code by adding a migration.

I think this would be something that needs to be done when/if V4 becomes a thing. Currently I agree that this would do more harm than good. I'm all for changing user facing commands though.

> > due to old versions having it we would need to keep the defaults > > That is not what I meant - we wouldn't need to keep the config defaults as we can use `get_raw` for that. What I meant is that we would be using the old names in code that migrates it to the new place which seems to make this part (as in, changing names in config) unneeded and only results in complicating the code by adding a migration. I think this would be something that needs to be done when/if V4 becomes a thing. Currently I agree that this would do more harm than good. I'm all for changing user facing commands though.
Vexed01 commented 2020-07-10 09:19:01 +02:00 (Migrated from github.com)

^ oops, wrong number... I edited and it unlinked 👌

^ oops, wrong number... I edited and it unlinked 👌
TurnrDev commented 2020-09-27 16:23:41 +02:00 (Migrated from github.com)

Jack jack thats a good point, due to old versions having it we would need to keep the defaults, hmm so yeah config changes here may not be able to be avoided. without completely breaking old users that arent up to date. which is not something I'm willing to accept in any way.

After all this should absolutely not be a breaking PR.

You could wait for yet another breaking change in d.py that will force people to update Red, and take that opportunity. If one things broke, break another lol?

> Jack jack thats a good point, due to old versions having it we would need to keep the defaults, hmm so yeah config changes here may not be able to be avoided. without completely breaking old users that arent up to date. which is not something I'm willing to accept in any way. > > After all this should absolutely not be a breaking PR. You could wait for yet another breaking change in d.py that will force people to update Red, and take that opportunity. If one things broke, break another lol?
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#4048
No description provided.