[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-20 Thread Charlie Clark
Charlie Clark added the comment: I can confirm that using "de-DE" does indeed avoid the crash. -- ___ Python tracker <https://bugs.python.o

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-07 Thread Charlie Clark
Charlie Clark added the comment: This is the result \issue36792>test.exe The current locale is now: C The time zone is: 'Mitteleuropõische Sommerzeit' (28 characters) The updated locale is now: de_DE The time zone is: '' (-1 characters) NB something is wr

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-07 Thread Charlie Clark
Charlie Clark added the comment: And this is the result. old locale: C count: 28 value: Mitteleuropäische Sommerzeit new locale: de_DE count: -1 value: Windows fatal exception: code 0xc374 Looks like print('new locale:', crt_locale._wsetlocale(0, 'de_DE')) print('count

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-07 Thread Charlie Clark
Charlie Clark added the comment: print('count:', crt_time.wcsftime(wbuf, 1024, '%Z', tm)) also fails but crt_convert = ctypes.CDLL('api-ms-win-crt-convert-l1-1-0', use_errno=True) print('count:', crt_convert.mbstowcs(wbuf, buf, 1024)) seems to work okay

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-07 Thread Charlie Clark
Charlie Clark added the comment: If the process crashes at the first print statement, I'm not sure how I can run the tests. Or should I try them separately? -- ___ Python tracker <https://bugs.python.org/issue36

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-07 Thread Charlie Clark
Charlie Clark added the comment: The code crashes on this line: print('count:', crt_time.strftime(buf, 1024, b'%Z', tm)) -- Added file: https://bugs.python.org/file48306/Report.wer ___ Python tracker <https://bugs.python.org/issue36

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-07 Thread Charlie Clark
Change by Charlie Clark : Added file: https://bugs.python.org/file48307/WER9DB9.tmp.WERInternalMetadata.xml ___ Python tracker <https://bugs.python.org/issue36

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-06 Thread Charlie Clark
Charlie Clark added the comment: import ctypes, struct libc = ctypes.cdll.msvcrt buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', libc.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) wbuf = ctypes.create_unicode_buffer

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-06 Thread Charlie Clark
Charlie Clark added the comment: import ctypes, struct libc = ctypes.cdll.msvcrt buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', libc.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) count: 28 value: b'Mitteleurop

[issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set

2019-05-06 Thread Charlie Clark
Charlie Clark added the comment: import time, locale locale.setlocale(locale.LC_ALL, 'de_DE') 'de_DE' time.strftime("%Z") aborted (disconnected) -- ___ Python tracker <https://bugs.python.o

[issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set

2019-05-06 Thread Charlie Clark
Charlie Clark added the comment: I can confirm the error is caused by time.localtime(time.time()) as indicated by the related bug. I've also found the crash log. It's in C:\ProgramData\Microsoft\Windows\WER\ReportQueue on my machine. Well, at least that's all I can find. -- Added

[issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set

2019-05-05 Thread Charlie Clark
Charlie Clark added the comment: winver tells me I have 1809. I'm only using Windows in a VM so I'm not that familiar with its innards. Also get the error with WinPython 3.6: Windows fatal exception: code 0xc374 Current thread 0x10c0 (most recent call first): File "C:\

[issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set

2019-05-05 Thread Charlie Clark
Charlie Clark added the comment: That's what we thought when we looked at it, but as I said, I couldn't reproduce it with just the `time` call or the `ZInfo` instantiation, so something odd is happening. I do have a German version of Windows as I suspect the original reporter does. You'd

[issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set

2019-05-05 Thread Charlie Clark
Charlie Clark added the comment: Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 -- ___ Python tracker <https://bugs.python.org/issue36

[issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set

2019-05-04 Thread Charlie Clark
New submission from Charlie Clark : Based on a bug report (https://bitbucket.org/openpyxl/openpyxl/issues/1266/locale) from a user of the openpyxl library I've identified a bug in the zipfile module that causes the Python process to crash on Windows. Currently tested with Python 3.7.3 (32

[issue15460] SQLite cursor.description is not DB-API compatible

2012-07-26 Thread Charlie Clark
New submission from Charlie Clark charlie.cl...@clark-consulting.eu: It says in the docs: This read-only attribute provides the column names of the last query. To remain compatible with the Python DB API, it returns a 7-tuple for each column where the last six items of each tuple are None