[issue17642] IDLE add font resizing hot keys and wheel

2019-11-10 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +16613 pull_request: https://github.com/python/cpython/pull/17107 ___ Python tracker ___

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-11-10 Thread Brandt Bucher
Brandt Bucher added the comment: I went ahead and opened a PR, since it's been a month. -- ___ Python tracker ___ ___

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-11-10 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16612 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17106 ___ Python tracker ___

[issue38764] Deterministic globbing.

2019-11-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2019-11-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: assert_called_once is supposed to raise an AssertionError if the mock is not called and to return None like other assert_* helpers. The return value is not supposed to be used and it's more of an assertion action where if it's None then it's

[issue38764] Deterministic globbing.

2019-11-10 Thread Brandt Bucher
Brandt Bucher added the comment: I disagree somewhat with the assessment that glob provides "thin" access to OS services. It is composed of a few low-level utilities, but it exposes them through what I consider to be a fairly high-level, abstract, friendly interface that (aside from

[issue38764] Deterministic globbing.

2019-11-10 Thread Nathaniel Smith
Nathaniel Smith added the comment: > I saw the article as well, but think auto-sorting would have just provided a > thin mask over their serious data pipeline bugs. This seems like an inappropriately elitist attitude. I'm sure their code has bugs; so does mine and yours. But in fact they did

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nils, thanks for the report. Guido, thanks for the clarification. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 84ac4376587e35d16b4d0977c4f330d9d04b690a by Raymond Hettinger in branch 'master': bpo-38761: Register WeakSet as a MutableSet (GH-17104) https://github.com/python/cpython/commit/84ac4376587e35d16b4d0977c4f330d9d04b690a --

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: > But is the 'fix' in _maybe_compile at all applicable to the REPL? Or might a > parser change REPL fix make the code in _maybe_compile unneeded? I don't know. Most of the contortions in code.py codeop.py are meant to emulate what the parser does

[issue38764] Deterministic globbing.

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I saw the article as well, but think auto-sorting would have just provided a thin mask over their serious data pipeline bugs. Also, this isn't the only pathway to seeing file lists: os.listdir, fnmatch, etc. I say that we leave it alone and not

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fix corner case bugs in IDLE would definitely be a separate issue. But is the 'fix' in _maybe_compile at all applicable to the REPL? Or might a parser change REPL fix make the code in _maybe_compile unneeded? --

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Stephen, I think *you* were the one over-anxious to be dismissive. In the title Marco refers to "Jupyter console (IPython)" features and in his opening, to "Jupyter console, aka IPython". Jupyter Console is, I read, QT based. IPython/Jupyter Notebooks are

[issue38764] Deterministic globbing.

2019-11-10 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16611 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17105 ___ Python tracker ___

[issue38764] Deterministic globbing.

2019-11-10 Thread Brandt Bucher
New submission from Brandt Bucher : This has been discussed before, but we now have examples in the news of glob's non-deterministic behavior causing some real headaches for hundreds of people in the scientific community. After some cursory discussion

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: As I wrote between the lines in the PR, this would be a bug in the weakref module, not a bug in collections.abc. -- ___ Python tracker

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: PEP 585 says Discussions-To: Typing-Sig So I'd start there. (But honestly I think what Ivan meant is that it would automatically work. Read the PEP carefully before posting if you disagree.) -- ___ Python

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-10 Thread Troulet-lambert Odile
New submission from Troulet-lambert Odile : Using a mock with side_effect, I would expect that assert_called_once returns True if the mock has been called. Yet it returns None while call_count== 1 returns True. If this is not a bug, I would welcome some explanation in the documentation.

[issue32879] Race condition in multiprocessing Queue

2019-11-10 Thread Eric Meyer
Eric Meyer added the comment: The problem I was seeing ended up being improper GIL management in a c++ extension. It seems putting items that were created without the GIL on the queue causes a seg fault. -- ___ Python tracker

[issue38751] Document maximum JSON depth or remove it.

2019-11-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38751] Document maximum JSON depth or remove it.

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is nothing here specific to JSON. It is Python's normal (and documented) limit on recursion. If needed, you can change the limit to as large as needed: import json import sys sys.setrecursionlimit(50_000) foo = {} for i in

