[issue14113] Failure in test_strptime on Windows

2012-02-28 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
status: open -> closed

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3ea8d0afe541 by Nadeem Vawda in branch '2.7':
Give better failure messages in test_strptime (cf. issue #14113).
http://hg.python.org/cpython/rev/3ea8d0afe541

New changeset 8d2ffe1f25d3 by Nadeem Vawda in branch '3.2':
Give better failure messages in test_strptime (cf. issue #14113).
http://hg.python.org/cpython/rev/8d2ffe1f25d3

New changeset 46ab2d46337c by Nadeem Vawda in branch 'default':
Merge: Give better failure messages in test_strptime (cf. issue #14113).
http://hg.python.org/cpython/rev/46ab2d46337c

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-27 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> Perhaps the assertEqual changes should be backported to 3.2 and 2.7
> to keep the files in sync (leaving the issue open for that).

Agreed. I'll also make similar changes to the other test cases; my
initial changes only touched the tests that were failing.

--
assignee:  -> nadeem.vawda

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-27 Thread Stefan Krah

Stefan Krah  added the comment:

I've created #14142 for the getlocale(LC_ALL) situation. The main issue
is fixed, Nadeem's changes result in better error messages, so I think we
can close this.

Perhaps the assertEqual changes should be backported to 3.2 and 2.7
to keep the files in sync (leaving the issue open for that).

--
resolution:  -> fixed
stage: commit review -> committed/rejected

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1ea466240792 by Stefan Krah in branch 'default':
Issue #14113: Fix a test_strptime failure caused by changes to LC_ALL.
http://hg.python.org/cpython/rev/1ea466240792

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-27 Thread Stefan Krah

Stefan Krah  added the comment:

> ... it seems that getlocale() doesn't accept LC_ALL as its argument:

The current situation is not ideal. getlocale() is documented to fail
("category may be one of the LC_* values except LC_ALL"), but it only
fails if there's a semicolon in the locale name:

if category == LC_ALL and ';' in localename:
raise TypeError('category LC_ALL is not supported')


I'd prefer that getlocale(LC_ALL) fails consistently on all systems.

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> Python provides locale.getlocale().

That was my initial thought too, but it seems that getlocale() doesn't
accept LC_ALL as its argument:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.3/locale.py", line 523, in getlocale
raise TypeError('category LC_ALL is not supported')
TypeError: category LC_ALL is not supported

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Brett Cannon

Brett Cannon  added the comment:

Created issue14135 for having test.support check the locale to see if it has 
been changed.

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread STINNER Victor

STINNER Victor  added the comment:

>> Attached a fix that is tested on Windows.
>
> Patch looks good to me.

-oldloc = locale.setlocale(locale.LC_ALL, '')
+oldloc = locale.setlocale(locale.LC_ALL)

Python provides locale.getlocale().

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> Attached a fix that is tested on Windows.

Patch looks good to me.


> Does test.support track the locale for test mutations?

No, it doesn't.

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Brett Cannon

Brett Cannon  added the comment:

Does test.support track the locale for test mutations? If not we might want to 
add that check w/ all of the other interpreter state checks we have.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch works under Linux here.

--
nosy: +haypo, loewis, pitrou
stage: needs patch -> commit review

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Stefan Krah

Stefan Krah  added the comment:

Attached a fix that is tested on Windows.

--
keywords: +patch
Added file: http://bugs.python.org/file24649/issue14113.diff

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-26 Thread Stefan Krah

Stefan Krah  added the comment:

It looks like test_locale from test_format.py changes the locale on Windows:

>>> import time 
>>>  >>> magic_date = (1999, 3, 17, 22, 44, 55, 2, 76, 0)   
>>>   >>> time.strftime("%c", 
>>> magic_date)
'03/17/99 22:44:55'
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'cp1252') 
 >>> time.strftime("%c", magic_date)
  '03/17/99 22:44:55'
>>> oldloc = locale.setlocale(locale.LC_ALL, '')
>>> oldloc
'English_United States.1252'
>>> time.strftime("%c", magic_date) 
>>>  '3/17/1999 10:44:55 PM'
>>> locale.setlocale(locale.LC_ALL, oldloc)
'English_United States.1252'
>>> time.strftime("%c", magic_date) 
>>>  '3/17/1999 10:44:55 PM'

--
nosy: +skrah

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d5aa731bae5e by Nadeem Vawda in branch 'default':
Use assertEqual in test_strptime for better failure messages (cf. issue #14113).
http://hg.python.org/cpython/rev/d5aa731bae5e

--
nosy: +python-dev

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-25 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

Also failing on the Windows 7 bot:

http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/4453/steps/test/logs/stdio

--

___
Python tracker 

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



[issue14113] Failure in test_strptime on Windows

2012-02-24 Thread Nadeem Vawda

New submission from Nadeem Vawda :

Recent failures on one of the Windows XP buildbots:

http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/6049/steps/test/logs/stdio
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/6051/steps/test/logs/stdio

FAIL: test_date_time (test.test_strptime.LocaleTime_Tests)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_strptime.py",
 line 91, in test_date_time
"LC_date_time incorrect")
AssertionError: False is not true : LC_date_time incorrect

--
components: Tests, Windows
keywords: buildbot
messages: 154153
nosy: nadeem.vawda
priority: normal
severity: normal
stage: needs patch
status: open
title: Failure in test_strptime on Windows
type: behavior
versions: Python 3.3

___
Python tracker 

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