Fix when release date is not today

Also, some fixes for PyFlakes

Original commit by @dongweiming at a05c4038706f3a95776adea376bc664c0714b426

See #842

I think the reason why nobody can reopen this PR is because his fork is gone.