mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 02:16:09 -05:00
[Core] Add deprecation warnings about removal of shared libraries. (#3106)
* feat: add deprecation warning when importing shared libs * enhance(downloader): add shared libs deprecation warns * enhance: add deprecation warning when (re)loading cogs * docs(downloader): add deprecation note about shared libs * chore(changelog): add towncrier entries * style: split long tuple unpacks in multiple lines * fix: argument to `humanize_list` has to be a sequence
This commit is contained in:
@@ -33,6 +33,7 @@ from redbot.core.core_commands import Core, license_info_command
|
||||
from redbot.setup import get_data_dir, get_name, save_config
|
||||
from redbot.core.dev_commands import Dev
|
||||
from redbot.core import __version__, modlog, bank, data_manager, drivers
|
||||
from redbot.core._sharedlibdeprecation import SharedLibImportWarner
|
||||
from signal import SIGTERM
|
||||
|
||||
|
||||
@@ -322,6 +323,7 @@ def main():
|
||||
LIB_PATH.mkdir(parents=True, exist_ok=True)
|
||||
if str(LIB_PATH) not in sys.path:
|
||||
sys.path.append(str(LIB_PATH))
|
||||
sys.meta_path.insert(0, SharedLibImportWarner())
|
||||
|
||||
red.add_cog(Core(red))
|
||||
red.add_cog(CogManagerUI())
|
||||
|
||||
Reference in New Issue
Block a user