You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Created header records the date that the PEP was assigned a number
The number is usually assigned quickly after the PR to https://github.com/python/peps is created, but then the PR is reviewed which means it can be a while before it's actually merged and becomes visible. The difference can be fairly big (e.g. python/peps#2620).
We can fix this by extending the check if it's in the last month (maybe last 2 months). The only issue I see with this is that in development people might get a few peps sent in a row when they first start up, but this seems pretty minor.
I'm somewhat struggling with the overall logic of that function. If we're keeping track of what PEPs are already shown in the channel, why do we need any date validation?
It also doesn't seem like there's an exit condition in the loop. Are we just going over the entire feed every time?
I'm somewhat struggling with the overall logic of that function. If we're keeping track of what PEPs are already shown in the channel, why do we need any date validation?
It shouldn't make a big difference in production, although in dev it prevents you being sent loads of posts when you first start up the bot. The feed only contains the past 10 PEPs so it would be fine without the validation, although a generous time check would also be fine imo.
It also doesn't seem like there's an exit condition in the loop. Are we just going over the entire feed every time?
Activity
mbaruh commentedon Apr 11, 2023
I'm somewhat struggling with the overall logic of that function. If we're keeping track of what PEPs are already shown in the channel, why do we need any date validation?
It also doesn't seem like there's an exit condition in the loop. Are we just going over the entire feed every time?
wookie184 commentedon Apr 12, 2023
It shouldn't make a big difference in production, although in dev it prevents you being sent loads of posts when you first start up the bot. The feed only contains the past 10 PEPs so it would be fine without the validation, although a generous time check would also be fine imo.
Yeah