Update deprecation warnings #3608

Merged
Jackenmen merged 9 commits from jack1142-patch-5 into V3/develop 2020-06-22 03:25:34 +02:00
Jackenmen commented 2020-02-23 04:47:21 +01:00 (Migrated from github.com)

Description of the changes

Updates deprecations to be based on earliest date when it can be removed instead of specific minor version number. Removal will still occur in minor versions.
For Downloader's shared libraries, the warning is changed to indefinite "in future" as it is currently unknown when shared libraries will be removed.

This PR also adds a proper DeprecationWarning when APIToken class is imported/used.

### Description of the changes Updates deprecations to be based on earliest date when it can be removed instead of specific minor version number. Removal will still occur in minor versions. For Downloader's shared libraries, the warning is changed to indefinite "in future" as it is currently unknown when shared libraries will be removed. This PR also adds a proper DeprecationWarning when APIToken class is imported/used.
palmtree5 (Migrated from github.com) reviewed 2020-02-23 04:47:21 +01:00
tekulvw (Migrated from github.com) reviewed 2020-02-23 04:47:21 +01:00
Twentysix26 (Migrated from github.com) reviewed 2020-02-23 04:47:21 +01:00
Flame442 (Migrated from github.com) requested changes 2020-05-13 15:32:58 +02:00
Flame442 (Migrated from github.com) left a comment

The strings are missing a few "the"s.
"...for removal in the future..."
"...will be removed in the first minor..."

The strings are missing a few "the"s. "...for removal in _**the**_ future..." "...will be removed in _**the**_ first minor..."
Flame442 (Migrated from github.com) reviewed 2020-05-16 00:40:55 +02:00
Flame442 (Migrated from github.com) left a comment
No description provided.
A discussed in discord, these warnings are not showing up, seemingly for no reason, after applying this change. The old warnings do show up on a 3.3.6 bot, however the edited (and new) warnings do not appear. If someone else would like to test this PR to see if it is just me(/windows) being weird, that would be appreciated. An example eval that produces a warning on 3.3.6 but not this pr is ```py [p]eval from redbot.core.utils import bounded_gather_iter return bounded_gather_iter(ctx.send, loop='aaa') ```
Flame442 (Migrated from github.com) reviewed 2020-05-16 01:41:50 +02:00
Flame442 (Migrated from github.com) left a comment
No description provided.
Now that my warnings are not being suppressed, this works fine :P For consistency's sake, all of the messages could be updated to have a similar format, but they work fine.
Flame442 (Migrated from github.com) reviewed 2020-05-16 02:27:49 +02:00
Flame442 (Migrated from github.com) reviewed 2020-05-16 04:04:38 +02:00
Flame442 (Migrated from github.com) left a comment
No description provided.
whatever...
Jackenmen commented 2020-05-27 23:14:39 +02:00 (Migrated from github.com)

I found an issue with the module name shown by the AttributeError when import from redbot.core.commands:
image
I fixed it in latest commit.

I found an issue with the module name shown by the `AttributeError` when import from `redbot.core.commands`: ![image](https://user-images.githubusercontent.com/6032823/83072860-c5e2a380-a06f-11ea-9a65-54ef90c1879b.png) I fixed it in latest commit.
Flame442 (Migrated from github.com) requested changes 2020-06-05 20:59:33 +02:00
Flame442 (Migrated from github.com) left a comment
...\redbot\core\commands\__init__.py:150: DeprecationWarning: `APIToken` is deprecated since Red 3.3.0 and will be removed in the first minor release after 2020-08-05. Use `DictConverter` instead.
  return _converter__getattr__(name)

This is the warning I get from putting from redbot.core.commands import APIToken in a cog (or eval). It does not explain where the improper code is being used (and has that return line alone for some reason?)

```py ...\redbot\core\commands\__init__.py:150: DeprecationWarning: `APIToken` is deprecated since Red 3.3.0 and will be removed in the first minor release after 2020-08-05. Use `DictConverter` instead. return _converter__getattr__(name) ``` This is the warning I get from putting `from redbot.core.commands import APIToken` in a cog (or eval). It does not explain where the improper code is being used (and has that return line alone for some reason?)
Jackenmen commented 2020-06-05 21:35:04 +02:00 (Migrated from github.com)

Ahh sorry, that's my oversight, I didn't notice that the deprecation warning needs a different stack level when being done from commands instead of commands.converter.

I pushed the commit that should fix this.

Ahh sorry, that's my oversight, I didn't notice that the deprecation warning needs a different stack level when being done from `commands` instead of `commands.converter`. I pushed the commit that should fix this.
Flame442 (Migrated from github.com) approved these changes 2020-06-05 21:53:35 +02:00
Jackenmen commented 2020-06-22 03:08:56 +02:00 (Migrated from github.com)

We could probably already merge this PR - this only updates deprecation warnings which means there's no breaking change, and it seems beneficial that people will be able to see them sooner rather than later. It's in 3.4.0 milestone mostly because it needs to be ready before 3.4 gets released, but I don't think there's a reason to keep this hanging until we're actually ready with 3.4.

We could probably already merge this PR - this only updates deprecation warnings which means there's no breaking change, and it seems beneficial that people will be able to see them sooner rather than later. It's in 3.4.0 milestone mostly because it needs to be ready *before* 3.4 gets released, but I don't think there's a reason to keep this hanging until we're actually ready with 3.4.
Kowlin (Migrated from github.com) approved these changes 2020-06-22 03:25:09 +02:00
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!3608
No description provided.