From e8b975a0953881057c0a668ba72cafe80eef7529 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Fri, 28 Feb 2020 02:43:21 +0100 Subject: [PATCH] [Core] Use new PyPI urls (#3607) * fix: use new PyPI urls * Update core_commands.py * Update core_commands.py --- redbot/core/core_commands.py | 5 +++-- redbot/core/events.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index b9e3f4af1..f8d493fa8 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -310,7 +310,8 @@ class Core(commands.Cog, CoreLogic): author_repo = "https://github.com/Twentysix26" org_repo = "https://github.com/Cog-Creators" red_repo = org_repo + "/Red-DiscordBot" - red_pypi = "https://pypi.python.org/pypi/Red-DiscordBot" + red_pypi = "https://pypi.org/project/Red-DiscordBot" + red_pypi_json = "https://pypi.org/pypi/Red-DiscordBot/json" support_server_url = "https://discord.gg/red" dpy_repo = "https://github.com/Rapptz/discord.py" python_url = "https://www.python.org/" @@ -327,7 +328,7 @@ class Core(commands.Cog, CoreLogic): custom_info = await self.bot._config.custom_info() async with aiohttp.ClientSession() as session: - async with session.get("{}/json".format(red_pypi)) as r: + async with session.get(red_pypi_json) as r: data = await r.json() outdated = VersionInfo.from_str(data["info"]["version"]) > red_version_info about = _( diff --git a/redbot/core/events.py b/redbot/core/events.py index ee40022ac..5c8347504 100644 --- a/redbot/core/events.py +++ b/redbot/core/events.py @@ -86,7 +86,7 @@ def init_events(bot, cli_flags): outdated_red_message = "" with contextlib.suppress(aiohttp.ClientError, discord.HTTPException): async with aiohttp.ClientSession() as session: - async with session.get("https://pypi.python.org/pypi/red-discordbot/json") as r: + async with session.get("https://pypi.org/pypi/red-discordbot/json") as r: data = await r.json() if VersionInfo.from_str(data["info"]["version"]) > red_version_info: INFO.append(