[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-22 Thread Steve Dower
Changes by Steve Dower : -- assignee: -> steve.dower ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-22 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-22 Thread Steve Dower
Steve Dower added the comment: Arguably it's because of the platforms that don't reliably set errno. (I don't know exactly which those are, but I'm not about to enable it everywhere right now. If someone else wants to do it and deal with the fallout they're welcome.) --

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa6b9205c120 by Steve Dower in branch '3.5': Issue #25092: Fix datetime.strftime() failure when errno was already set to EINVAL. https://hg.python.org/cpython/rev/aa6b9205c120 -- nosy: +python-dev ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-20 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-20 Thread Zachary Ware
Changes by Zachary Ware : -- keywords: +3.5regression ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-15 Thread STINNER Victor
STINNER Victor added the comment: > We don't check errno on any other platform. Oh ok. The code becomes more and more verbose because of Windows :-( -- ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: Maybe errno needs to be explicitly cleared before calling strftime or else we're seeing someone else's EINVAL? -- ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: (In the C code I mean, not in the test.) -- ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread eryksun
eryksun added the comment: > errno should always be cleared before use (in C99 at least, > not sure what the crt does). The CRT's strftime doesn't clear errno. I suggested clearing it in issue 25029, msg250215. -- nosy: +eryksun ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah
Stefan Krah added the comment: Yes, errno should always be cleared before use (in C99 at least, not sure what the crt does). -- nosy: +skrah ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah
Stefan Krah added the comment: Clearing is easy: errno = 0; :) C library functions are not supposed to set errno to 0 by themselves (C99: paragraph 7.5). -- ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: I guess when I said I'd done "exactly" what you suggested I misread that part... whoops. This is a pretty nasty bug to workaround... do we have any way for a user to clear errno from their own code? -- ___ Python

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread R. David Murray
R. David Murray added the comment: Given all the changes in the windows support in 3.5, I will not be at all surprised if we need to spin 3.5.1 much more quickly than we normally would in any case. -- nosy: +r.david.murray ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor
STINNER Victor added the comment: It's common in Modules/posixmodule.c to set errno to 0 before calling a C function, especially when "errno != 0" is checked after the call (because it's the only way to check if the function failed?). -- ___ Python

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: I get that part. Is there a way people can set errno to zero from Python code? Or do we need to ship 3.5.1 already? -- ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah
Stefan Krah added the comment: Steve, sorry if I misunderstand you: My point (and eryksun's) was that errno is currently not cleared before the call to format_time() in Modules/timemodule.c:657 I didn't look at this issue in depth, just pointing out a possible cause. --

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: Patch attached. I haven't been able to repro the issue locally without the fix, but it seems indisputably correct behavior. We could also skip most of the function for an empty format string and save ourselves a lot of work. That would avoid the ambiguous

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: (The fix is indisputably correct, is what I meant.) -- ___ Python tracker ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower
Steve Dower added the comment: We don't check errno on any other platform. -- ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor
STINNER Victor added the comment: +#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) +errno = 0; +#endif This code is too complex. Please remove the #if and always set errno to 0, on any platform! -- ___ Python

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread Terry J. Reedy
New submission from Terry J. Reedy: PS C:\Users\Terry> py -3 -m test test_datetime [1/1] test_datetime test test_datetime failed -- Traceback (most recent call last): File "C:\Programs\Python 3.5\lib\test\datetimetester.py", line 1154, in test_strftime self.assertEqual(t.strftime(""), "")

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.5 ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks like something related to issue 24917. -- nosy: +JohnLeitch, steve.dower ___ Python tracker ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread John Leitch
Changes by John Leitch : -- nosy: +brycedarling ___ Python tracker ___ ___

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread Zachary Ware
Zachary Ware added the comment: I can reproduce. I'm bewildered as to why none of the buildbots are complaining about this. -- nosy: +zach.ware ___ Python tracker

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread Zachary Ware
Zachary Ware added the comment: Interestingly, the re-run performed by regrtest's '-w' flag did not fail. -- ___ Python tracker ___