[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Eryk Sun
Changes by Eryk Sun : -- components: +Installation -Build ___ Python tracker <http://bugs.python.org/issue28592> ___ ___ Python-bugs-list mailing list Unsub

[issue28631] [2.7/3.5/3.6 Regression] crash using ctypes

2016-11-07 Thread Eryk Sun
Eryk Sun added the comment: po_message_create() returns a po_message_t pointer: /* A po_message_t represents a message in a PO file. */ typedef struct po_message *po_message_t; /* Return a freshly constructed message. To finish initializing the message, you must set the

[issue28647] python --help: -u is misdocumented as binary mode

2016-11-09 Thread Eryk Sun
Eryk Sun added the comment: > It's not (currently) possible to have a fully unbuffered stdout. Why doesn't create_stdio also pass `write_through = Py_True` when Py_UnbufferedStdioFlag is set? This would immediately pass writes through to the FileIO object, even without contain

[issue28654] sys.stdout.isatty() returns True even if redirected to NUL

2016-11-10 Thread Eryk Sun
Eryk Sun added the comment: Windows doesn't have terminal devices, so the C runtime's isatty() function just checks for a character device, which includes NUL among others. This can lead to hanging the REPL, albeit with a contrived example such as redirecting stdin to COM3:

[issue28686] py.exe ignored PATH when using python3 shebang

2016-11-14 Thread Eryk Sun
Eryk Sun added the comment: Virtual commands that are parsed to start with "python" are restricted to the list of installed versions of Python -- unless the virtual command allows searching and the Python command has no version specification (e.g.`#! /usr/bin/env python`). &q

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Eryk Sun added the comment: The repr can't automatically dereference the string at the address because it may be an invalid pointer. ctypes was developed on Windows, for which, in Python 2, it (ab)uses the obsolete IsBadStringPtr[A|W] function [1]. This function should never be used

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Changes by Eryk Sun : -- keywords: +easy stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue28698> ___ ___ Python-bugs-list mailing list Un

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Eryk Sun added the comment: The issue tracker isn't a forum to answer general programming questions. Please ask this on python-list, and I'll try to help you there. -- ___ Python tracker <http://bugs.python.o

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Changes by Eryk Sun : -- Removed message: http://bugs.python.org/msg280878 ___ Python tracker <http://bugs.python.org/issue28698> ___ ___ Python-bugs-list mailin

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

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: Serhiy, single-byte codepages map every byte value, even if it's just to a Unicode C1 control code [1]. For example: import ctypes kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) MB_ERR_INVALID_CHARS = 0x0008 def

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

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: How about just the ASCII repr of the 256 decoded characters in CSV? I don't think the list of 2-tuple results is useful. For these single-byte codepages it's always 1 byte consumed. -- ___ Python trac

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

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: I don't think the 2nd tuple element is useful when decoding a single byte. It either works or it doesn't, such as failing for non-ASCII bytes with multibyte codepages such as 932 and 950. I'm attaching the output from the following, which you sh

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

2016-11-16 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file45510/codepage_table.csv ___ Python tracker <http://bugs.python.org/issue28712> ___ ___ Python-bugs-list m

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

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: I rewrote it using the csv module since I can't remember the escaping rules. -- Added file: http://bugs.python.org/file45511/codepage_table.csv ___ Python tracker <http://bugs.python.org/is

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

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: The ANSI and OEM codepages are conveniently supported on a Windows system as the encodings 'mbcs' and 'oem' (new in 3.6). The best-fit mapping is used by the 'replace' error handler (see the encode_code_page_flags function in Objec

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

2016-11-17 Thread Eryk Sun
Eryk Sun added the comment: Thanks, Serihy. When I looked at this previously, I mistakenly assumed that any undefined codes would be decoded using the codepage's default Unicode character. But for single-byte codepages in the range above 0x9F, Windows instead maps undefined codes t

[issue28732] spawnl crash on windows7

2016-11-18 Thread Eryk Sun
Eryk Sun added the comment: spawnl is implemented by calling _spawnv [1], which is documented to invoke the invalid parameter handler if argv points to a NULL pointer. It wants the program name, or whatever, as long as argv[0] isn't NULL or an empty string, e.g. `os.spawnl(os.P_NOWAI

[issue28732] spawnl crash on windows7

2016-11-19 Thread Eryk Sun
Eryk Sun added the comment: A ValueError should also be raised when argv[0] is an empty string. -- ___ Python tracker <http://bugs.python.org/issue28732> ___ ___

[issue28738] Document SIGBREAK as argument for signal() under Windows.

2016-11-21 Thread Eryk Sun
Changes by Eryk Sun : -- keywords: +easy priority: normal -> low stage: -> patch review versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/i

<    17   18   19   20   21   22