[issue33007] Objects referencing private-mangled names do not roundtrip properly under pickling.

2020-07-14 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +20623 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21480 ___ Python tracker

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-14 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20622 pull_request: https://github.com/python/cpython/pull/21479 ___ Python tracker ___

[issue41300] IDLE: add missing import io in iomenu.py

2020-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your suggestion is correct. A side issue is that the line numbers in the traceback are correct but the quoted text lines from iomenu (and only iomenu) are wrong, being from the line previous. I will have to investigate this discrepancy. After the patch,

[issue41158] IDLE: rewrite the code for handling file encoding

2020-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: #41300 reports that the new iomenu line 291 enc, _ = tokenize.detect_encoding(io.BytesIO(encoded).readline) fails without 'import io' added. I should have tested more thoroughly. I will fix and add tests there. --

[issue41296] unittest.mock: patched mocks do not propagate calls to parent when set via setattr

2020-07-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2020-07-14 Thread paul j3
paul j3 added the comment: I just realized if the subparser argument used default=argparse.SUPPRESS it would not clobber values (default or user) set by the main parser. (a 'store_true' would have to be replaced with a 'store_const' to do this) --

[issue41300] IDLE: missing import io in iomenu.py

2020-07-14 Thread nirinA raseliarison
New submission from nirinA raseliarison : idle cannot save file with non ascii character, leading to: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib64/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File

[issue41297] Remove doctest import from heapq

2020-07-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Steven. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue41278] IDLE: Clarify some completion details in doc

2020-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Although a few keystrokes are omitted, I reproduced the examples and can explain the results by elaborating on my claims above. 0. Python starts execution in module '__main__', which initially contains only double underscore names (now 7). 1. If a module

[issue41297] Remove doctest import from heapq

2020-07-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: The idiom of a module running doctests on itself when executed as a script is a common idiom. If modulegraph and pyinstaller can't cope a module importing another module from inside an if statement, that's a bug in them, not in the heapq module (and many

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2020-07-14 Thread SD
New submission from SD : The overhead in Python 3 for threading.Event().wait() is much larger than Python 2. I am trying to run a script at 60hz which worked correctly in Python2 but does not in Python 3. Here is a minimal example to demonstrate: #!/usr/bin/env python import threading

[issue41298] Enable handling logoff and shutdown Windows console events

2020-07-14 Thread Eryk Sun
New submission from Eryk Sun : A console script should be able to handle Windows console logoff and shutdown events with relatively simple ctypes code, such as the following: import ctypes kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) CTRL_C_EVENT = 0

[issue41297] Remove doctest import from heapq

2020-07-14 Thread alex c
New submission from alex c : heapq.py imports doctest in the last 4 lines to perform unit tests: if __name__ == "__main__": import doctest # pragma: no cover print(doctest.testmod()) # pragma: no cover This disrupts dependency tracking modules and software, like

[issue40734] /usr/bin surprisingly in sys.path under IDLE

2020-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Lib/idlelib contains a startup file 'idle.py' (and 'idle.bat' and 'idle.pyw' on Windows). IDLE, and I, have no control over the installation of IDLE, including the addition of system-specific auxiliary startup files and entries, with names containing

[issue41296] unittest.mock: patched mocks do not propagate calls to parent when set via setattr

