Issue 5643: test__locale fails with RADIXCHAR on Windows (original) (raw)

Issue5643

Created on 2009-04-01 11:49 by kristjan.jonsson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_locale_test_on_windows.patch ocean-city,2009-05-05 00:52
py3k_locale_test_on_windows.patch ocean-city,2009-05-05 16:47 v2 (against HEAD)
Messages (9)
msg84997 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2009-04-01 11:49
Windows, Vista: regrtest.py --verbose test__locale fails with: File "..\lib\test\regrtest.py", line 612, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "D:\pydev\python\branches\py3k\lib\test\test__locale.py", line 2, in from _locale import (setlocale, LC_ALL, LC_CTYPE, LC_NUMERIC, RADIXCHAR, THOUSEP, nl_langinfo, ImportError: cannot import name RADIXCHAR 1 test failed: test__locale
msg85279 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-04-02 23:20
This is now failing because an ImportError in a test doesn't cause the test to be skipped like previously. Someone will have to figure out what part of test__locale are applicable to Windows.
msg85302 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2009-04-03 09:32
Is it hard to support things like RADIXCHAR? IIUC it is available as part of the lconv structure returned by localeconv().
msg87198 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-05-05 00:52
Probably this patch works on recent VisualC++. But unfortunately, this code crashes on VisualC++6 debug build. :-( This happens when 2nd arg of setlocale contains "." and the length of substring after "." is longer than 8. It seems to be msvcrtd bug.
msg87241 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2009-05-05 11:20
What is the test trying to do when it crashes? Rather than patch the C impolementation for a broken VC6 implementation (unsupported), maybe we can adjust the test instead? It sounds like it is trying to set some very strange string.
msg87247 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-05-05 16:17
Crashes at Lib/test/test__locale.py(107) test_float_parsing. >>> from _locale import setlocale, LC_NUMERIC >>> setlocale(LC_NUMERIC, 'es_ES.ISO8859-1') (crash) Yes, I agree that workaround should be placed in test rather than _locale module. I'll create such patch as short as possible.
msg87251 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-05-05 16:47
Revised patch against HEAD. (With VC6 workaround)
msg87279 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-05 20:28
I think the patch is good to go.
msg87297 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-05 22:49
Applied in r72365.
History
Date User Action Args
2022-04-11 14:56:47 admin set github: 49893
2009-05-05 22:49:57 benjamin.peterson set status: open -> closedresolution: fixedmessages: +
2009-05-05 20:28:07 benjamin.peterson set messages: +
2009-05-05 16:47:49 ocean-city set files: + py3k_locale_test_on_windows.patchmessages: +
2009-05-05 16:17:36 ocean-city set messages: +
2009-05-05 11:20:05 kristjan.jonsson set messages: +
2009-05-05 00:52:02 ocean-city set files: + py3k_locale_test_on_windows.patchnosy: + ocean-citymessages: + keywords: + patch
2009-04-03 09:32:21 kristjan.jonsson set messages: +
2009-04-02 23:20:25 benjamin.peterson set priority: highnosy: + benjamin.petersonmessages: +
2009-04-01 11:49:09 kristjan.jonsson create