[issue32349] Add detailed return value information for set.intersection function

2017-12-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: The implementation detail is not documented because it is not guaranteed. The behavior has changed over time and other implementation are allowed to do something different. For example, collections.abc.Set.__and__ has

[issue32338] Save OrderedDict import in re

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: > del d[next(iter(d))] is not O(1) on current dict implementation. We are talking about a dictionary of 512 items in the worst case. On such very tiny collection, benchmarking matters more than O(...) complexity ;-) -- nosy:

[issue32338] Save OrderedDict import in re

2017-12-18 Thread INADA Naoki
INADA Naoki added the comment: Hmm, 0.3 μs for each lookup may be negligible compared to re.compile() speed? -- ___ Python tracker

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Copy of my comment on the PR. https://github.com/python/cpython/pull/1218#issuecomment-352372211 > Merged from master... Again... Hopefully this won't end up missing 3.7 > entirely...  Oops sorry, I wanted this feature but I

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Oops, I merged the pull requests, but I forgot to close the issue. -- ___ Python tracker

[issue32359] Add getters for all SSLContext internal configuration

2017-12-18 Thread Nathaniel Smith
New submission from Nathaniel Smith : Suppose you're writing a library that allows users to make or accept SSL/TLS connections. You use the 'ssl' module, because that's convenient. You need to let your users configure your SSL/TLS connections, and there really isn't any

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-18 Thread INADA Naoki
Change by INADA Naoki : -- nosy: inada.naoki priority: normal severity: normal status: open title: Save OrderedDict imports in various stdlibs. ___ Python tracker

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Dict order is now guaranteed, so add tests and doc for it ___ Python tracker

[issue32359] Add getters for all SSLContext internal configuration

2017-12-18 Thread Christian Heimes
Christian Heimes added the comment: I opened an issue about missing getters for ALPN protos in OpenSSL 1.1: https://github.com/openssl/openssl/issues/4952 -- ___ Python tracker

[issue32354] Unclear intention of deprecating Py_UNICODE_TOLOWER / Py_UNICODE_TOUPPER

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Py_UNICODE_TOLOWER / Py_UNICODE_TOUPPER *API* doesn't respect the latest Unicode standard. For example, it doesn't support this operation: >>> "ß".upper() 'SS' -- ___ Python tracker

[issue32338] Save OrderedDict import in re

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is surprising. But OrderedDict also can be O(N) here. Do you have benchmarking results Inada? -- ___ Python tracker

[issue32338] Save OrderedDict import in re

2017-12-18 Thread INADA Naoki
INADA Naoki added the comment: > This is surprising. But OrderedDict also can be O(N) here. Current dict implementation doesn't skip empty entries. So next(iter(D)) takes time. On the other hand, OrderedDict uses doubly-linked list to find first entry. (I fixed it in

[issue32359] Add getters for all SSLContext internal configuration

2017-12-18 Thread Christian Heimes
Christian Heimes added the comment: I'm considering to add CAPI capsule to the _ssl module. It would allow third parties to get hold of the internal SSL* and SSL_CTX* pointers. -- ___ Python tracker

[issue32349] Add detailed return value information for set.intersection function

2017-12-18 Thread 양유석
양유석 added the comment: Ok, I got a point of implementation-dependent things. Thank you for comments. -- ___ Python tracker ___

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset b2a6083eb0384f38839d3f1ed32262a3852026fa by Victor Stinner (Segev Finer) in branch 'master': bpo-19764: Implemented support for subprocess.Popen(close_fds=True) on Windows (#1218)

[issue32338] Save OrderedDict import in re

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Dict order is now guaranteed, so add tests and doc for it ___ Python tracker

[issue32336] Save OrderedDict import in argparse

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Dict order is now guaranteed, so add tests and doc for it ___ Python tracker

[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2017-12-18 Thread Mark
New submission from Mark : https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Connection purports to document the multiprocessing.Connection class. There's no such thing: Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple

[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2017-12-18 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32338] Save OrderedDict import in re

2017-12-18 Thread INADA Naoki
INADA Naoki added the comment: > We are talking about a dictionary of 512 items in the worst case. On such > very tiny collection, benchmarking matters more than O(...) complexity ;-) You're right. Rob Pike said: "Fancy algorithms are slow when n is small, and n is

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Thank you Sergev Finer for finishing the implementation of my PEP 446. Supporting to only inherit a set of Windows handles was a "small note" my PEP 446, mostly because I didn't feel able to implement the feature, but also because

[issue32338] Save OrderedDict import in re

2017-12-18 Thread INADA Naoki
INADA Naoki added the comment: * del cache[next(iter(cache))] happens only when sre.compile() is called. * del cache[next(iter(cache))] is much faster than sre.compile(). OK, performance difference is negligible, surely. --

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) dependencies: +Save OrderedDict import in argparse, Save OrderedDict import in re type: -> performance versions: +Python 3.7 ___ Python tracker

