Skip to content
Myr

Hopefully fixed release script date parsing thingy. This fixes #299

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 5b16532 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:scripts/make-release.py+3 added-2 removed
14 unmodified lines
15import re16from datetime import datetime, date17from subprocess import Popen, PIPE1819_date_clean_re = re.compile(r'(\d+)(st|nd|rd|th)')202122def parse_changelog():23 with open('CHANGES') as f:24 lineiter = iter(f)25 for line in lineiter:
27 unmodified lines
53 return '.'.join(map(str, parts))545556def parse_date(string):55 string = string.replace('th ', ' ').replace('nd ', ' ') \56 .replace('rd ', ' ').replace('st ', ' ')57 string = _date_clean_re.sub(r'\1', string)58 return datetime.strptime(string, '%B %d %Y')596061def set_filename_version(filename, version_number, pattern):
90 unmodified lines