[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:
jack1142
2019-12-20 08:06:53 +01:00
committed by Michael H
parent 9d027747d1
commit b457f8d1c1
10 changed files with 149 additions and 12 deletions

View File

@@ -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())