[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2019-11-10 Thread Delgan
New submission from Delgan : Hi. In order to display the process name in logs, the "logging" module checks for the presence of "multiprocessing" in "sys.modules" before calling "current_process()". If "multiprocessing" is not found in "sys.modules", it assumes that the current process is

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +16610 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17104 ___ Python tracker

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: We could register the WeakSet in _collections_abc, right after MutableSet is defined. That module only registered builtins so that it can avoid imports; however, since we know that WeakSet is already loaded, it is reasonable to add an import for

[issue37564] ArgumentParser should support bool type according to truth values

2019-11-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg356334 ___ Python tracker ___ ___ Python-bugs-list

[issue37564] ArgumentParser should support bool type according to truth values

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Right now "type" has a clear and understandable action of invoking a callable. Imbuing "type" with other semi-magical capabilities opens a new can of worms. Unless some persuasive new commentary appears in the next few days, I'm going to close this

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Okay, if I want to start a discussion about adding weakref types to PEP 585 where should do it? The mailing list or as an issue in the PEP repo? -- ___ Python tracker

[issue37564] ArgumentParser should support bool type according to truth values

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Right now "type" has a clear and understandable action of invoking a callable. Imbuing "type" with other semi-magical capabilities opens a new can of worms. Unless some persuasive new commentary appears in the next few days, I'm going to close this

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: We already have https://github.com/python/typing/issues/508 for "smart" `get_type_hints()` that would use LBYL. Also we had a similar discussion about PathLike, and ultimately decided not to make `typing` a place for generic versions of everything.

[issue37564] ArgumentParser should support bool type according to truth values

2019-11-10 Thread Daniel Kahn Gillmor
Daniel Kahn Gillmor added the comment: this is a common enough question, and enough people want this behavior, that argparse should supply it. I'm imagining that: type='bool' would be fine for triggering this behavior, instead of the shadowing that could happen with: type=bool

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: @ilevkivskyi Is this important enough to change get_type_hints()? Otherwise let’s close this issue. -- ___ Python tracker ___

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Marco Sulla
Marco Sulla added the comment: @Eryk: why a C extension apart and not a patch to `readline`? -- ___ Python tracker ___ ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-10 Thread Dong-hee Na
Dong-hee Na added the comment: According to https://www.gnu.org/software/libc/manual/html_node/Open-File-Description-Locks.html It is important to distinguish between the open file description (an instance of an open file, usually created by a call to open) and an open file descriptor,

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-10 Thread Dong-hee Na
Dong-hee Na added the comment: One question: Is there any reason to choose the name is `open_file_descriptor` not `open_file_description`? -- ___ Python tracker ___

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Eryk Sun
Eryk Sun added the comment: > For example, I would be shocked if it wasn't absolutely trivial > for the current implementation to add auto-indenting following > a colon. That feature alone would be a win for usability. That would be a non-trivial change in Windows. I think it's at least

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Nils Kattenbeck
New submission from Nils Kattenbeck : Instances of weakref.WeakSet are not instances of Set and therefore not of MutableSet but they are instances of Collection. They however implement all required methods for a MutableSet and Weak(Key|Value)Dictionary are correctly identified. Is this just

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Okay nevermind, after looking in the PEP again and inspecting the __annotations__ property I learned that annotations are never evaluated and just saved as a string when using said future statement. However this may still be relevant as

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Yes thank you, using 'from __future__ import annotations' works fantastic. I did not knew about this functionality of the annotations future import statement, I thought it was only for postponed evaluation but I probably missed something in the PEP...

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Marco Sulla
Marco Sulla added the comment: Steven: currently I'm developing `frozendict` as part of CPython. About IDLE, IDLE can't be used on a server without a GUI. Furthermore, I *really* hope that IDLE is simply a GUI wrapper of REPL, with some additional features. --

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Marco Sulla
Marco Sulla added the comment: Well, maybe too much feature requests in a single report. I'll report them separately, with more rationale. -- ___ Python tracker ___

[issue38757] mocking an exception, arguments do not seem to be passed to the mock

2019-11-10 Thread Mario Corchero
Mario Corchero added the comment: The reason why it seems that "no arguments are beeing passed" is because the exception is not being raised by you, but by mock itself when the exception is trying to be created. When an exception type is passed as side_effect, the mock modules raises such