2020-07-14 Thread thinkingmachin6
thinkingmachin6 added the comment: This appears to be a case of RTFM (https://docs.python.org/3/library/unittest.mock.html#attaching-mocks-as-attributes). For anybody that comes across this, the short answer is use `attach_mock()` instead of plain attribute-setting. -- resolution:

[issue41273] asyncio: proactor read transport: use recv_into instead of recv

2020-07-14 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 568fb0ff4aa641329261cdde20795b0aa9278175 by Tony Solomonik in branch 'master': bpo-41273: asyncio's proactor read transport's better performance by using recv_into instead of recv (#21442)

[issue41296] unittest.mock: patched mocks do not propagate calls to parent when set via setattr

2020-07-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41296] unittest.mock: patched mocks do not propagate calls to parent when set via setattr

2020-07-14 Thread john passaro
New submission from john passaro : I expected the following code to print True: import os from unittest.mock import call, Mock, patch parent = Mock() parent.getenv = patch('os.getenv') with parent.getenv: os.getenv('FOO', 'bar') expected = [call.getenv('FOO', 'bar')] print(expected,

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Paul Ganssle
Paul Ganssle added the comment: Oops, just realized my previous post said `pip install distutils`. I meant to say that `pip install setuptools` will provide the `distutils` module (right now you do `import setuptools; import distutils` and you get the setuptools-provided version; we're

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Paul Ganssle
Paul Ganssle added the comment: > I don't think it's a good idea to replace bad habits from distutils with bad > habits in setuptools._distutils. And this is exactly what you get with > pointing directly to setuptools. These are two different questions. We're not asking people to migrate to

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Christian Heimes
Christian Heimes added the comment: The Windows build system didn't use setu.py even before I upgrade the VS build system to VS 2010. -- ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2020-07-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +20621 pull_request: https://github.com/python/cpython/pull/21476 ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2020-07-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +20620 pull_request: https://github.com/python/cpython/pull/21475 ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2020-07-14 Thread miss-islington
miss-islington added the comment: New changeset 2a5181829af394b82e8e8c917183c709ee72a2b7 by JustAnotherArchivist in branch 'master': bpo-32528: Document the change in inheritance of asyncio.CancelledError (GH-21474)

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Steve Dower
Steve Dower added the comment: The Windows build doesn't depend on distutils at all. We've had dedicated build scripts for each module since before I started contributing. -- ___ Python tracker

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-14 Thread Guido van Rossum
Guido van Rossum added the comment: @Stefan Do you agree that the fix proposed in PR 21473 needs to be made? -- ___ Python tracker ___

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-14 Thread Guido van Rossum
Guido van Rossum added the comment: Reopening because there appears to be a problem with the fix (see PR 21473). -- status: closed -> open ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2020-07-14 Thread JustAnotherArchivist
Change by JustAnotherArchivist : -- pull_requests: +20619 pull_request: https://github.com/python/cpython/pull/21474 ___ Python tracker ___

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread David Caro
David Caro added the comment: Just sent a PR that fixes the issue (a first approach), let me know if it's addressing the issue correctly or if there's a better way. Thanks! -- ___ Python tracker

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread David Caro
Change by David Caro : -- keywords: +patch nosy: +David Caro nosy_count: 5.0 -> 6.0 pull_requests: +20617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21473 ___ Python tracker

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-14 Thread David Caro
Change by David Caro : -- nosy: +David Caro nosy_count: 5.0 -> 6.0 pull_requests: +20618 pull_request: https://github.com/python/cpython/pull/21473 ___ Python tracker ___

[issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely

2020-07-14 Thread Michał Górny
Michał Górny added the comment: I can reproduce test_socket hanging in 2 out of 3 runs. However, in my case testPeek doesn't seem to be the (only) culprit. Disabling whole RDSTest helps. -- nosy: +mgorny ___ Python tracker

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread David Lord
David Lord added the comment: It appears to be solved in Flask-SQLAlchemy's development version already, as the mixins now inherit from `type`. We caught the issue when we started applying flake8 (possibly through flake8-bugbear). -- nosy: +davidism

[issue41286] Built-in platform module does not offer to check for processor instructions

2020-07-14 Thread Boštjan Mejak
Boštjan Mejak added the comment: Unfortunately, I don't know C, only Python. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread Christian Heimes
Christian Heimes added the comment: Stefan, please take a look. -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread Christian Heimes
Christian Heimes added the comment: The regression was introduced in commit 8912c182455de83e27d5c120639ec91b18247913 $ git checkout v3.8.4 $ ./configure -C $ make $ $ ./python bpo41295.py Traceback (most recent call last): File "bpo41295.py", line 14, in obj.test = True File

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread Christian Heimes
Christian Heimes added the comment: The error message is coming from hackcheck function in Objects/typeobject.c, https://github.com/python/cpython/blob/b4cd77de05e5bbaa6a4be90f710b787e0790c36f/Objects/typeobject.c#L5811-L5845 . The issue could be related to bpo-39960. Checking now...

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +3.8regression nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41286] Built-in platform module does not offer to check for processor instructions

2020-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think your best bet will be to write a small C extension to find out what's supported by the processor. -- ___ Python tracker ___

[issue41278] Wrong Completion on Editing Mode of IDLE

2020-07-14 Thread E. Paine
E. Paine added the comment: I can only seem to reproduce this in shell and that is by importing "idlelib.__main__" before then typing "__main__." However, typing "__main__." in shell and editor (without importing "idlelib.__main__") does give different completions. In shell, it gives a list

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread kam193
New submission from kam193 : CPython 3.8.4 broke previously correct custom __setattr__ implementation, when metaclass inheritances from multiple classes, including not-meta. Following code: ``` class Meta(type): def __setattr__(cls, key, value): type.__setattr__(cls, key, value)

[issue41182] DefaultSelector fails to detect selector on VMware ESXi

2020-07-14 Thread Abhijeet Kasurde
Abhijeet Kasurde added the comment: Any news? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41278] Wrong Completion on Editing Mode of IDLE

2020-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: We cannot do anything with this report unless you give exact keystroke-by-keystroke details and we are able to reproduce the issue. Also, what OS? If *nix, which? How did you start IDLE? Unless you start IDLE with -n or explicitly import idlelib, it

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20616 pull_request: https://github.com/python/cpython/pull/21472 ___ Python tracker ___

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37095] [Feature Request]: Add zstd support in tarfile

2020-07-14 Thread Ma Lin
Ma Lin added the comment: > Add zstd support in tarfile This requires the stdlib to contain a Zstandard module. You can ask in the Idea forum: https://discuss.python.org/c/ideas -- nosy: +malin ___ Python tracker

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Matthias Klose
Matthias Klose added the comment: > A PEP may be a good idea, but I do think the change doesn't have a > particularly large magnitude. Anyone using setuptools or pip has > already been getting setuptools' monkey-patched version of distutils > for ages now, and soon they will be getting

[issue39017] Infinite loop in the tarfile module

2020-07-14 Thread jvoisin
jvoisin added the comment: CVE-2019-20907 has been assigned to this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Christian Heimes
Christian Heimes added the comment: +1 I would like to propose three changes: 1) rename distutils, either _distutils or _buildutils sounds good to me 2) make distutils a build-only dependency and no longer install it with make install and other install targets 3) start to build extensions

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Matthias Klose
Matthias Klose added the comment: Renaming distutils to _buildutils only delays the problem to remove it. But yes, it explicitly makes it explicit that code needs to be changed. I would like to see that neither distutils or _buildutils is installed by default, and only is available

[issue41282] Deprecate and remove distutils

2020-07-14 Thread Matthias Klose
Matthias Klose added the comment: > It's too late to add a new deprecation in the Python 3.9 cycle Please can we add a note in 3.9, that it will be deprecated in 3.10? -- nosy: +doko ___ Python tracker

[issue41275] Clarify whether Futures can be awaited multiple times

2020-07-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: The allowance to wait for the future object multiple times is settled in stone. This cannot be changed without breaking very many codes. So yes, asyncio guarantees that the feature is settled in stone. If set_value() / set_exception() was called, the

[issue41275] Clarify whether Futures can be awaited multiple times

2020-07-14 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41287] __doc__ attribute is not set in property-derived classes

2020-07-14 Thread Sergei Izmailov
Sergei Izmailov added the comment: class Property(property): 'custom docstring' print(Property(None, None, None, "hello").__doc__) This snippet is expected to print "hello" as well (at least it's what comment in cpython implementation suggests)

[issue41122] functools.singledispatchfunction has confusing error message if no positional arguments are passed in

2020-07-14 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch nosy: +ammar2 nosy_count: 1.0 -> 2.0 pull_requests: +20615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21471 ___ Python tracker

[issue41293] fix confusing example in hashlib docs

2020-07-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: I probably I wrote these docs (a long time ago). The examples are being used to demonstrate different uses of the APIs including calling update multiple times, different algorithms, a binary digest and a hex digest. They weren't mean to show

[issue41278] Wrong Completion on Editing Mode of IDLE

2020-07-14 Thread Alex
Alex <2423067...@qq.com> added the comment: Well. I found that this bug happens frequntly, sometimes it just shows the proper list, like __builtins__, __docs__ and stuff. Sometimes the completion windows just gives me 'idlelib'. p.s.:idle won't show __main__ when you type something and press