[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: The output is already attached as win10_14959_py36.txt. PS: after playing with ctypes, I got a version of pycp that works with Py < 3.3 too (attached with comment). -- Added file: http://bugs.python.org/file45503/pycp_ctypes

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Changes by Mingye Wang : Removed file: http://bugs.python.org/file45502/pycp.py ___ Python tracker <http://bugs.python.org/issue28712> ___ ___ Python-bugs-list mailin

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: Yes, it's a table issue. My suggested fix is to replace them all with WindowsBestFit tables, where MS currently redirects https://msdn.microsoft.com/en-us/globalization/mt767590 visitors to. These old "WINDOWS" tables appear abandoned

[issue28693] No HKSCS support in Windows cp950

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: Update: the test script at issue28712 can be modified to show this issue too. -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <http://bugs.python.org/issue28

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-11-16 Thread Mingye Wang
Changes by Mingye Wang : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <http://bugs.python.org/issue28

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: Update: the test script at issue28712 can be modified to show this issue too. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: ... On the other hand, I am happy to use these Win32 functions if they are faster, but still the table should be made correct in the first place. (See also issue28343 (936) and issue28693 (950) for problems with DBCS Chinese code pages

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: > Codecs are strict by default in Python. Call MultiByteToWideChar() with the > MB_ERR_INVALID_CHARS flag as Python does. Great catch. Without MB_ERR_INVALID_CHARS or WC_NO_BEST_FIT_CHARS Windows would perform the "best fit" behavior describe

[issue21692] Wrong order of expected/actual for assert_called_once_with

2014-06-08 Thread Fei Long Wang
New submission from Fei Long Wang: >>> m=mock.Mock() >>> m.some_method('foo', 'bar') >>> m.some_method.assert_called_once_with('foo', 'bar') >>> m.some_method.assert_called_once_with('foo', 'baz')

[issue21692] Wrong order of expected/actual for assert_called_once_with

2014-06-08 Thread Fei Long Wang
Fei Long Wang added the comment: IMHO, the trace should be: AssertionError: Expected call: some_method('foo', 'bar') Actual call: some_method('foo', 'baz') instead of below: AssertionError: Expected call: some_method('foo

[issue21692] Wrong order of expected/actual for assert_called_once_with

2014-06-09 Thread Fei Long Wang
Fei Long Wang added the comment: Okay, I can see your point now. Thanks for the clarification. -- ___ Python tracker <http://bugs.python.org/issue21692> ___ ___

[issue7128] cPickle looking for non-existent package copyreg

2009-10-14 Thread Joseph C Wang
New submission from Joseph C Wang : When running cPickle in restricted mode, the module tries to import copyreg which does not appear to exist anywhere. The problem is in cPickle.c 2980 if (PyEval_GetRestricted()) { 2981 /* Restricted execution, get private tables */ 2982

[issue28798] Describe character as a string of length one instead of size one in tutorial

2016-11-24 Thread Liang-Bo Wang
New submission from Liang-Bo Wang: In Tutorial "An Informal Introduction" section, character is introduced as a string of size one. It may be true for python 2.x, where str can be interpreted as bytes. However in Python 3, strings are unicode thus the size and the length of a

[issue26246] Code output toggle button uses removed jQuery method

2016-01-31 Thread Liang Bo Wang
New submission from Liang Bo Wang: The code output toggle button (the `>>>` button on the top right) has been disappeared and not functional on the current online documentation (both 3.4+ and 2.7). For example, see any doc page that has interpreter outputs: https://docs.pyt

[issue26246] Code output toggle button uses removed jQuery method

2016-02-26 Thread Liang-Bo Wang
Liang-Bo Wang added the comment: Just FYI, I applied the patch to the zh-hant translation of the documentation and the code output toggle button is back and works as expected. https://docs.python.org.tw/3/tutorial/introduction.html#numbers You can see the result of any other page by

[issue26246] Code output toggle button uses removed jQuery method

2016-02-26 Thread Liang-Bo Wang
Liang-Bo Wang added the comment: Thanks for the merge. I pulled the change and checked the result, but I found the patch missing a line to initiate the correct display state when the button was created. That is, it forgot to set `button.data('hidden', 'false');` wh

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-10-02 Thread Mingye Wang (Arthur2e5)
New submission from Mingye Wang (Arthur2e5): Microsoft's cp936 defines a euro sign at 0x80, but Python would kick the bucket when asked to do something like `u'\u20ac'.encode('cp936')`. This may break things for zh-hans-cn windows users who wants to put a euro sign in

<    1   2   3