Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610628 - dev-lang/python:2.7 fails test_time:test_strptime tests with EET timezone
Summary: dev-lang/python:2.7 fails test_time:test_strptime tests with EET timezone
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://bugs.python.org/issue22067
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-23 02:08 UTC by Mart Raudsepp
Modified: 2017-03-23 15:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,232.91 KB, text/x-log)
2017-02-23 02:10 UTC, Mart Raudsepp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2017-02-23 02:08:36 UTC
======================================================================
FAIL: test_strptime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Lib/test/test_time.py", line 120, in test_strptime
    (format, strf_output))
AssertionError: conversion specifier '%Z' failed with 'MSK' input.

----------------------------------------------------------------------
Ran 15 tests in 1.213s

FAILED (failures=1)
test test_time failed -- Traceback (most recent call last):
  File "/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Lib/test/test_time.py", line 120, in test_strptime
    (format, strf_output))
AssertionError: conversion specifier '%Z' failed with 'MSK' input.

1 test failed again:
    test_time
make: *** [Makefile:917: test] Error 1
Comment 1 Mart Raudsepp gentoo-dev 2017-02-23 02:10:10 UTC
Created attachment 464764 [details]
build.log

# date
N veebr 23 04:09:36 EET 2017

Per upstream issue tracker, this happens with certain timezones only. Guess I need to wait for daylight savings time to possibly have tests succeed? :D
Comment 2 Mart Raudsepp gentoo-dev 2017-02-23 03:02:26 UTC
Tests succeed with TZ=UTC emerge -1 python:2.7

Though not sure what are the implications of the tests having failed, if a purely test issue or a real issue.
Comment 3 Mart Raudsepp gentoo-dev 2017-03-23 13:30:05 UTC
ping?
Comment 4 Mart Raudsepp gentoo-dev 2017-03-23 13:59:49 UTC
Just to be explicit - this is not needed for python3, only python2 is affected
Comment 5 Mike Gilbert gentoo-dev 2017-03-23 14:36:36 UTC
(In reply to Mart Raudsepp from comment #4)

Is there something being blocked by this? As far as I know, the issue has not yet been fixed upstream.

What's your rush?
Comment 6 Mart Raudsepp gentoo-dev 2017-03-23 15:01:53 UTC
My rush is that tests shouldn't be failing, or it is a candidate for dropping stable keywords. Either disable tests, skip the failing test if it's a false positive, or fix it via this TZ workaround. Is someone still fixing python2 tests when it works in python3? We talked about this in IRC over a month ago, and I was under the impression a TZ=UTC export will be added soon for python:2.7

It is not fun to do maintainer work with global FEATURES=test to have my own stuff not fail for the benefit of proper testing for architecture teams, only to have core packages fail with it.
Comment 7 Mike Gilbert gentoo-dev 2017-03-23 15:14:52 UTC
(In reply to Mart Raudsepp from comment #6)

I have no idea if this is a bug in python, or a bug in the test. I would like to actually understand the problem before I brush it under the rug.

Either way, it certainly does not warrant dropping stable keywords.
Comment 8 Mike Gilbert gentoo-dev 2017-03-23 15:25:31 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fb8cf8075a0a9dcc34c2515d22f0c2aa31bacef

commit 2fb8cf8075a0a9dcc34c2515d22f0c2aa31bacef
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Thu Mar 23 11:24:39 2017 -0400

    dev-lang/python: force TZ=UTC for tests in 2.7

    Bug: https://bugs.gentoo.org/610628
    Package-Manager: Portage-2.3.5_p2, Repoman-2.3.2_p32

 dev-lang/python/python-2.7.12.ebuild | 7 ++++++-
 dev-lang/python/python-2.7.13.ebuild | 5 +++++
 2 files changed, 11 insertions(+), 1 deletion(-)