Add basic backcompat for people using Downloader internals (#6713)

This commit is contained in:
Jakub Kuczys
2026-04-08 00:17:11 +02:00
committed by GitHub
parent 6ceb45b35c
commit 2ea4c766ad
2 changed files with 19 additions and 0 deletions

View File

@@ -50,6 +50,17 @@ class Downloader(commands.Cog):
"""Nothing to delete"""
return
# This is a compatibility shim for people using Downloader internal pre-3.5.25.
# It will probably get removed in Red 3.6.
@property
def _repo_manager(self):
return _downloader._repo_manager
# This is a compatibility shim for people using Downloader internal pre-3.5.25.
# It will probably get removed in Red 3.6.
async def installed_cogs(self) -> Tuple[InstalledModule, ...]:
return await _downloader.installed_cogs()
@staticmethod
async def send_pagified(target: discord.abc.Messageable, content: str) -> None:
for page in pagify(content):

View File

@@ -0,0 +1,8 @@
# This is a compatibility shim for people using Downloader internal pre-3.5.25.
# It will probably get removed in Red 3.6.
# import everything from repo_manager module
from redbot.core._downloader.repo_manager import *
# use Repo subclass with `convert()` method instead of Repo from repo_manager module
from .converters import Repo