mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -05:00
docs: deprecation of shared libraries has been postponed to 3.4 (#3449)
This commit is contained in:
@@ -29,7 +29,7 @@ _ = Translator("Downloader", __file__)
|
||||
|
||||
DEPRECATION_NOTICE = _(
|
||||
"\n**WARNING:** The following repos are using shared libraries"
|
||||
" which are marked for removal in Red 3.3: {repo_list}.\n"
|
||||
" which are marked for removal in Red 3.4: {repo_list}.\n"
|
||||
" You should inform maintainers of these repos about this message."
|
||||
)
|
||||
|
||||
@@ -237,7 +237,7 @@ class Downloader(commands.Cog):
|
||||
await self.conf.installed_libraries.set(installed_libraries)
|
||||
|
||||
async def _shared_lib_load_check(self, cog_name: str) -> Optional[Repo]:
|
||||
# remove in Red 3.3
|
||||
# remove in Red 3.4
|
||||
is_installed, cog = await self.is_installed(cog_name)
|
||||
# it's not gonna be None when `is_installed` is True
|
||||
# if we'll use typing_extensions in future, `Literal` can solve this
|
||||
|
||||
@@ -22,7 +22,7 @@ class SharedLibImportWarner(MetaPathFinder):
|
||||
return None
|
||||
msg = (
|
||||
"One of cogs uses shared libraries which are"
|
||||
" deprecated and scheduled for removal in Red 3.3.\n"
|
||||
" deprecated and scheduled for removal in Red 3.4.\n"
|
||||
"You should inform author of the cog about this message."
|
||||
)
|
||||
warnings.warn(msg, SharedLibDeprecationWarning, stacklevel=2)
|
||||
|
||||
@@ -126,7 +126,7 @@ class CoreLogic:
|
||||
else:
|
||||
await bot.add_loaded_package(name)
|
||||
loaded_packages.append(name)
|
||||
# remove in Red 3.3
|
||||
# remove in Red 3.4
|
||||
downloader = bot.get_cog("Downloader")
|
||||
if downloader is None:
|
||||
continue
|
||||
@@ -705,13 +705,13 @@ class Core(commands.Cog, CoreLogic):
|
||||
if len(repos_with_shared_libs) == 1:
|
||||
formed = _(
|
||||
"**WARNING**: The following repo is using shared libs"
|
||||
" which are marked for removal in Red 3.3: {repo}.\n"
|
||||
" which are marked for removal in Red 3.4: {repo}.\n"
|
||||
"You should inform maintainer of the repo about this message."
|
||||
).format(repo=inline(repos_with_shared_libs.pop()))
|
||||
else:
|
||||
formed = _(
|
||||
"**WARNING**: The following repos are using shared libs"
|
||||
" which are marked for removal in Red 3.3: {repos}.\n"
|
||||
" which are marked for removal in Red 3.4: {repos}.\n"
|
||||
"You should inform maintainers of these repos about this message."
|
||||
).format(repos=humanize_list([inline(repo) for repo in repos_with_shared_libs]))
|
||||
output.append(formed)
|
||||
@@ -823,13 +823,13 @@ class Core(commands.Cog, CoreLogic):
|
||||
if len(repos_with_shared_libs) == 1:
|
||||
formed = _(
|
||||
"**WARNING**: The following repo is using shared libs"
|
||||
" which are marked for removal in Red 3.3: {repo}.\n"
|
||||
" which are marked for removal in Red 3.4: {repo}.\n"
|
||||
"You should inform maintainers of these repos about this message."
|
||||
).format(repo=inline(repos_with_shared_libs.pop()))
|
||||
else:
|
||||
formed = _(
|
||||
"**WARNING**: The following repos are using shared libs"
|
||||
" which are marked for removal in Red 3.3: {repos}.\n"
|
||||
" which are marked for removal in Red 3.4: {repos}.\n"
|
||||
"You should inform maintainers of these repos about this message."
|
||||
).format(repos=humanize_list([inline(repo) for repo in repos_with_shared_libs]))
|
||||
output.append(formed)
|
||||
|
||||
Reference in New Issue
Block a user