Fix DeprecationError from ModuleSpec.loader.load_module in Red.load_extension #5956

Closed
Kuro-Rui wants to merge 21 commits from use_exec_module into V3/develop
Kuro-Rui commented 2023-01-06 01:32:44 +01:00 (Migrated from github.com)

Description of the changes

This PR changes load_module in Red.load_extension to exec_module to give support for Python 3.12

Have the changes in this PR been tested?

Yes

### Description of the changes This PR changes `load_module` in `Red.load_extension` to `exec_module` to give support for Python 3.12 ### Have the changes in this PR been tested? <!-- Choose one (remove the line that doesn't apply): --> Yes <!-- If the question doesn't apply (for example, it's not a code change), choose Yes. Please respond to this question truthfully. We do not delay nor reject PRs based on the answer to this question but it allows to better review this PR. -->
Jackenmen commented 2023-01-06 01:36:45 +01:00 (Migrated from github.com)

We currently have some other plans for changes to the import system (related to #2446) so I'm going to mark this as Blocked for now and we will see if it's still needed once we either make those changes or decide to defer them.

We currently have some other plans for changes to the import system (related to #2446) so I'm going to mark this as Blocked for now and we will see if it's still needed once we either make those changes or decide to defer them.
Zephyrkul (Migrated from github.com) reviewed 2023-01-06 01:39:25 +01:00
Zephyrkul (Migrated from github.com) commented 2023-01-06 01:37:26 +01:00

What is the point of a try-except that just re-raises?

What is the point of a try-except that just re-raises?
Kuro-Rui (Migrated from github.com) reviewed 2023-01-06 01:42:38 +01:00
Kuro-Rui (Migrated from github.com) commented 2023-01-06 01:42:38 +01:00

Sorry, there was another code there before but I forgot to remove it, lemme change them rq

Sorry, there was another code there before but I forgot to remove it, lemme change them rq
Kuro-Rui commented 2023-03-24 15:06:56 +01:00 (Migrated from github.com)

Sorry, closed by accident because of conflicts 😅

Sorry, closed by accident because of conflicts 😅
Kuro-Rui commented 2023-11-04 02:35:44 +01:00 (Migrated from github.com)

Recently found a bug, apparently if you load warnings (redbot.cogs.warnings) it replaces the built-in warnings module with red's warnings cog. Will find a fix ASAP.

Recently found a bug, apparently if you load warnings (`redbot.cogs.warnings`) it replaces the built-in warnings module with red's warnings cog. Will find a fix ASAP.
Kuro-Rui commented 2023-11-04 03:11:11 +01:00 (Migrated from github.com)

Fixed!

Fixed!
Jackenmen commented 2026-05-22 08:31:30 +02:00 (Migrated from github.com)

Superseded by #6693

Superseded by #6693

Pull request closed

Sign in to join this conversation.
No reviewers
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!5956
No description provided.