[issue32359] Add getters for all SSLContext internal configuration

2017-12-18 Thread Christian Heimes
Christian Heimes added the comment: Let's see what's missing: * alpn_protocols -- OpenSSL doesn't have SSL_CTX_get_alpn_protos(), so we'd have to keep the list around ourselves. * npn_protocols -- deprecated, I'd rather add a getter * servername_callback -- simply expose the

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-18 Thread INADA Naoki
New submission from INADA Naoki : csv and re has issues already. There are some remaining OrderdDict, including docstring. It looks like some of them can be removed easily without doc update. This is `ag --exclude-dir=test OrderedDict`, exluding csv, re, pprint and

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

2017-12-18 Thread Camion
New submission from Camion : Hello, "PEP 3104 -- Access to Names in Outer Scopes" introduced the keywords "global" and "nonlocal". but didn't make clear (to me) if this behaviour is a bug, an intentional feature, or a design hole which might be considered good

[issue32359] Add getters for all SSLContext internal configuration

2017-12-18 Thread Nathaniel Smith
Nathaniel Smith added the comment: I think we already hold onto the ALPN list internally. A possibly stickier issue is retrieving certificates, keys, trust db configuration. -- ___ Python tracker

[issue32365] Reference leak: test_ast test_builtin test_compile

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4810 stage: -> patch review ___ Python tracker ___

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4811 ___ Python tracker ___ ___

[issue32359] Add getters for all SSLContext internal configuration

