[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset c5ae169e1b73315672770517bf51cf8464286c76 by Victor Stinner (Michael Felt) in branch 'master': bpo-26439 Fix ctypes.util.find_library failure on AIX (#4507)

[issue27456] asyncio: set TCP_NODELAY flag by default

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset a7bd64c0c01379e9b82e86ad41a301329a0775d9 by Yury Selivanov in branch 'master': bpo-27456: Simplify sock type checks (#4922) https://github.com/python/cpython/commit/a7bd64c0c01379e9b82e86ad41a301329a0775d9 --

[issue32073] Add copy_directory_metadata parameter to shutil.copytree

2017-12-19 Thread desbma
desbma added the comment: Ping -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32357] Optimize asyncio.iscoroutine() and loop.create_task() for non-native coroutines

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

[issue32371] Delay-loading of python dll is impossible when using some C macros

2017-12-19 Thread Pierre Chatelier
New submission from Pierre Chatelier : Delay-loading of the python DLL is impossible when using some C macros. For instance, PyLong_Check() is OK, but PyBool_Check() or PyFunc_Check() will eventually raise a link error. This is due to the fact that PyBool_Check()

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

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- priority: normal -> high ___ Python tracker ___ ___

[issue29711] When you use stop_serving in proactor loop it's kill all listening servers

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 319c0345cdd8fddb49d235462e71883f1dd51b99 by Yury Selivanov (Julien Duponchelle) in branch 'master': bpo-29711: Fix stop_serving in proactor loop kill all listening servers (#431)

[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-12-19 Thread INADA Naoki
INADA Naoki added the comment: pyperformance doesn't show significant performance degration. (using commit 5d8d3d1) $ ./python -m perf compare_to -G --min-speed=2 default.json patched.json Slower (5): - pickle_list: 9.40 us +- 0.98 us -> 9.96 us +- 1.20 us: 1.06x

[issue28459] _pyio module broken on Cygwin / setmode not usable

2017-12-19 Thread Erik Bray
Erik Bray added the comment: Right, the current patch is really combining several issues. I'll make a PR from it that just fixes the _pyio issue. I'll also open an issue for fixing the ctypes bug (this is a patch I've had in my cygwin branch for ages but just never

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

2017-12-19 Thread Daniel Holmes
Daniel Holmes added the comment: I wanted to note here... I've been trying to get strptime to work with the types of dates specified in this request and came across a documentation bug here: https://docs.python.org/3.5/library/time.html#time.strptime You can see that the

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: Michael Felt: I merged your PR ✨ ! Thank you very much for your patience and perseverance. 80 comments on this bug, 117 comments and 19 commits in the PR... wow! AIX is not dead  I leave the bug open since Martin, Mariatta and me

[issue32287] Import of _pyio module failed on cygwin

2017-12-19 Thread Erik Bray
Erik Bray added the comment: Indeed, this is a duplicate of #28459. I'll also update the existing patch to a pull request. -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue32357] Optimize asyncio.iscoroutine() and loop.create_task() for non-native coroutines

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset a9d7e552c72b6e9515e76a1dd4b247da86da23de by Yury Selivanov in branch 'master': bpo-32357: Optimize asyncio.iscoroutine() for non-native coroutines (#4915)

[issue32355] Optimize asyncio.gather()

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 36c2c044782997520df7fc5604742a615ccf6b17 by Yury Selivanov in branch 'master': bpo-32355: Optimize asyncio.gather() (#4913) https://github.com/python/cpython/commit/36c2c044782997520df7fc5604742a615ccf6b17 --

[issue32355] Optimize asyncio.gather()

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

[issue29711] When you use stop_serving in proactor loop it's kill all listening servers

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

[issue32368] Segfault when compiling many conditional expressions

2017-12-19 Thread Stefan Nordhausen
Stefan Nordhausen added the comment: I tried out PR 3015 of Serhiy and this fixes the segfaults. So it seems to be a duplicate. As for backporting the fix: Is this a 'reliable' segfault (i.e. it always segfaults when the limit is exceeded) or could there be

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

2017-12-19 Thread R. David Murray
R. David Murray added the comment: Right, it was indeed "designed that way" in the sense that nolocal was only ever intended to access variables from the surrounding local scope, *not* the global scope. If you put a variable name in the global scope, nonlocal was not

[issue32372] Optimize out __debug__ at the AST level

2017-12-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : __debug__ is substituted by the constant value at the code generation stage (see issue27169). This prevents it from participating in constant folding at the AST level. The proposed patch moves this optimization to the AST

[issue32372] Optimize out __debug__ at the AST level

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

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

2017-12-19 Thread Stefan Krah
Stefan Krah added the comment: I guess I'd vote for closing this, because the first Google result for "no binding for nonlocal" on Stackoverflow is quite clear. The ideal message would be "'a' cannot be both global and nonlocal", but it would probably complicate the

[issue32306] Clarify map API in concurrent.futures

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi David, > what happens behind the scenes is that the call blocks until all results are > computed and only then starts yielding them. The current implementation of the Executor.map() generator is: def result_iterator():

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Petr Viktorin
Petr Viktorin added the comment: Marcel, could you look into this? -- nosy: +Dormouse759 ___ Python tracker ___

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, I think you forgot to answer my question on python-dev: > can you get multi-interpreter support *without* PEP 489? That is, using > single-phase initialization and PyModule_GetState(). The doc currently isn't very clear about

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- assignee: -> docs@python components: +Documentation nosy: +docs@python type: -> behavior ___ Python tracker

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: > Found on Python 3.6 on a low-resource platform (NI RoboRIO), ... Hum, it looks like an "embedded device", likely with no entropy source. To check if os.urandom() will block, try to call the following function in your main script:

[issue27456] asyncio: set TCP_NODELAY flag by default

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: Yury: thanks for fixing socket.socket.type. asyncio code now looks simpler and easier to follow without the helper functions just to test the socket type for equality. -- ___ Python

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

2017-12-19 Thread R. David Murray
R. David Murray added the comment: When I said "the only thing keeping this issue open" is the message, I should acknowledge that you mentioned clarifying the documentation, but as I pointed out the documentation is already clear: it says nonlocal does not access

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
New submission from Yury Selivanov : Currently we have the following methods: * socket.settimeout(t) -- can set the socket in blocking mode, when t==0. * socket.setblocking(flag) -- sets in blocking or non-blocking mode. * socket.gettimeout() -- returns 0 when socket is in

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Petr Viktorin
New submission from Petr Viktorin : After the create phase of multiphase initialization, the per-module state is NULL and the module object is reachable by the garbage collector. Between the create and exec phases, Python code is run and garbage collection can be triggered.

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Marcel Plch
Change by Marcel Plch : -- keywords: +patch pull_requests: +4821 stage: -> patch review ___ Python tracker ___

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4820 stage: -> patch review ___ Python tracker ___

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +asvetlov, vstinner ___ Python tracker ___ ___

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: So calling urandom() hangs on your device because there's not enough entropy? What OS is this running? Modern Linux, at least, should never block in urandom() (AFAIK). -- nosy: +christian.heimes, pitrou type: behavior -> resource

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2017-12-19 Thread Dustin Spicuzza
Dustin Spicuzza added the comment: I'm sure that the platform (a RT linux customized by National Instruments) has issues related to urandom, as this has reared it's ugly head with other PEP 525 related issues also: https://bugs.python.org/issue29208 I'll have to

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Now is having a timeout and blocking send/recv methods on a non-blocking > socket a feature? Or is this a bug? I agree it's a bug (but should only be fixed in 3.7). Also I agree with adding a socket.getblocking() method. --

[issue32375] Compilation warnings with gcc

2017-12-19 Thread Antoine Pitrou
New submission from Antoine Pitrou : On Ubuntu 16.04: $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 19/12/2017 à 15:50, STINNER Victor a écrit : > > Hum, it looks like an "embedded device", likely with no entropy source. If it does I/O (which it probably does, being used for robotics), it should certainly be able to extract entropy from

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: It looks like we have a bug with 'sock.settimeout()' and non-blocking/blocking modes (or maybe this is a feature?) Currently: * to make a socket non-blocking, we call 'sock.settimeout(0)'. * to make a socket blocking, we call

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I get the feeling (without actually investigating) that this is because a fork()-created process inherits all the parent's configuration, including (in this case) signal handlers and whatever file descriptor was configured to receive signal

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread Dmitry sky
New submission from Dmitry sky : def get_search_url(from_, to): return f"http://thesite.com/Search?SO0={from_}={to}={from}=false; # pls note `from_` vs `from` ^^ $ python fstring.py File "", line 1 (from) ^

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is a real problem. I think there's already an issue for this, but I can't find it. Unfortunately, to fix it requires a bit of refactoring on how line numbers and errors are tracked. It's on my list of things to do. --

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Eric Cousineau
New submission from Eric Cousineau : Due to how `PyObject_CallFinalizer` is written in python3, `__del__` will only *ever* be called once. In my use case, I am experimenting with a feature in `pybind11` to prevent slicing with Python class instances that inherit

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Eric Cousineau
Eric Cousineau added the comment: You're welcome, and thank you for the prompt response! I will say that it feels a tad odd to only have `tp_finalize` be called once for the entire lifetime of the object, while still having the option of it being resurrected. Is

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the report. Apparently I forgot to update that piece of documentation when PEP 442 was implemented. -- nosy: +pitrou stage: -> needs patch versions: +Python 3.7 -Python 3.4, Python 3.5

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, it's a bug. +1 for getblocking() -- ___ Python tracker ___

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 19/12/2017 à 17:46, Eric Cousineau a écrit : > > My current hack is to call `_PyGC_SET_FINALIZED(self, 0)` - may I ask if > there is a simpler way to do this? Well... perhaps you could create another PyObject (it's just a wrapper, right?)

[issue31113] Stack overflow with large program

2017-12-19 Thread Stefan Nordhausen
Change by Stefan Nordhausen : -- nosy: +snordhausen ___ Python tracker ___

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4822 stage: needs patch -> patch review ___ Python tracker ___

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've proposed a documentation improvement in https://github.com/python/cpython/pull/4927 . Please chime in if you see have issues with it. -- ___ Python tracker

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset dc5770b161a5e28eeff73a406cd4eddb0676c5b5 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-32377: improve __del__ docs and fix mention about resurrection (GH-4927) (#4929)

[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-12-19 Thread Anthony Sottile
Anthony Sottile added the comment: Should this have landed in python3.6? It removes a public symbol `PyExc_RecursionErrorInst` (abi break?) -- nosy: +Anthony Sottile ___ Python tracker

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread R. David Murray
R. David Murray added the comment: The existing issue is #29051. -- nosy: +r.david.murray resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Improve error reporting involving f-strings (PEP 498)

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4826 ___ Python tracker ___ ___

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-19 Thread Alexey Luchko
Alexey Luchko added the comment: I didn't mean type checking. The point is that since string and bytes are different types, then binary and text files are actually much more different than before python 3. Therefore they better be of different protocols. Then inside

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

2017-12-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Stefan, your last example is formally speaking OK, if one reads the "Execution model" literally. The original example is however too ambiguous, so it is good that it triggers an error. I think there is a chance to improve the error

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset c4bca951065f4b2b6833f6ce7a0721e863e2343e by Victor Stinner in branch 'master': bpo-32030: Add _PyCoreConfig.argv (#4934) https://github.com/python/cpython/commit/c4bca951065f4b2b6833f6ce7a0721e863e2343e --

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: In kernel logs (look at dmesg), I found two messages: vstinner@apu$ journalctl -k|grep random déc. 14 23:10:28 apu kernel: random: fast init done déc. 14 23:10:32 apu kernel: random: crng init done Sadly, I don't know which one means

[issue32378] test_npn_protocols broken with LibreSSL 2.6.1+

2017-12-19 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +4824 stage: -> patch review ___ Python tracker ___

[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-12-19 Thread Brett Cannon
Brett Cannon added the comment: Re-opened as a release blocker to make sure we're okay with the potential ABI breakage. -- nosy: +ned.deily priority: normal -> release blocker status: closed -> open ___ Python tracker

[issue32380] functools.singledispatch interacts poorly with methods

2017-12-19 Thread Ethan Smith
New submission from Ethan Smith : Consider the following: from functools import singledispatch class Dispatch: @singledispatch def foo(self, a): return a @foo.register(int) def _(self, a): return "int" @foo.register(str) def _(self,

[issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with the suggested fix. Do you want to submit a PR? -- nosy: +pitrou -llecaroz stage: -> needs patch versions: +Python 3.6 -Python 3.5, Python 3.8 ___ Python tracker

[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> not a bug stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: It appears the the timeouts situation is a bit more complex. It's perfectly normal for a Python socket object to be in a "blocking" mode and for its FD to be in a non-blocking mode. Read more about this in the latest docs update to

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-19 Thread R. David Murray
R. David Murray added the comment: That's type checking. Not type checking is to call the method that writes the data, expecting the object to handle the bytes it is passed, and then that object raises an error to indicate that it cannot. There is no protocol that

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-19 Thread Neil Schemenauer
Neil Schemenauer added the comment: Welp, another day another attempt. As mentioned in the PR 4847, atexit is not the answer. If the raw/buffered file pair are part of a reference cycle and the GC cleans it before atexit runs, then the buffered data can get lost. I

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
New submission from Antoine Pitrou : MRO computation involves a complicated merge calculation over several lists. But, for the simple (common) case where a class has a single base, the computation could be much simpler: take the base's MRO and prepend the derived class.

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: You may switch to multiprocessing.Pool (with the "forkserver" method). Otherwise, you could workaround it by executing a function on all workers that will reset the signal configuration. To maximize the chances that it does get executed on

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Benchmarks: * before: $ ./env-orig/bin/pyperf timeit "class Test: pass" . Mean +- std dev: 9.51 us +- 0.17 us * after: $ ./env/bin/pyperf timeit "class Test: pass" . Mean +- std dev: 8.89 us +- 0.09 us

[issue29970] Severe open file leakage running asyncio SSL server

2017-12-19 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 ___ Python tracker

[issue29970] Severe open file leakage running asyncio SSL server

2017-12-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed in 3.7 -- ___ Python tracker ___ ___

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-12-19 Thread Nathaniel Smith
Nathaniel Smith added the comment: Ouch, yes, that's a tricky bug. This is definitely caused by the way that asyncio internally converts signals into messages along a pipe (well, socket, but same thing), and then after a fork-without-exec the child keeps writing into that

[issue32378] test_npn_protocols broken with LibreSSL 2.6.1+

2017-12-19 Thread Christian Heimes
New submission from Christian Heimes : LibreSSL 2.6.1 to 2.6.4 have a broken implementation of NPN protocol. 2.6.0 and earlier are fine. == FAIL: test_npn_protocols (test.test_ssl.ThreadedTests)

[issue29970] Severe open file leakage running asyncio SSL server

2017-12-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset f7686c1f5553b24e3307506a18e18f6544de94d3 by Andrew Svetlov (Neil Aspinall) in branch 'master': bpo-29970: Add timeout for SSL handshake in asyncio

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4825 stage: -> patch review ___ Python tracker ___

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +inada.naoki, serhiy.storchaka, vstinner ___ Python tracker ___

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

2017-12-19 Thread Camion
Camion added the comment: My interrogation is about the fact that this doesn't seem to have been a collective decision and I'm not even sure it WAS anyone decision : it might as well have been an unintentional consequence of an implementation choice. So, in the

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

2017-12-19 Thread Camion
Camion added the comment: David and Stefan, you're both missing my main point which is the fact that the presence of the global declaration in the parent (g) **blocks the access to the grand parent context**, which would be accessible without this global

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-19 Thread Neil Schemenauer
Neil Schemenauer added the comment: Yeah, I think you are correct. Currently files not part of reference cycles get properly flushed and closed by the reference counter. Implementing my "buffer_register_flush" patch would cause files to be closed only by the cyclic

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it would be quite disruptive to create a reference cycle each time open() is called. It may also break user scripts. -- ___ Python tracker

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4b965930e8625f77cb0e821daf5cc40e85b45f84 by Antoine Pitrou in branch 'master': bpo-32377: improve __del__ docs and fix mention about resurrection (#4927)

[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

2017-12-19 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4823 ___ Python tracker ___

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

2017-12-19 Thread R. David Murray
R. David Murray added the comment: Hmm. I suppose that could be clarified in the docs. I would find it very counter-intuitive for the grandparent 'a' to be accessible, which is probably why I did not consider that an issue. --

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

2017-12-19 Thread Stefan Krah
Stefan Krah added the comment: Okay, I have never used something like that. Personally, I'd disallow the global statement in g() if 'a' is local in f(). >>> a = 10 >>> def f(): ... a = 20 ... def g(): ... global a ... print(a) ... g() ... >>>

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-12-19 Thread Ilya Kulakov
Ilya Kulakov added the comment: Can you suggest an alternative to ProcessPoolExecutor for 3.6? -- ___ Python tracker ___

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

2017-12-19 Thread Camion
Camion added the comment: What I mean is that we need to clarify (by giving examples ?) what make the scope for the new binding "not be unambiguously decidable", because, for an example : My example is totaly unambiguously decidable for an interpreter. It's for

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 19760863623b636a63ccf649107d9504c6465a92 by Victor Stinner in branch 'master': bpo-32030: Cleanup pymain_main() (#4935) https://github.com/python/cpython/commit/19760863623b636a63ccf649107d9504c6465a92 --

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

2017-12-19 Thread Camion
Camion added the comment: Ivan, I believe, this sentence : "(the scope in which a new binding should be created cannot be determined unambiguously)" in https://docs.python.org/fr/3/reference/simple_stmts.html#nonlocal, is the one which should be clarified

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4827 ___ Python tracker ___ ___

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-12-19 Thread Nathaniel Smith
Nathaniel Smith added the comment: It might be possible to create ProcessPoolExecutor and get it to spawn all the workers *before* you start the asyncio loop. It looks like ProcessPoolExecutor delays spawning workers until the first piece of work is submitted, but at that

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

2017-12-19 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-19 Thread Alexey Luchko
Alexey Luchko added the comment: 1. On quopri. It is counter-intuitive despite the clear statement in the doc-string. Quoted-printable is used mostly for text encoding. (It would be quite awkward and inefficient to use it for binary data.) My case: I have a text and I

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4828 ___ Python tracker ___ ___

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-19 Thread R. David Murray
R. David Murray added the comment: Yes, if that protocol existed the errors would be clearer. But it doesn't, for historical reasons, and that is unlikely to change. You are welcome to submit an enhancement request to make quopri accept string as an argument when

[issue32375] Compilation warnings with gcc

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: In function ‘wcsncpy’, inlined from ‘calculate_zip_path’ at ./Modules/getpath.c:797:5: /usr/include/x86_64-linux-gnu/bits/wchar2.h:200:9: warning: call to ‘__wcsncpy_chk_warn’ declared with attribute warning: wcsncpy called with

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: I like the new shape of Py_Main(). The main parts of Py_Main() are now well identified: * init "cmdline" * init "python core" * init "python main" * run python * cleanup -- ___ Python

  1   2   >