bot icon indicating copy to clipboard operation
bot copied to clipboard

Simplify PEP cog to use PEP API

Open wookie184 opened this issue 3 years ago • 3 comments

There is a new PEP API (https://peps.python.org/api/peps.json) that saves us having to manually scrape files from github, largely simplifying the implementation.

As far as I can tell this was also the only usage of https://github.com/python-discord/bot/blob/5fe110b9a49144480ebca34dec65de91753994ec/bot/utils/caching.py, do we want to remove that given it's no longer used?

wookie184 avatar May 02 '22 15:05 wookie184

As far as I can tell this was also the only usage of https://github.com/python-discord/bot/blob/5fe110b9a49144480ebca34dec65de91753994ec/bot/utils/caching.py, do we want to remove that given it's no longer used?

I'd vote for removing it yea. We could add it to bot-core for future use if needed too.

ChrisLovering avatar May 02 '22 15:05 ChrisLovering

There's no rush to get this merged so we should wait for https://github.com/python/peps/issues/2584 to be resolved.

wookie184 avatar May 08 '22 11:05 wookie184

Yeah, I'd suggest waiting if you can, since until #2584 is resolved (hopefully soon...™) the "API" is experimental and undocumented, and the path/endpoint, structure, etc. may change.

CAM-Gerlach avatar May 08 '22 18:05 CAM-Gerlach

I'm going to close this PR for now as it's been stalled for a while, hopefully it can be reused at some point in the future.

wookie184 avatar Feb 25 '23 18:02 wookie184