[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2019-01-24 Thread Andreas Schwab


Andreas Schwab  added the comment:

The test still fails if the timezone database is not available.

--
nosy: +schwab

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 doesn't seem to be affected:

$ TZ=UTC ./python -m test -v test_email
Tests result: SUCCESS

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset b59fc311609aadaafaae68240127b4997b85859d by Miss Islington (bot) 
in branch '3.6':
bpo-35317: Fix mktime() error in test_email (GH-10721)
https://github.com/python/cpython/commit/b59fc311609aadaafaae68240127b4997b85859d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset d669154ee52048f98ac63ba177f3fd1cf62f0174 by Miss Islington (bot) 
in branch '3.7':
bpo-35317: Fix mktime() error in test_email (GH-10721)
https://github.com/python/cpython/commit/d669154ee52048f98ac63ba177f3fd1cf62f0174


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9989

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9988

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cfaafda8e3e19764682abb4bd4c574accb784c42 by Victor Stinner in 
branch 'master':
bpo-35317: Fix mktime() error in test_email (GH-10721)
https://github.com/python/cpython/commit/cfaafda8e3e19764682abb4bd4c574accb784c42


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +9969
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, the tests fail since 2012 at least on FreeBSD:

https://bugs.python.org/issue15750#msg168741

"""
On the FreeBSD 8.2 build slave:

==
ERROR: test_localtime_daylight_false_dst_true (test_utils.LocaltimeTests)
--
Traceback (most recent call last):
  (...)
seconds = time.mktime(tm)
OverflowError: mktime argument out of range

==
ERROR: test_localtime_daylight_true_dst_true (test_utils.LocaltimeTests)
--
Traceback (most recent call last):
  (...)
seconds = time.mktime(tm)
OverflowError: mktime argument out of range
"""

bpo-15750 even contains a reproducer in C.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread STINNER Victor


STINNER Victor  added the comment:

I'm able to reproduce the issue on FreeBSD 12.0-RC2:

vstinner@freebsd$ TZ=CET ./python -m test test_email -m 
'test_localtime_daylight_*'  -v
(...)
Tests result: SUCCESS

vstinner@freebsd$ TZ=UTC ./python -m test test_email -m 
'test_localtime_daylight_*'  -v
(...)
==
ERROR: test_localtime_daylight_false_dst_true 
(test.test_email.test_utils.LocaltimeTests)
--
(...)
  File "/usr/home/vstinner/prog/python/master/Lib/email/utils.py", line 361, in 
localtime
seconds = time.mktime(tm)
OverflowError: mktime argument out of range

==
ERROR: test_localtime_daylight_true_dst_true 
(test.test_email.test_utils.LocaltimeTests)
--
(...)
  File "/usr/home/vstinner/prog/python/master/Lib/email/utils.py", line 361, in 
localtime
seconds = time.mktime(tm)
OverflowError: mktime argument out of range

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread STINNER Victor

STINNER Victor  added the comment:

Miro Hrončok:
> I found a C reproducer and reported to Fedora glibc tracker: 
> https://bugzilla.redhat.com/show_bug.cgi?id=1653340

Nice, I wrote almost the same one :-) See attached mktime_bug.c:

$ gcc mktime_bug.c -o mktime_bug
$ ./mktime_bug 
TZ=CET: mktime() -> 1331506860, errno=0
TZ=UTC: mktime() -> 1331514060, errno=0

$ ./mktime_bug
TZ=CET: mktime() -> 1331506860, errno=0
TZ=UTC: mktime() -> -1, errno=75

--
nosy:  -hroncok
Added file: https://bugs.python.org/file47947/mktime_bug.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread Miro Hrončok

Miro Hrončok  added the comment:

I found a C reproducer and reported to Fedora glibc tracker: 
https://bugzilla.redhat.com/show_bug.cgi?id=1653340

--
nosy: +hroncok

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I remember some related issues raised in the past about the same test failing 
on freebsd machines : issue31628 and issue15750 (some more detail on msg168747)

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread STINNER Victor


STINNER Victor  added the comment:

mktime_bug.py: script to reproduce the bug.

--
Added file: https://bugs.python.org/file47946/mktime_bug.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-26 Thread STINNER Victor


New submission from STINNER Victor :

The two following tests fail on glibc-2.28.9000-19.fc30.x86_64 on Fedora 
Rawhide depending on the timezone.

Australia/Lord_Howe: ok
EDT4: fail
EST+05EDT,M3.2.0,M11.1.0: ok
Europe/Kiev: ok
Europe/Minsk: ok
MSK-03: fail
MST+07MDT,M4.1.0,M10.5.0: ok
STD-1DST,M3.2.0,M11.1.0: ok
STD-1DST,M4.1.0,M10.1.0: ok
UTC: fail

 sh-4.4# TZ=UTC ./python -m test test_email -m 
'test_localtime_daylight_*'  -v
== CPython 3.7.1 (default, Nov 26 2018, 15:33:31) [GCC 8.2.1 20181105 (Red Hat 
8.2.1-5)]
== Linux-4.19.2-301.fc29.x86_64-x86_64-with-fedora-30-Rawhide little-endian
== cwd: /builddir/Python-3.7.1/build/test_python_9582
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.33 [1/1] test_email
test_localtime_daylight_false_dst_false 
(test.test_email.test_utils.LocaltimeTests) ... ok
test_localtime_daylight_false_dst_true 
(test.test_email.test_utils.LocaltimeTests) ... ERROR
test_localtime_daylight_true_dst_false 
(test.test_email.test_utils.LocaltimeTests) ... ok
test_localtime_daylight_true_dst_true 
(test.test_email.test_utils.LocaltimeTests) ... ERROR

==
ERROR: test_localtime_daylight_false_dst_true 
(test.test_email.test_utils.LocaltimeTests)
--
Traceback (most recent call last):
  File "/builddir/Python-3.7.1/Lib/test/test_email/test_utils.py", line 88, in 
test_localtime_daylight_false_dst_true
t1 = utils.localtime(t0, isdst=1)
  File "/builddir/Python-3.7.1/Lib/email/utils.py", line 361, in localtime
seconds = time.mktime(tm)
OverflowError: mktime argument out of range

==
ERROR: test_localtime_daylight_true_dst_true 
(test.test_email.test_utils.LocaltimeTests)
--
Traceback (most recent call last):
  File "/builddir/Python-3.7.1/Lib/test/test_email/test_utils.py", line 81, in 
test_localtime_daylight_true_dst_true
t1 = utils.localtime(t0, isdst=1)
  File "/builddir/Python-3.7.1/Lib/email/utils.py", line 361, in localtime
seconds = time.mktime(tm)
OverflowError: mktime argument out of range

--

Ran 4 tests in 0.007s

FAILED (errors=2)
test test_email failed
test_email failed

== Tests result: FAILURE ==

1 test failed:
test_email

Total duration: 259 ms
Tests result: FAILURE

 sh-4.4# rpm -q glibc
glibc-2.28.9000-19.fc30.x86_64
 sh-4.4# cat /etc/fedora-release 
Fedora release 30 (Rawhide)
 sh-4.4# date
lun. nov. 26 14:53:14 UTC 2018

--
components: Tests, email
messages: 330435
nosy: barry, r.david.murray, vstinner
priority: normal
severity: normal
status: open
title: test_email: test_localtime_daylight_false_dst_true() fails depending on 
the timezone
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com