[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2020-04-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: +19056 pull_request: https://github.com/python/cpython/pull/19734 ___ Python tracker ___

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 91a5ae18351027867e99c96db5ea235d9c42e47a by Pablo Galindo in branch 'master': bpo-40217: Clean code in PyType_FromSpec_Alloc and add NEWS entry (GH-19733) https://github.com/python/cpython/commit/91a5ae18351027867e99c96db5ea235d9c42e47a

[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lisroach, xtreak type: -> behavior ___ Python tracker ___ ___ Python-bugs-list maili

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread Łukasz Langa
Łukasz Langa added the comment: Please backport to 3.8, then it will become part of 3.8.3rc1 which I'll be releasing tomorrow. -- nosy: +lukasz.langa ___ Python tracker ___ __

[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-27 Thread Avram
Avram added the comment: Checking for presence and then falling through to the <=3.8 behavior as in the patch, seems reasonable. The default magic method behavior presumably comes out of research, trial, and error. If the docs need to be clearer, I think that's different that scrapping the w

[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: > Do we have any pep or discuss record about this plan? "since we are going to delete the threading.Thread object with its _tstate_lock object anyway" sentence is a description of the current _PyThreadState_DeleteExcept() implementation. -- ___

[issue40333] Request for multi-phase initialization API to run code after importlib init

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: > 5) Remove PathFinder if filesystem imports are disabled Extract of importlib._bootstrap_external._install(): def _install(_bootstrap_module): ... sys.meta_path.append(PathFinder) PathFinder is always registered. So you are not only asking for an AP

[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Thomas Grainger
New submission from Thomas Grainger : aentering a MagicMock() results in an AsyncMock which behaves differently than I expected: ``` python3.9 -m asyncio asyncio REPL 3.9.0a5 (default, Apr 18 2020, 00:00:31) [GCC 9.3.0] on linux Use "await" directly instead of "asyncio.run()". Type "help", "c

[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Thomas Grainger
Thomas Grainger added the comment: Perhaps there could be a MagicAsyncMock that supports .__await__ and .__aenter__ etc? -- ___ Python tracker ___ ___

[issue40402] multiprocessing/connection.py broken handle

2020-04-27 Thread Maxi
Maxi added the comment: Hi Rémi. This is a production environment and can't reproduce it in the dev server (probably because of the lack of volume). I did checked that the code is the same up to Python 3.8, but can't confirm an actual case until we upgrade in prod. ‐‐‐ Original Message ‐

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue40338] [Security] urllib and anti-slash (\) in the hostname

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: We consider that the stdlib is not vulnerable, so I close the issue. Feel free to report vulnerabilities to third party projects which are vulnerable. Thanks for the report anyway David Schütz! -- resolution: -> not a bug stage: -> resolved status:

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: FYI I closed bpo-40149: the commit 0169d3003be3d072751dd14a5c84748ab63a249f fixed test_threading leak. -- For master, it would be nice to have a NEWS entry, and maybe also a What's New in Python 3.9 entry, maybe in the "Changes in the C API" section. -- N

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19054 pull_request: https://github.com/python/cpython/pull/19733 ___ Python tracker ___ ___

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: > I created bpo-40217: "The garbage collector doesn't take in account that > objects of heap allocated types hold a strong reference to their type". This issue is now fixed. I tested manually: I confirm that it does fix the test_threading leak, so I close th

[issue40335] [PEP 617 new parser] Regression in multiline SyntaxError offsets

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: Until a fix is shipped, you can use -X oldparser command line option or PYTHONOLDPARSER=1 environment variable: https://docs.python.org/dev/whatsnew/3.9.html#pep-617-new-parser -- nosy: +vstinner title: Regression in multiline SyntaxError offsets -> [

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: > Serhiy: would it be possible to fix this issue in alpha6? Can we merge PR > 19414? In the lack of reply, I think that the best to merge PR 19414. I asked Lukasz (Python 3.9 release manager) in private and he is ok to merge this PR. He plans to wait until R

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0169d3003be3d072751dd14a5c84748ab63a249f by Pablo Galindo in branch 'master': bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (GH-19414) https://github.com/python/cpython/commit/0169d3003be3d072751dd14a5c847

[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: Yep, I didn't see any test_weakref hang anymore since this commit. -- ___ Python tracker ___ ___

[issue40405] ast

2020-04-27 Thread Bar Harel
New submission from Bar Harel : Continuing with bpo-27589, looks like as_completed documentation is still misleading. According to the docs, it "Return(s) an iterator of Future objects. Each Future object returned represents the earliest result from the set of the remaining awaitables." Ther

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Bar Harel
Change by Bar Harel : -- title: ast -> asyncio.as_completed documentation misleading ___ Python tracker ___ ___ Python-bugs-list mai

[issue40338] [Security] urllib and anti-slash (\) in the hostname

2020-04-27 Thread Riccardo Schirone
Riccardo Schirone added the comment: I agree I don't see a clear vulnerability here. -- nosy: +rschiron ___ Python tracker ___ ___

[issue40402] multiprocessing/connection.py broken handle

2020-04-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Maxi, Python 3.5 now only accept security fixes. Can you reproduce this issue with recent releases and post an example here? -- nosy: +remi.lapeyre type: crash -> behavior ___ Python tracker

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-04-27 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31363] __PYVENV_LAUNCHER__ breaks calling another venv's interpreter

2020-04-27 Thread Ned Deily
Ned Deily added the comment: This issue has been fixed in the code for Issue22490 which will be released in Python 3.8.3 and 3.7.8. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs f

[issue32444] python -m venv symlink dependency on how python binary is called is not documented

2020-04-27 Thread Ned Deily
Ned Deily added the comment: The behavior of venv has been changed in Python 3.9 to always create a "pythonM.N" link in the venv bin directory, in addition to "pythonM", regardless of how venv was invoked. -- nosy: +ned.deily resolution: -> duplicate stage: needs patch -> resolved s

[issue40398] get_args(Callable) fails

2020-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6292be7adf247589bbf03524f8883cb4cb61f3e9 by Serhiy Storchaka in branch 'master': bpo-40398: Fix typing.get_args() for special generic aliases. (GH-19720) https://github.com/python/cpython/commit/6292be7adf247589bbf03524f8883cb4cb61f3e9 -

[issue40261] Build of Python where make is called from subprocess, within a virtualenv, breaks on macOS

2020-04-27 Thread Ned Deily
Ned Deily added the comment: Thanks for the easy-to-reproduce test case! It looks like you are running into the problem described in Issue22490 where venv with macOS framework builds could run into problems. A fix for this issue has recently been merged and will be released in upcoming 3.8.3

[issue40272] ModuleNotFoundEror thrown by system python while accessing it specifically via venv python

2020-04-27 Thread Ned Deily
Ned Deily added the comment: One additional thought: there was a longstanding issue specific to using venv on macOS that has recently been fixed (Issue22490); that fix will be released first in Python 3.8.3 which should be available in a few weeks (or, if you are comfortable doing so, you co

<    1   2