[issue12006] strptime should implement %G, %V and %u directives

2015-10-06 Thread Erik Cederstrand
Erik Cederstrand added the comment: I have reviewed the latest patch, and it looks good to me. There are tests for the tricky conversions around Jan 1, and the docs are brief and succinct. Until the full set of new c99 strftime directives are supported, I think it's overkill to include a

[issue12006] strptime should implement %G, %V and %u directives

2015-10-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've committed the latest patch. Thank you Ashley and Erik for your work and perseverance. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue12006] strptime should implement %G, %V and %u directives

2015-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset acdebfbfbdcf by Alexander Belopolsky in branch 'default': Closes issue #12006: Add ISO 8601 year, week, and day directives to strptime. https://hg.python.org/cpython/rev/acdebfbfbdcf -- nosy: +python-dev

[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My bad. In this case, maybe Erik can review your latest patch? -- ___ Python tracker ___

[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Also please let me know if this is not the proper way to respond to the code > review! I believe Rietveld gives you a "done" button on each reviewer comment. If all you do is to take the reviewer suggestion, you can just press it. Responding with an

[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Ashley Anderson
Changes by Ashley Anderson : Added file: http://bugs.python.org/file40660/issue12006_10_complete.patch ___ Python tracker ___

[issue12006] strptime should implement %G, %V and %u directives

2015-09-30 Thread Ashley Anderson
Ashley Anderson added the comment: Another *ping* for a patch review since it's been almost a month since the last one. -- ___ Python tracker ___

[issue12006] strptime should implement %G, %V and %u directives

2015-09-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ashley, You don't have to be a committer to review a patch. Given that it is unlikely that any of the committers is an expert on ISO calendar, an external review will be most welcome. Would you complete one? --

[issue12006] strptime should implement %G, %V and %u directives

2015-09-30 Thread Ashley Anderson
Ashley Anderson added the comment: Thanks Alexander, but I think the latest patch is still mine. It seems strange to review my own patch. I'll do it if that's common, but since this will (hopefully, eventually) be my first accepted patch I would appreciate the feedback from another reviewer.

[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Erik Cederstrand
Erik Cederstrand added the comment: The going's a bit tough here. I've spent at least 10 times as long on this bug than it took me to work around the fact that Python doesn't support ISO week number round-trip. Python puts a smile on my face every day and I enjoy giving back where I can. But

[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Ashley Anderson
Ashley Anderson added the comment: Haha, thanks Erik. It seems you know my tastes enough to not offer a chocolate-based reward. =) I was actually set to "ping" to request a patch review today, as it's been one month since my last submission. Please let me know if I need to update the patch

[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Berker Peksag
Changes by Berker Peksag : -- stage: needs patch -> patch review ___ Python tracker ___

[issue12006] strptime should implement %G, %V and %u directives

2015-08-02 Thread Ashley Anderson
Ashley Anderson added the comment: Thanks for the review and the good suggestions. Hopefully this new patch is an improvement. I didn't know about the context manager for assertRaises - I was just following the format for another ValueError test a few lines above. The frozenset and

[issue12006] strptime should implement %G, %V and %u directives

2015-07-31 Thread Ashley Anderson
Ashley Anderson added the comment: Here is an updated patch with implementation as outlined in msg247525. -- Added file: http://bugs.python.org/file40085/issue12006_7_complete.patch ___ Python tracker rep...@bugs.python.org

[issue12006] strptime should implement %G, %V and %u directives

2015-07-28 Thread Ashley Anderson
Ashley Anderson added the comment: Wow, I can't believe this issue is so old now! I'm motivated to finally come back and address the remaining issues to get this merged. Sorry for seemingly abandoning this; I'm embarrassed I didn't push to finish it earlier. It sounds like the consensus is to

[issue12006] strptime should implement %G, %V and %u directives

2015-07-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reverting to needs patch stage because there are still issues to be ironed out. -- stage: commit review - needs patch versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue12006] strptime should implement %G, %V and %u directives

2015-04-21 Thread Erik Cederstrand
Erik Cederstrand added the comment: I think POLA would be to raise ValueError on time.strptime('2015', '%G') and other situations that don't make sense or are ambiguous. That, or reproduce the bugs that the native OS strptime() implementation has. I got the %G, %V, and %u directives accepted

[issue12006] strptime should implement %G, %V and %u directives

2015-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Addressed Berker's comments. -- Added file: http://bugs.python.org/file38587/issue12006_6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___

[issue12006] strptime should implement %G, %V and %u directives

2015-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other issues. strptime with single %Y returns a date of the first day of the year. What should return single %G? time.strptime('2015', '%Y') time.struct_time(tm_year=2015, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1,

[issue12006] strptime should implement %G, %V and %u directives

2015-03-19 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___

[issue12006] strptime should implement %G, %V and %u directives

2015-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is synchronized with the tip, added the versionadded directives and whatsnews entry, addressed sasha's comment on Rietveld. Fixed a bug: %a and %A now are interchangeable with %u as well as with %w. I don't understand what more test are needed.

[issue12006] strptime should implement %G, %V and %u directives

2015-03-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It would be nice to get this in for 3.5. Does anyone have time/interest to address the last two comments? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006

[issue12006] strptime should implement %G, %V and %u directives

2014-09-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think we need more tests showing that new directives don't violate strftime - strptime round-trip invariants. -- title: strptime should implement %V or %u directive from libc - strptime should implement %G, %V and %u directives

[issue12006] strptime should implement %G, %V and %u directives

2014-09-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Documentation should say new in 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___