[issue13643] 'ascii' is a bad filesystem default encoding

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Follow-up: the PEP 538 (bpo-28180) and PEP 540 (bpo-29240) have been accepted and implemented in Python 3.7! -- ___ Python tracker ___ __

[issue11574] TextIOWrapper: Unicode Fallback Encoding on Python 3.3

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Follow-up: the PEP 538 (bpo-28180) and PEP 540 (bpo-29240) have been accepted and implemented in Python 3.7! -- ___ Python tracker ___ __

[issue32331] Fix socket.type on Linux

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 9818142b1bd20243733a953fb8aa2c7be314c47c by Yury Selivanov in branch 'master': bpo-32331: Fix socket.type when SOCK_NONBLOCK is available (#4877) https://github.com/python/cpython/commit/9818142b1bd20243733a953fb8aa2c7be314c47c --

[issue32331] Fix socket.type on Linux

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: I've merged the PR. Summary of the final change: 1. socket.socket(family, type, proto) constructor clears SOCK_NONBLOCK and SOCK_CLOEXEC from 'type' before assigning it to 'sock.type'. 2. socket.socket(family, SOCK_STREAM | SOCK_NONBLOCK) will still create a

[issue32331] Fix socket.type on OSes with SOCK_NONBLOCK

2017-12-18 Thread Yury Selivanov
Change by Yury Selivanov : -- title: Fix socket.type on Linux -> Fix socket.type on OSes with SOCK_NONBLOCK ___ Python tracker ___ __

[issue32331] Fix socket.type on OSes with SOCK_NONBLOCK

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: > This is 3.7 only change. In this case, bpo-27456 should be reopened or a new issue should be opened to fix asyncio in Python 3.6, no? -- ___ Python tracker __

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-18 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4816 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32331] Fix socket.type on OSes with SOCK_NONBLOCK

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: > In this case, bpo-27456 should be reopened or a new issue should be opened to > fix asyncio in Python 3.6, no? I'll make a PR to fix it in 3.7. Code in 3.6 is good. -- ___ Python tracker

[issue27456] asyncio: set TCP_NODELAY flag by default

2017-12-18 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +4817 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32354] Unclear intention of deprecating Py_UNICODE_TOLOWER / Py_UNICODE_TOUPPER

2017-12-18 Thread Campbell Barton
Campbell Barton added the comment: Thanks for the info, in that case will there be a way to do this from the CPython API which can work with raw strings? (utf8, wchat_t or similar types), that doesn't require the GIL and alloc/free of PyObjects. -- ___

[issue32216] Document PEP 557 Data Classes

2017-12-18 Thread Christopher Barker
Christopher Barker added the comment: It was suggested that I could contirbute to the docs of dataclasses in this issue. Which confuses me, as there doesn't appear to be any content here to comment on. But what the heck: As I've been annoyingly persistent about on the python-dev list, I think

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: Actually, I don't think we need a deprecation period. Both methods are completely unusable now. Given: async def foo(): await asyncio.sleep(1) print('A') return 42 1. Let's try to use Task.set_result(): async def main(): f = asynci

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-18 Thread Camion
Camion added the comment: Well, David, I'm convinced this behavior is "logical" and is not some "logic" flaw. My question is more about the fact that it is desirable and was intentionally designed that way,or if on the contrary no one thought it might happen that way and it's not what was wis

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-18 Thread Camion
Camion added the comment: Oops, in my previous post please read : "but does it makes sense to have the presence of "global a" in g, block all possibility for h, to access it's grand parent's a ?" instead of "but is makes sense to [...] grand parent's a." -- ___

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-18 Thread Camion
Camion added the comment: thank You Serhiy for your C implementation. About this question of the dilemma around the meaning of "non iterable int" why not simply put the "non iterable" between parenthesis to avoid making it too verbose ? "cannot unpack (non-iterable) int object" or "cannot u

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: About the only use case I can come up with is subclassing asyncio.Task and overriding set_result and set_exception implementations. This use case has been broken (unintentionally) in Python 3.6, when we first implemented Task in _asynciomodule.c. C Task doe

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-18 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4818 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32370] Wrong ANSI encoding used by subprocess for some locales

2017-12-18 Thread Eryk Sun
Eryk Sun added the comment: ipconfig uses (or defaults to) OEM encoded output when writing to a pipe or file. On the other hand, Python's TextIOWrapper defaults to ANSI (i.e. 'mbcs'). In 3.6+, uuid._ipconfig_getnode could be rewritten to call subprocess.Popen with the new 'oem' encoding. In

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'int' is a standin for non-iterable and easy to type. -- ___ Python tracker ___ ___ Python-bugs-li

[issue31094] asyncio: get list of connected clients

2017-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: This tracker is not the best place for questions about development *with* Python -- it is for questions for development *of* Python itself. Please use resources like StackOverflow next time. `asyncio.Server.sockets` is a list of connected socket objects -- but

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-18 Thread Steve Dower
Steve Dower added the comment: > A compromise would be to refuse to start on "python3 -I directory" to remain > secure What would that achieve, considering that "python3 -I directory/__main__.py" would let you start with exactly the same sys.path?[*] The only change that might be of any valu

[issue19100] Use backslashreplace in pprint

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Try with LANG=en_US. And even UTF-8 can fail. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32284] typing.TextIO and BinaryIO are not aliases of IO[...]

2017-12-18 Thread Ned Deily
Ned Deily added the comment: New changeset 898a3e4901b3b6de9b540e18faa457a6ac3e49bb by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-32284: Fix documentation of BinaryIO and TextIO (GH-4832) (#4833) https://github.com/python/cpython/commit/898a3e4901b3b6de9b540e18faa457a6ac3e49bb ---

<    1   2