[issue10653] test_time test_strptime fails on windows

2021-03-08 Thread Eryk Sun
Eryk Sun added the comment: > Eryk Sun: This issue is now closed. If you want to enhance > the time module, please open a new issue. I was aware of that at the time, Victor. The problem can be worked on in a new issue, or in the older issue bpo-8304, which remains open. The two messages

[issue10653] test_time test_strptime fails on windows

2021-03-08 Thread STINNER Victor
STINNER Victor added the comment: Eryk Sun: This issue is now closed. If you want to enhance the time module, please open a new issue. -- ___ Python tracker ___

[issue10653] test_time test_strptime fails on windows

2021-03-07 Thread Eryk Sun
Eryk Sun added the comment: > decoding the output of strftime("%Z") with PyUnicode_DecodeLocaleAndSize() > works again since both agree on using the process active code page At least it works as much as it ever did. It depends on the process active code page being compatible with the

[issue10653] test_time test_strptime fails on windows

2021-03-07 Thread Eryk Sun
Eryk Sun added the comment: Update since msg243660: Python 3.8+ now calls setlocale(LC_CTYPE, "") at startup in Windows, as it has always done in POSIX, so decoding the output of strftime("%Z") with PyUnicode_DecodeLocaleAndSize() works again since both agree on using the process active

[issue10653] test_time test_strptime fails on windows

2019-05-06 Thread Jeremy Kloth
Change by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10653] test_time test_strptime fails on windows

2015-05-20 Thread eryksun
eryksun added the comment: This solution no longer works. If the system is configured to use the Japanese system locale and language pack, then 3.4.3 returns codepage 932 mojibake for the %Z time zone name. Originally [this approach worked][1] because it called PyUnicode_Decode using the

[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e3c13a1d2595 by Victor Stinner in branch 'default': Issue #10653: Fix time.strftime() on Windows, check for invalid format strings http://hg.python.org/cpython/rev/e3c13a1d2595 --

[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Crashes on the Windows buildbots: Oops, it should be fixed by my last commits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10653

[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10653 ___ ___

[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 977c5753ca32 by Victor Stinner in branch '3.2': Issue #10653: Fix time.strftime() on Windows, check for invalid format strings http://hg.python.org/cpython/rev/977c5753ca32 --

[issue10653] test_time test_strptime fails on windows

2011-10-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Crashes on the Windows buildbots: f:\dd\vctools\crt_bld\self_x86\crt\src\strftime.c(832) : Assertion failed: ( Invalid format directive , 0 ) f:\dd\vctools\crt_bld\self_x86\crt\src\strftime.c(484) : Assertion failed: FALSE -- assignee:

[issue10653] test_time test_strptime fails on windows

2011-10-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e3d9c5e690fc by Victor Stinner in branch '3.2': Issue #10653: On Windows, use strftime() instead of wcsftime() because http://hg.python.org/cpython/rev/e3d9c5e690fc New changeset 79e60977fc04 by Victor Stinner in

[issue10653] test_time test_strptime fails on windows

2011-10-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It's a bug in the Windows API: I used the workaround suggested by Hirokazu Yamamoto. Thanks Hirokazu! Python 2.7 doesn't use wcsftime() and so it is not affected by this issue. -- resolution: - fixed status: open - closed

[issue10653] test_time test_strptime fails on windows

2011-09-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #13029. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10653 ___

[issue10653] test_time test_strptime fails on windows

2010-12-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: 1. Decoding the output of wcsftime(). Python expects mbcs (which I believe is an UTF16-like wide char encoding) while Windows apparently puts cp932 there in your locale. I don't have expertise to address this issue. No, mbcs

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Following tests fails on official Python3.2 Windows binary. I cannot reproduce this on VC6. / C:\Python32.\python -m test.regrtest -v test_time test_strptime [1/2] test_time

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: I don't see this on a US/English version of Windows 7 with 3.2b1 installed. cp932 is the default on a Japanese version, correct? (I'm not very good with all of this encoding stuff so I don't know how much help I can be) -- nosy:

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10653 ___ ___

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I think this is locale problem. With C locale on windows, wcsftime doesn't return UTF16. (when non ascii characters are contained) It is just like char cbuf[] = ; /* contains non ascii chars in MBCS */ wchar_t

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I'll attach workaround. I used to confirm this works on VS8, but I don't have VS8 now. I hope this still works. -- keywords: +patch Added file: http://bugs.python.org/file19978/py3k_workaround_for_wcsftime.patch

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: ValueError: time data '2010 14 58 01 3 342 \x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)' does not match format '%Y %H %M %S %w %j %Z' This looks like valid cp932 data to me b'2010 14 58 01 3 342 \x93\x8c\x8b\x9e

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here you are. import time time.strftime('%Z') '\x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10653

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Dec 8, 2010 at 1:12 PM, Hirokazu Yamamoto rep...@bugs.python.org wrote: .. import time time.strftime('%Z') '\x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)' Thanks. Please bear with me for one more question: what is

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I got readable result. ;-) import time time.tzname ('東京 (標準時)', '東京 (標準時)') -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10653

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Dec 8, 2010 at 1:50 PM, Hirokazu Yamamoto rep...@bugs.python.org wrote: .. I got readable result. ;-) You mean readable to *you*. :-) import time time.tzname ('東京 (標準時)', '東京 (標準時)') This makes sense now.