2017-12-18 Thread Christian Heimes
Christian Heimes added the comment: For certs and keys I have some plans. You might not be able to get hold of the actual private key bits, but it is always possible to get the public bits and key information. The trust store information is pretty much opaque and often

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bd6ec4d79e8575df3d08f8a89ba721930032714c by Serhiy Storchaka in branch 'master': bpo-32365: Fix a reference leak when compile __debug__. (#4916)

[issue32365] Reference leak: test_ast test_builtin test_compile

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bd6ec4d79e8575df3d08f8a89ba721930032714c by Serhiy Storchaka in branch 'master': bpo-32365: Fix a reference leak when compile __debug__. (#4916)

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-18 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4813 ___ Python tracker ___

[issue32365] Reference leak: test_ast test_builtin test_compile

2017-12-18 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4812 ___ Python tracker ___

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

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I would add 'non-iterable', to get "cannot unpack non-iterable int object", > to tell people what is needed instead. Doesn't this imply that there are iterable int objects which can be unpacked? --

[issue32234] Add context management to mailbox.Mailbox

2017-12-18 Thread sblondon
sblondon added the comment: If the access is read-only, the lock is not required [1]. However, I agree it does not worth to be more complex (changing the signature of the subclass or adding another context manager for the lock). I updated the patch and documentation

[issue31900] localeconv() should decode numeric fields from LC_NUMERIC encoding, not from LC_CTYPE encoding

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Oh. Another Python function is impacted by the bug, str.format: $ env -i python3 -c 'import locale; locale.setlocale(locale.LC_ALL, "fr_FR"); locale.setlocale(locale.LC_NUMERIC, "es_MX.utf8"); print(ascii(f"{1000:n}"))'

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-18 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4814 ___ Python tracker ___ ___

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I had similar thoughts when I was fixing tests that broke due to ValueError. I've updated the PR to issue a RuntimeWarning instead. -- ___ Python tracker

[issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings

2017-12-18 Thread STINNER Victor
Change by STINNER Victor : -- title: CVE-2017-17522: webbrowser.py in Python does not validate strings -> [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings ___ Python tracker

[issue32368] Segfault when compiling many conditional expressions

2017-12-18 Thread Stefan Nordhausen
New submission from Stefan Nordhausen : The following code reproducibly segfaults in version 2.7.13, 3.6.3 and the current git master (3.7.0a3+): code = "42 if True else 43\n" * 20 compile(code, "foobar", "exec") This issue was originally found because

[issue32368] Segfault when compiling many conditional expressions

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Duplicate of issue31113? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue19846] Python 3 raises Unicode errors with the C locale

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

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: > I don't think that we can fix this bug, sadly. But I'm happy to see that the > PEP 538 and PEP 540 are already useful! Oops, I mean "we cannot *close* this bug" (right now). Sorry. I mean that IMHO we still have to fix the bug.

[issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings

2017-12-18 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___

[issue32276] there is no way to make tempfile reproducible (i.e. seed the used RNG)

2017-12-18 Thread R. David Murray
R. David Murray added the comment: IMO it is better to have an API that can be used when, for example, writing tests, than to monkey patch. On the other hand, I've never had an occasion when I cared about the names of tempfiles (or directories) in my test code, and it

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-18 Thread Paul Ganssle
Paul Ganssle added the comment: > Not if the time is associated with a particular day. Imagine implementing > datetime.fromisoformat by separately calling date.fromisoformat and > time.fromisoformat. The date will be off by one day if you naively rounded > 2017-12-18

[issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Red Hat: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-17522 Ubuntu: https://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-17522.html SUSE: https://bugzilla.novell.com/show_bug.cgi?id=CVE-2017-17522 --

[issue32368] Segfault when compiling many conditional expressions

2017-12-18 Thread Christian Heimes
Christian Heimes added the comment: Looks like 174,565 stack frames are a bit too much :) (gdb) bt #0 dfs (c=0x7fffcbe0, b=0x7fffea076d60, a=0x7fffcb50) at Python/compile.c:4903 #1 0x004e47a2 in dfs (c=0x7fffcbe0, b=0x7fffea076db0, a=0x7fffcb50) at

[issue1294959] Problems with /usr/lib64 builds.

2017-12-18 Thread Matthias Klose
Matthias Klose added the comment: the patch looks ok. was it tested on a Debian or Ubuntu system to produce the same layout with this patch and without the new configure option? -- ___ Python tracker

[issue30416] constant folding opens compiler to quadratic time hashing

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4896 fixes this issue in 2.7, but I'm not sure that I want to merge it. The code in 2.7 is more complex because of two integer types. -- ___ Python tracker

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

2017-12-18 Thread R. David Murray
Change by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

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

[issue19847] Setting the default filesystem-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 3.7 will now use UTF-8 by default for the POSIX locale, and the encoding can be forced to UTF-8 using -X utf8 option.

[issue32367] CVE-2017-17522: webbrowser.py in Python does not validate strings

2017-12-18 Thread STINNER Victor
New submission from STINNER Victor : https://security-tracker.debian.org/tracker/CVE-2017-17522 Lib/webbrowser.py in Python through 3.6.3 does not validate strings before launching the program specified by the BROWSER environment variable, which might allow remote

[issue29042] os.path.exists should not throw "Embedded NUL character" exception

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: > A path containing an embedded NUL character simply cannot name an existing > file, and therefore os.path.exists should return False for such a path. I disagree. Python doesn't call the syscall and so must raise a different

[issue22016] Add a new 'surrogatereplace' output only error handler

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! -- nosy: +vstinner ___ Python tracker

[issue21368] Check for systemd locale on startup if current locale is set to POSIX

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

[issue32366] suggestion:html.escape(s, quote=True) escape \n to

2017-12-18 Thread R. David Murray
R. David Murray added the comment: The point of html.escape is to sanitize a string that contains html such that *it does not get interpreted as html*. So adding html markup would go against its purpose. Further, including in an attribute value (which is the purpose

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

2017-12-18 Thread Camion
Camion added the comment: I forgot to mention, that I wonder if the interpreter shouldn't instead, - either consider that since global a is used is g, it should be considered as also local to g from h point of view, - or if h should be able to access f's version

[issue32365] Referenc leak: test_ast test_builtin test_compile

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Python 3.6 and master are affected by the issue. Buildbots: * x86 Gentoo Refleaks 3.x * AMD64 Windows8.1 Refleaks 3.x * AMD64 Windows8.1 Refleaks 3.6 -- ___ Python tracker

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

2017-12-18 Thread Andrew Svetlov
New submission from Andrew Svetlov : Task result is given from coroutine execution, explicit modification of the value should be deprecated and eventually removed. -- components: Library (Lib), asyncio messages: 308542 nosy: asvetlov, yselivanov priority:

[issue32364] Add AbstractFuture and AbstractTask

2017-12-18 Thread Andrew Svetlov
New submission from Andrew Svetlov : Asyncio supports custom future and task by third-party loop implementation. Abstract classes for them is needed. AbstractTask should not have set_result()/set_exception() maybe, is this case abstract base is needed

[issue32365] Referenc leak: test_ast test_builtin test_compile

2017-12-18 Thread STINNER Victor
New submission from STINNER Victor : The following tests are leaking references: test_ast test_builtin test_compile. It seems to be a regression introduced by the commit 3325a6780c81f1ea51190370b5454879c4862a37, bpo-27169. Serhiy: would you mind to take a look?

[issue32365] Reference leak: test_ast test_builtin test_compile

2017-12-18 Thread STINNER Victor
Change by STINNER Victor : -- title: Referenc leak: test_ast test_builtin test_compile -> Reference leak: test_ast test_builtin test_compile versions: +Python 3.6 ___ Python tracker

[issue32366] suggestion:html.escape(s, quote=True) escape \n to

2017-12-18 Thread iMath
New submission from iMath : It would be better if html.escape(s, quote=True) could escape linefeed to https://docs.python.org/3/library/html.html#html.escape -- components: XML messages: 308546 nosy: redstone-cold priority: normal severity: normal status: open

[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

[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

[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

[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

[issue32365] Reference leak: test_ast test_builtin test_compile

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5659743b5693c9e23313a74117948294e35013f4 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32365: Fix a reference leak when compile __debug__. (GH-4916) (#4918)

[issue32365] Reference leak: test_ast test_builtin test_compile

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Victor. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5659743b5693c9e23313a74117948294e35013f4 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32365: Fix a reference leak when compile __debug__. (GH-4916) (#4918)

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > `recvfrom` from multicast socket is painfull slow. What do you mean? Can you give results for a benchmark of your choice? How much does your PR speed it up? -- nosy: +pitrou ___ Python tracker

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-18 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: -Python 3.6, Python 3.8 ___ Python tracker ___ ___

[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 ___

[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

[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

[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 ___

[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 ___ ___

[issue32369] test_subprocess: last part of test_close_fds() doesn't check what's intended

2017-12-18 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +gregory.p.smith, pitrou ___ Python tracker ___ ___

[issue32368] Segfault when compiling many conditional expressions

2017-12-18 Thread Christian Heimes
Christian Heimes added the comment: I think so, too. -- ___ Python tracker ___ ___

[issue32364] Add AbstractFuture and AbstractTask

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: +1, let's do it. I'd add a new module - 'asyncio.abc' and put them both there (as well as asyncio.isfuture() function). -- ___ Python tracker

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

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: +1. -- ___ Python tracker ___ ___ Python-bugs-list

[issue32369] test_subprocess: last part of test_close_fds() doesn't check what's intended

2017-12-18 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The last part of test_close_fds() doesn't match its own comment. The following assertion always holds because fds_to_keep and open_fds are disjoint by construction. self.assertFalse(remaining_fds & fds_to_keep & open_fds,

[issue32369] test_subprocess: last part of test_close_fds() doesn't check what's intended

2017-12-18 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +4815 stage: -> patch review ___ Python tracker ___

[issue32369] test_subprocess: last part of test_close_fds() doesn't check what's intended

2017-12-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 2d8f06382e7d5a759ca554110a699a397114824a by Gregory P. Smith (izbyshev) in branch 'master': bpo-32369: test_subprocess: Fix pass_fds check in test_close_fds() (#4920)

[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: In English, 'adjective noun' does not necessarily imply the existence of 'not-adjective' nouns, and the adjective may serve as a reminder or reason. For instance, "This job is too dangerous for mortal humans!" In the current context,

[issue32356] asyncio: Make transport.pause_reading()/resume_reading() idempotent; add transport.is_reading()

2017-12-18 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32331] Fix socket.type on Linux

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: This issue is not specific to Linux. FreeBSD is also affected: >>> s=socket.socket() >>> s.type >>> s.setblocking(False) >>> s.type 536870913 See for example https://sourceware.org/ml/libc-alpha/2013-08/msg00528.html --

[issue32369] test_subprocess: last part of test_close_fds() doesn't check what's intended

2017-12-18 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to use "typing.Any" (as a string) if the type information is omitted in the call to make_dataclass(). That way I don't need to import typing. -- ___ Python tracker

[issue32356] asyncio: Make transport.pause_reading()/resume_reading() idempotent; add transport.is_reading()

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset d757aaf9dd767d13205bf9917e520ebf43e7f6e5 by Yury Selivanov in branch 'master': bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)

[issue32331] Fix socket.type on Linux

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: The most portable solution seems to getsockopt(): >>> s.getsockopt(socket.SOL_SOCKET, socket.SO_TYPE) 1 But I would prefer to avoid a syscall just to clear flags :-/ -- ___ Python tracker

[issue32331] Fix socket.type on Linux

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: > This issue is not specific to Linux. FreeBSD is also affected: So instead of '#ifdef __linux__' we should use `#ifdef SOCK_NONBLOCK` etc. I'll update the PR. -- ___ Python tracker

[issue32331] Fix socket.type on Linux

2017-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: > But I would prefer to avoid a syscall just to clear flags :-/ Yes, that's what I want to do. We control what constants the socket module exports. Let's just clear them if we export them -- that's a good working solution (and also the

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

2017-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it worth to emit more specific (but possible uniform) error messages in other unpacking cases (see msg307999)? FYI if a class implements __iter__ which returns non-iterable, the following error is raised: >>> class C: ...

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d by Victor Stinner in branch 'master': bpo-32030: Fix compilation on FreeBSD, #include (#4919) https://github.com/python/cpython/commit/6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2017-12-18 Thread Brett Cannon
Brett Cannon added the comment: Yep, I assumed implementing the ReourceReader API would be a separate step. As for the type hints, I thought it was lifted such that new code could include it but we wouldn't be taking PRs to add them to pre-existing code? --

  1   2   >