[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1869118 - /subversion/trunk/tools/dist/release.py

From: Julian Foad <julianfoad_at_apache.org>
Date: Tue, 29 Oct 2019 20:54:40 +0000

Daniel Shahaf wrote:
> You don't do any input validation on the date in argv anywhere, so

Right. I'm not wanting to spend much time on niceties as I want to
change a lot of this to read data from somewhere else, but then it still
might want validating at this level.

[...]
> release_date = time.strptime(args.news_release_date, "YYYY-mm-dd") if args.news_release_date else datetime.date.today()
> … { 'date': release_date.strftime("YYYYmmdd"),
> 'date_pres': release_date.strftime(…) }

Sounds good. Format strings would be %Y-%m-%d etc.

At a quick try I couldn't get either "time.strptime" nor
"datetime.strptime" to work. The latter says "AttributeError: 'module'
object has no attribute 'strptime'"... which puzzles me as the docs say
it's been available since Python 2.5. I didn't bother to pursue doing
it using the "time" module though there was nothing stopping me.

Please just do whatever fixes it if you like, else maybe I'll have
another go later but not urgently.

- Julian
Received on 2019-10-29 21:54:44 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.