[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Change by Kyle Stanley : -- pull_requests: +17051 pull_request: https://github.com/python/cpython/pull/17577 ___ Python tracker ___

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > One more resource warning about unclosed resource being garbage collected. As > per the other tests I think transport and protocol need to be closed as per > below patch but someone can verify if it's the right approach. Ah, good catch. It's not needed when

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > I'll fix them accordingly and open a new PR (as well as the backports). Nevermind. Upon further inspection, the other occurrences of `reuse_address=` were for create_server(), not create_datagram_endpoint(). The PR will only include the removal of the two

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: One more resource warning about unclosed resource being garbage collected. As per the other tests I think transport and protocol need to be closed as per below patch but someone can verify if it's the right approach. ./python.exe -X tracemalloc

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > or left an outdated test somewhere that explicitly sets `reuse_address=False` Looks like this was the issue, I left a `reuse_address=False` in both test_create_datagram_endpoint_nosoreuseport and test_create_datagram_endpoint_ip_addr. I fixed it locally on

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide benchmarks which demonstrate the performance issue? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2019-12-11 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > The fix seems to generate few DeprecationWarning while running test suite > with -Wall. Thanks Karthikeyan, I'm guessing that I missed an assertWarns() or left an outdated test somewhere that explicitly sets `reuse_address=False` (since

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The fix seems to generate few DeprecationWarning while running test suite with -Wall. ➜ cpython git:(master) git checkout ab513a38c98695f271e448fe2cb7c5e39eef~1 Lib/asyncio Updated 1 path from 4fb4056fbc ➜ cpython git:(master) ✗ ./python.exe

[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2019-12-11 Thread Ashley Whetter
Change by Ashley Whetter : -- keywords: +patch pull_requests: +17050 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16575 ___ Python tracker ___

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-11 Thread Sebastian Berg
New submission from Sebastian Berg : The keyword argument extraction/finding function seems to have a performance bug/enhancement (unless I am missing something here). It reads: ``` for (i=0; i < nkwargs; i++) { PyObject *kwname = PyTuple_GET_ITEM(kwnames, i); /*

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-11 Thread Sebastian Berg
Change by Sebastian Berg : -- keywords: +patch pull_requests: +17049 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17576 ___ Python tracker ___

[issue38921] Max Recursion Depth Reached in Logging Library

2019-12-11 Thread Joy
Joy added the comment: Yes, still working on a script for this bug. -- status: pending -> open ___ Python tracker ___ ___

[issue39001] possible problem with 64-bit mingw DECREF

2019-12-11 Thread Dave Lawrence
Dave Lawrence added the comment: traced to be a duplicate of https://bugs.python.org/issue28267 -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Change by Christian Tismer : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Change by Christian Tismer : -- stage: patch review -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Christian Tismer added the comment: Sorry, I believe I was wrong and lookup_maybe_method does not return a borrowed reference. _PyType_Lookup does and I was confused. Closing that for now. -- ___ Python tracker

[issue39001] possible problem with 64-bit mingw DECREF

2019-12-11 Thread Dave Lawrence
Dave Lawrence added the comment: by redefinining the Py_DECREF macro in my application: #define Py_DECREF(op) do { if (--op->ob_refcnt == 0) fprintf(stderr, "DECREF %s %d %p %d %s %p\n", __FILE__, __LINE__, op, Py_SIZE(op), Py_TYPE(op)->tp_name,Py_TYPE(op)->tp_dealloc ); fflush(stderr); }

[issue38999] Python launcher on Windows does not detect active venv

2019-12-11 Thread Steve Dower
Steve Dower added the comment: > This makes it simple for users to intervene via the PATH (which is the whole > point of /usr/bin/env) and launch whatever they want. That's one point of view, but the other is that the whole point of the shebang line is for users to be able to run the script

[issue39027] run_coroutine_threadsafe uses wrong TimeoutError

2019-12-11 Thread janust
New submission from janust : https://docs.python.org/3.8/library/asyncio-task.html#asyncio.run_coroutine_threadsafe has a code example that catches a asyncio.TimeoutError from run_coroutine_threadsafe. In Python 3.7, this exception was equal to concurrent.futures.TimeoutError, but since

[issue38614] Add timeout constants to test.support

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure about backporting the new timeout constants of test.support to Python 3.7 and 3.8. Backporting all changes may help to make tests more stable in 3.7 and 3.7 branches. It should also help to backport test changes from master to 3.7 and 3.8. But

[issue38614] Add timeout constants to test.support

2019-12-11 Thread STINNER Victor
Change by STINNER Victor : -- title: test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 -> Add timeout constants to test.support ___ Python tracker ___

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7772b1af5ebc9d72d0cfc8332aea6b2143eafa27 by Victor Stinner in branch 'master': bpo-38614: Use support timeout constants (GH-17572) https://github.com/python/cpython/commit/7772b1af5ebc9d72d0cfc8332aea6b2143eafa27 --

[issue33762] Make tempfiles subclass IOBase

2019-12-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looking at the tempfile code more, I agree with Serhiy that changing it should be rejected. Python is a duck-typed language (essentially what Martin said). People should not be over-zealous in using instance checks. The doc specifically says that

[issue38999] Python launcher on Windows does not detect active venv

2019-12-11 Thread Alexandros Karypidis
Alexandros Karypidis added the comment: My suggestion to gradually fall back from most specific to least specific version, was an attempt to reconcile the input from various viewpoints. I think that ideally the behaviour should be as close to UNIX as possible. This means that it should just

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Justin Capella
Justin Capella added the comment: It might make sense that CSimpleData types do not call init, which makes sense for _fields_ but it doesn't make sense to offer subclassing (of Structure) and not use the subclass, instead creating a type of the same name. That test case is bugged, missing

[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2019-12-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks! (note: unfortunately I'll probably not have time for CPython until next week, but further investigation is on my list.) -- ___ Python tracker

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Christian Tismer added the comment: On 11.12.19 17:37, Petr Viktorin wrote: > > Petr Viktorin added the comment: > > The goal now should be to find a reasonably small reproducer. > > I'm trying to compile PySide to see what it does, but it's a big project and > I'm a bit lost. >

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- pull_requests: +17048 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17575 ___ Python tracker ___

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Steve Dower
Steve Dower added the comment: > Create a pyscript launcher, which would work like py but would take as > command-line the name of the script to run ... This is spelled "py [-x.y] -m [script]", but it's up to the libraries to support it. We can't force them to do it. > Let py execute a

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Steve Dower
Steve Dower added the comment: > Moreover, some of these C++ exectuables depends on DLL which are only in the > Scripts directory and it might not work. In this case, perhaps these tools should be in a separate directory? A simple .py script could be added to Scripts that works with "-m"

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: The goal now should be to find a reasonably small reproducer. I'm trying to compile PySide to see what it does, but it's a big project and I'm a bit lost. Christian, you said in an e-mail that you have a workaround -- unsetting the

[issue1438480] shutil.move raises OSError when copystat fails

2019-12-11 Thread Eshan Singhal
Eshan Singhal added the comment: Amending shutil.copy and shutil.copy2 to expose a method of ignoring the permission errors rather than changing the current behaviour would not fix the original issue without further changes in consumers of these functions to pass through the new parameter

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread Gaige Paulsen
Gaige Paulsen added the comment: I should have been more specific. Sorry about that. Yes, when including in Xcode, incorporating the framework. In particular, I'm embedding 3.8 in an application (previously used the system Framework, which was 2.7, which worked but Apple has warned that it

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Christian Tismer added the comment: On 11.12.19 14:13, Petr Viktorin wrote: > > Petr Viktorin added the comment: > > lookup_maybe_method should not return a borrowed reference. It increfs its > return value. At second sight, this seems to be true. No idea why I was so convinced. Need to

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: In what way does it not work when using a framework build? Is this when you add the python framework to an (Xcode) project and include the main python header using "#include "? -- ___ Python tracker

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread Gaige Paulsen
New submission from Gaige Paulsen : The cpython/pystate.h includes cpython/initconfig.h using the relative path "cpython/initconfig.h", which probably works fine if your include path explicitly contains the top of the python directory, however when developing with a framework in macOS, the

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Rebecca Morgan
Rebecca Morgan added the comment: Looking at the test case 'test_from_buffer_copy' here: https://github.com/python/cpython/blob/master/Lib/ctypes/test/test_frombuffer.py This suggests the failure to call init in this instance is expected behavior (similarly for from_buffer), unlike e.g. the

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +LewisGaul, aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Bluebird
Bluebird added the comment: Thanks for the quick feedback. I agree that it makes sense for python modules to support -m. However, PyQt comes with many executables originally written in C++ for Qt (designer, assistant). It feels a bit strange to add a module with that name, just for the

[issue10915] Make the PyGILState API compatible with multiple interpreters

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-1021318: "PyThreadState_Next not thread safe". -- ___ Python tracker ___ ___

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure of what is the best approach. Currently, bpo-10915 is blocking different projects: "Make the PyGILState API compatible with multiple interpreters". We may have to fix this API first, and clarify the scope of the different locks. --

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread Julien Danjou
Julien Danjou added the comment: Victor, do you have an idea of how you would like this mutex to be exposed? I see it only recently changed in Python 3.7 to be part of a structure, though this structure is not public AFAIU. Is adding 2 new lock/unlock C functions good enough? --

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: lookup_maybe_method should not return a borrowed reference. It increfs its return value. -- nosy: +petr.viktorin ___ Python tracker ___

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Paul Moore
Paul Moore added the comment: Most items in the Scripts directory can be run using the `-m` flag to Python, so you can use something like `py -m pip` to run pip without needing the Scripts directory in PATH. If an individual project like PyQt doesn't support -m, it's relatively easy for

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: Steve, I would like to add your reproducer (weird.py) to CPython's test suite, to make sure this doesn't happen again. Would you be willing to sign the contributor agreement, so we can use your code in Python? The instructions are here:

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-12-11 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +17047 pull_request: https://github.com/python/cpython/pull/17573 ___ Python tracker ___

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: A refcount problem possibly caused by the fix: https://bugs.python.org/issue39016 -- nosy: +petr.viktorin ___ Python tracker ___

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Bluebird
New submission from Bluebird : The py Python launcher is a great improvement over a few years ago when managing multiple Python installation was tedious. However, it does not solve one annoying problem: the Scripts directory. If you install tools like mypy, pyqt-tools or pyinstaller, to be

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-12-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17046 pull_request: https://github.com/python/cpython/pull/17572 ___ Python tracker ___

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0d63bacefd2e5b937ec6b0ec3053777c09941b4a by Victor Stinner in branch 'master': bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566) https://github.com/python/cpython/commit/0d63bacefd2e5b937ec6b0ec3053777c09941b4a --

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-12-11 Thread Ben Brown
Change by Ben Brown : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list