Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Use new PyPI urls #3607

Merged
merged 3 commits into from Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion redbot/core/core_commands.py
Expand Up @@ -310,7 +310,7 @@ async def info(self, ctx: commands.Context):
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/pypi/Red-DiscordBot"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While these links work, the actual location both the old and new link bring you to is https://pypi.org/project/Red-DiscordBot (pypi -> project). Should we link there instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually used to link to the project but rather as an API endpoint. This endpoint only works with url https://pypi.org/pypi/Red-DiscordBot/json, not with https://pypi.org/project/Red-DiscordBot/json

support_server_url = "https://discord.gg/red"
dpy_repo = "https://github.com/Rapptz/discord.py"
python_url = "https://www.python.org/"
Expand Down
2 changes: 1 addition & 1 deletion redbot/core/events.py
Expand Up @@ -86,7 +86,7 @@ async def on_ready():
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(
Expand Down