Message249960
The tests from this patch fail on Linux.
-----
First: There is no trailing % test on Linux, and glibc's strftime() happily ignores a trailing %, so no ValueError is raised.
Python should do either one or the other of the following:
1) Python should enforce no trailing % in the strftime format string,
or
2) the test suite shouldn't assume that a trailing % in the strftime
value string raises a ValueError.
I can live with either of these, not sure what the right decision is.
-----
Second: The test from the patch assumes that strftime('%#') will raise a ValueError. Again, strftime in Linux glibc happily accepts "%#" as a format string and thus no ValueError is raised.
Python is agnostic about native format units in the strftime() format string. Therefore I strongly assert that Python must not assume that "%#" is an illegal format string. Therefore the tests must not assume that "%#" raises ValueError.
Given that the code used to crash, I do want the code path exercised in the test suite. So I propose that the test attempt time.strftime('%#') and accept either success or ValueError.
-----
Given that I've accepted this patch into 3.5.0, and it's now blocking my release, it is implicitly a "release blocker". I need to resolve this tonight before I can tag 3.5.0rc3. I'm going to dinner, and maybe we can have a quick discussion and come to a decision in the next hour or two.
p.s. The checkin also flunked PEP 7. *sigh* |
|
Date |
User |
Action |
Args |
2015-09-06 04:49:19 | larry | set | recipients:
+ larry, lemburg, paul.moore, belopolsky, vstinner, tim.golden, BreamoreBoy, python-dev, zach.ware, eryksun, steve.dower, JohnLeitch, brycedarling |
2015-09-06 04:49:19 | larry | set | messageid: <1441514959.16.0.423960429903.issue24917@psf.upfronthosting.co.za> |
2015-09-06 04:49:19 | larry | link | issue24917 messages |
2015-09-06 04:49:18 | larry | create | |
|