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.
The text was updated successfully, but these errors were encountered:
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?
Currently we only send new PEP updates to
#mailing-lists
if they were "created" on the same day that the bot is checking for them.bot/bot/exts/info/python_news.py
Lines 116 to 120 in ea0b227
This does not work in most cases, as when PEPs are created is not the same as when they are published.
https://peps.python.org/pep-0001/#pep-header-preamble
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.
The text was updated successfully, but these errors were encountered: