[issue35730] IDLE: Fix squeezer test_reload.

2019-01-16 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +11272, 11273, 11274 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35730] IDLE: Fix squeezer test_reload.

2019-01-16 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +11272, 11273 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35730] IDLE: Fix squeezer test_reload.

2019-01-16 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +11272 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread Christian Heimes
Christian Heimes added the comment: +1, /usr/bin:/bin sounds good to me. My /usr/include/paths.h has #define _PATH_DEFPATH "/usr/bin:/bin" and #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin". The file is pretty old and has copyright from 89 and 93,

[issue35750] process finished with exit code -1073740940 (0xc0000374)

2019-01-16 Thread Anil kunduru
Anil kunduru added the comment: Thanks guys for quick responses. Eryk Sun comment wa very help full. -- resolution: -> fixed ___ Python tracker ___

[issue35750] process finished with exit code -1073740940 (0xc0000374)

2019-01-16 Thread Anil kunduru
Anil kunduru added the comment: thanks Eryk Sun i am able to solve the problem, it was extension modules problem. it was helpful great. -- ___ Python tracker ___

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm not arguing against this change, just trying to figure out where it came from in the first place. We should fix the value on all OSes. It would be a behavior change so probably only good for 3.8+. -- ___

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: ntpath and macpath appear to have the same potential issue. They've basically had this defpath value forever. keep following it and you find a commit from 1994 https://github.com/python/cpython/commit/2979b01ff88ac4c5b316d9bf98edbaaaffac8e24 Changing them

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread Kyle Evans
Kyle Evans added the comment: I'll be preparing a patch for our posix_spawn's signal handling. My mistake in my setuid assessment was pointed out to me- it doesn't seem like a highly likely attack vector, but it is indeed possible. If the child errored out, they will indeed be properly

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I understood the PEP to include `return expr` in the iteration values > as per the first bullet of the proposal. > > > Any values that the iterator yields are passed directly to the caller. > > This bullet doesn't have any additional formatting on the

[issue34691] _contextvars missing in xmaster branch Windows build?

2019-01-16 Thread Tim Peters
Tim Peters added the comment: Precisely _how_ are you building it? As noted above, if you're using Visual Studio, try using build.bat instead for the first time. -- ___ Python tracker

[issue34691] _contextvars missing in xmaster branch Windows build?

2019-01-16 Thread ossdev
ossdev added the comment: I am building python for windows on ARM64, I am getting "No module named '_contextvars'" when trying to import contextvars: >>> import contextvars Traceback (most recent call last): File "", line 1, in File

[issue35758] Disable x87 control word for MSVC ARM compiler

2019-01-16 Thread Minmin Gong
New submission from Minmin Gong : Msvc defines _M_ARM for arm target, but it doesn't have x87 control word. Need to disable it to prevent some compiling problems. -- messages: 333821 nosy: Minmin.Gong priority: normal pull_requests: 11270 severity: normal status: open title: Disable

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread Kyle Evans
Kyle Evans added the comment: On Wed, Jan 16, 2019 at 5:47 PM Alexey Izbyshev wrote: > > Hi, > > > As a disclaimer, I'm a FreeBSD developer interested in making sure we're > > doing the right thing here. =) > > > May I ask what the above assessment is based on, and specifically what we > >

[issue35757] slow subprocess.Popen(..., close_fds=True)

2019-01-16 Thread Kirill Kolyshkin
New submission from Kirill Kolyshkin : In case close_fds=True is passed to subprocess.Popen() or its users (subprocess.call() etc), it might spend some considerable time closing non-opened file descriptors, as demonstrated by the following snippet from strace: close(3)=

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: David, the What's New note about weak references no longer being possible should be removed as part of this change. I'm not sure the note on arbitrary attributes no longer being addable is needed either (__setattr__ blocked that beforehand, it's just even

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-16 Thread bryan.koch
bryan.koch added the comment: I understood the PEP to include `return expr` in the iteration values as per the first bullet of the proposal. > Any values that the iterator yields are passed directly to the caller. This bullet doesn't have any additional formatting on the word "yields" so I

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The one in PR 11583 is twice as fast: >timeit for -> >topsort([(2,11),(9,11),(9,8),(9,10),(10,11),(10,3),(11,7),(11,5),(8,7),(8,3)]) 12.4 µs ± 59.1 ns per loop (mean ± std. dev. of 7 runs, 10 loops each) >timeit for ->

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The one in PR 11583 is twice as faster: >timeit for -> >topsort([(2,11),(9,11),(9,8),(9,10),(10,11),(10,3),(11,7),(11,5),(8,7),(8,3)]) 12.4 µs ± 59.1 ns per loop (mean ± std. dev. of 7 runs, 10 loops each) >timeit for ->

[issue35754] When writing/closing a closed Popen.stdin, I get OSError vs. BrokenPipeError randomly or depending on bufsize

2019-01-16 Thread Eryk Sun
Change by Eryk Sun : -- components: +IO, Interpreter Core, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior versions: +Python 3.8 ___ Python tracker

[issue35754] When writing/closing a closed Popen.stdin, I get OSError vs. BrokenPipeError randomly or depending on bufsize

2019-01-16 Thread Eryk Sun
Eryk Sun added the comment: If I'm right, we can reduce your example down as follows: import os import subprocess import time import ctypes RtlGetLastNtStatus = ctypes.WinDLL('ntdll').RtlGetLastNtStatus RtlGetLastNtStatus.restype = ctypes.c_ulong msys =

[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread ppperry
ppperry added the comment: You have to step into the eval for the error to be raised. -- ___ Python tracker ___ ___

[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread Henry Chen
Henry Chen added the comment: Hmm, the example works for me (Python 3.6.5): >>> import pdb >>> class FakeContainer: ... def __getitem__(self, key): ... raise KeyError(key) ... >>> pdb.run("eval('1+1',{},FakeContainer())") > (1)() (Pdb) c >>> As for exec/eval accepting an

[issue35747] Python threading event wait influenced by date change

2019-01-16 Thread ido k
ido k added the comment: thanks @pablogsal. looks like duplicate of bugs.python.org/issue23428 It seems like i cant trust the threading wait function and need to use busy waiting. -- resolution: -> duplicate ___ Python tracker

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks. I have some API nits to work to make this more broadly useful. I'll all those on the PR comments soonish :-) -- ___ Python tracker

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -11268 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -11267, 11268 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: You say: > The PEP reads as if returning a value via StopIteration was meant to signal > that the generator was finished and that StopIteration.value was the final > value. To me, the PEP is clear that `return expr` is equivalent to `raise

[issue35751] traceback.clear_frames manages to deadlock a background task

2019-01-16 Thread Taras Voinarovskyi
Taras Voinarovskyi added the comment: For now, it seems like ``copy.copy(exception)`` before raising seems to prevent this behaviour. So for all exceptions originating from background tasks I raise a copy to the user, rather than the original exception. It prints correct stack, so no real

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Would it make sense to use os.confstr('CS_PATH') instead of a hardcoded path, or is identical behavior on all POSIX platforms preferred to that? -- nosy: +izbyshev ___ Python tracker

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is an implementation that I've used for years. It is somewhat shorter than the one in PR 11583: class CycleError(LogicalError, ValueError): """dependencies cycle detected """ def tsort(pairs): """topological sort Just like unix

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > One of the issue that I have with using posix_spawn() is that the *exact* > behavior of subprocess is not properly defined by test_subprocess. Should we > more more tests, or document that the exact behavior is "an implementation > detail"? Regarding

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch pull_requests: +11266, 11267 stage: -> patch review ___ Python tracker ___

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch, patch pull_requests: +11266, 11267, 11268 stage: -> patch review ___ Python tracker ___

[issue17005] Add a topological sort algorithm

2019-01-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +11266 stage: -> patch review ___ Python tracker ___ ___

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48064/subprocess_curdir.py ___ Python tracker ___ ___ Python-bugs-list

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: I wrote attached execv_curdir.py to check if os.execv() tries to find the executable in the current directory if it doesn't contain a directory: yes, it does. $ python3 execv_curdir.py execv() searchs in the current directory I also wrote attached

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > Hi, > As a disclaimer, I'm a FreeBSD developer interested in making sure we're > doing the right thing here. =) > May I ask what the above assessment is based on, and specifically what we > need to address? Hello, Kyle! That assessment is based on my

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-16 Thread Bryan Koch
New submission from Bryan Koch : Using the new "`return value` is semantically equivalent to `raise StopIteration(value)`" syntax created in PEP-380 (https://legacy.python.org/dev/peps/pep-0380/#formal-semantics) causes the returned value to be skipped by standard methods of iteration. The

[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-16 Thread STINNER Victor
New submission from STINNER Victor : Currently, posixpath.defpath is equal to: defpath = ':/bin:/usr/bin' It gives 3 directories: >>> posixpath.defpath.split(posixpath.pathsep) ['', '/bin', '/usr/bin'] where the empty string means "the current directory". Trying to locate an executable

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8c349565e8a442e17f1a954d1a9996847749d778 by Victor Stinner in branch 'master': Revert "bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)" (GH-11582) https://github.com/python/cpython/commit/8c349565e8a442e17f1a954d1a9996847749d778

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > One of the issue that I have with using posix_spawn() is that the *exact* > behavior of subprocess is not properly defined by test_subprocess. Should we > more more tests, or document that the exact behavior is "an implementation > detail"? I guess

[issue31267] threading.Timer object is affected by changes to system time: Python locks should use a monotonic clock if available

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: I'm sorrry, I read the issue too quickly and misunderstood it. I guess that it's a duplicate of bpo-23428: "Use the monotonic clock for thread conditions on POSIX platforms". This issue is blocked the libc... --

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread ppperry
ppperry added the comment: Sorry, looks like I was wrong about it being a duplicate. The actual bug appears to be "doctest can't run on a module that contains un-unwrappable objects", which there probably is an issue for but I don't know what it is. --

[issue35747] Python threading event wait influenced by date change

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think this is becase at the end, the threading code calls sem_timedwait(thelock, ) where is the timespect structure. The manpage of sem_timedwait says: ... The timeout shall expire when the absolute time specified by abs_timeout passes, as

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: One of the issue that I have with using posix_spawn() is that the *exact* behavior of subprocess is not properly defined by test_subprocess. Should we more more tests, or document that the exact behavior is "an implementation detail"? I guess that the best

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: Oh... Using directly posix_spawnp() in subprocess to locate the executable in the PATH introduces subtle behavior changes... https://github.com/python/cpython/pull/11579/#pullrequestreview-193261299 -- ___ Python

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11263, 11264, 11265 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11263, 11264 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11263 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35754] When writing/closing a closed Popen.stdin, I get OSError vs. BrokenPipeError randomly or depending on bufsize

2019-01-16 Thread jimbo1qaz_ via Gmail
jimbo1qaz_ via Gmail added the comment: Popen._stdin_write() has comments linking to https://bugs.python.org/issue19612 and https://bugs.python.org/issue30418 . -- ___ Python tracker

[issue35754] When writing/closing a closed Popen.stdin, I get OSError vs. BrokenPipeError randomly or depending on bufsize

2019-01-16 Thread jimbo1qaz_ via Gmail
New submission from jimbo1qaz_ via Gmail : Windows 10 1709 x64, Python 3.7.1. Minimal example and stack traces at https://gist.github.com/jimbo1qaz/75d7a40cac307f8239ce011fd90c86bf Essentially I create a subprocess.Popen, using a process (msys2 head.exe) which closes its stdin after some

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Indeed, closed as duplicate of https://bugs.python.org/issue25532 -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread ppperry
ppperry added the comment: According to the error message, this is a duplicate of https://bugs.python.org/issue25532 -- nosy: +ppperry ___ Python tracker ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hi David, Can you provide a full reproducer? In your example, mocked_print is undefined. Please, provide a self-contained script that can be executed to test the behaviour. -- nosy: +pablogsal ___ Python

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread David Antonini
David Antonini added the comment: Apologies for initial malformed message, I hit submit prematurely. -- ___ Python tracker ___ ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread David Antonini
David Antonini added the comment: I'm having a problem with mock.call when I import it directly from unittest.mock. When I do: from unittest.mock import patch, mock_open, call mocked_print.assert_has_calls([ call("first print"), call("second print"), ]) I get: C:\Program

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread David Antonini
New submission from David Antonini : Ok so that's a pretty odd bug. I already had from unittest.mock import patch, mock_open so I simply modified that to from instead of doing mock.call in my test. Changing this to from unittest import mock and then mock.call fixed the error. from

[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread ppperry
ppperry added the comment: The thing is, though, that the same error occurs if a larger code being debugged calls `exec` or `eval` with such a mapping (`pdb.run("eval('1+1',{},FakeContainer())" also crashes with the same error), and the test suite contains code that evals other code in an

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread Yury Selivanov
Change by Yury Selivanov : -- stage: resolved -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread Yury Selivanov
Yury Selivanov added the comment: > You are right, the issue is "theoretical", I didn't see problems with current > implementation. > The self-pipe buffer is pretty big, a chance to reach its limit is relatively > low. Actually, I disagree. The problem manifests itself easily when you

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: Victor, thanks for the message. I forgot mentioned changes. You are right, the issue is "theoretical", I didn't see problems with current implementation. The self-pipe buffer is pretty big, a chance to reach its limit is relatively low. But a change to break

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Possibly relevant: https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition#Detailed_Description But the work is not complete. -- ___ Python tracker

[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread Henry Chen
Henry Chen added the comment: I agree that this behavior is normal, unless there is a use case for passing a partially implemented mapping object to pdb.run. However I cannot think of such a use case. -- ___ Python tracker

[issue13285] signal module ignores external signal changes

2019-01-16 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: For reference, the sources for my implementation: https://github.com/sagemath/cysignals/blob/master/src/cysignals/pysignals.pyx -- ___ Python tracker

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread Stefan Krah
Stefan Krah added the comment: Does it also work with -fno-inline, just for ppc64? There are other places in the sources where an inlined memcpy() could be miscompiled. -- ___ Python tracker

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: > This is a performance sensitive function, so I prefer not to add volatile. I don't suggest to use volatile. I'm just pointing to the function causing the bug and I said that volatile worked for me :-) I made my tests on: * Red Hat Enterprise Linux

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread Stefan Krah
Stefan Krah added the comment: This is a performance sensitive function, so I prefer not to add volatile. MSVC also had a bug with that function, but only in PGO mode. Microsoft has fixed the issue long ago. Do newer gcc versions have this issue? I'm fine with wrapping the entire macro in an

[issue35582] Argument Clinic: inline parsing code for functions with only positional parameters

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: I ran benchmarks on speed.python.org, it's the 5bb146aaea1484bcc117ab6cb38dda39ceb5df0f dot (Jan 13, 2019). I didn't look at results. -- ___ Python tracker

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35751] traceback.clear_frames manages to deadlock a background task

2019-01-16 Thread Yury Selivanov
Yury Selivanov added the comment: Very interesting. Thanks for reporting this issue. I'll definitely take a look at this before 3.8 is released. For 3.7 you'll likely have to find a workaround. -- ___ Python tracker

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch Added file: https://bugs.python.org/file48061/pack_single.patch ___ Python tracker ___

[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-01-16 Thread STINNER Victor
New submission from STINNER Victor : The bug was first reported on Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1540995 == FAIL: test_memoryview_struct_module (test.test_buffer.TestBufferProtocol)

[issue35674] Expose os.posix_spawnp()

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: FYI I modified subprocess to use os.posix_spawnp() when it's available: New changeset 07858894689047c77f9c12ddc061d30681368d19 by Victor Stinner in branch 'master': bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)

[issue35674] Expose os.posix_spawnp()

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: Well done Joannah Nanjekye :-) Thanks to Joannah for this nice enhancemenet and to all reviewers. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 07858894689047c77f9c12ddc061d30681368d19 by Victor Stinner in branch 'master': bpo-35537: subprocess can now use os.posix_spawnp (GH-11579) https://github.com/python/cpython/commit/07858894689047c77f9c12ddc061d30681368d19 --

[issue35751] traceback.clear_frames manages to deadlock a background task

2019-01-16 Thread Taras Voinarovskyi
Taras Voinarovskyi added the comment: So yes, the `clear_frames` function will force a running generator to close. See https://github.com/python/cpython/blob/3.7/Objects/frameobject.c#L566, it explicitly does a Finalize. Would that be the desired behaviour for assertRaises is not clear. I

[issue27015] subprocess.CalledProcessError's repr changes based on kwargs, and doesn't unpickle

2019-01-16 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I tried to fix the issue, the attached PR solves the issue of saving the kwargs and unpickling the exception but I was not able to fix a regression I caused in test_memory_error_in_PyErr_PrintEx. -- versions: +Python 3.6, Python 3.7, Python 3.8

[issue27015] subprocess.CalledProcessError's repr changes based on kwargs, and doesn't unpickle

2019-01-16 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch, patch pull_requests: +11260, 11261, 11262 stage: -> patch review ___ Python tracker ___

[issue27015] subprocess.CalledProcessError's repr changes based on kwargs, and doesn't unpickle

2019-01-16 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +11260, 11261 stage: -> patch review ___ Python tracker ___ ___

[issue27015] subprocess.CalledProcessError's repr changes based on kwargs, and doesn't unpickle

2019-01-16 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +11260 stage: -> patch review ___ Python tracker ___ ___

[issue35749] Rewrite asyncio signal handler

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: In short, attached PR reverts the following commit: commit fe5649c7b7bf52147480d6b1124a3d8e3597aee3 Author: Victor Stinner Date: Thu Jul 17 22:43:40 2014 +0200 Python issue #21645, Tulip issue 192: Rewrite signal handling Since Python 3.3,

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11257 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11257, 11258 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11257, 11258, 11259 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35674] Expose os.posix_spawnp()

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 92b8322e7ea04b239cb1cb87b78d952f13ddfebb by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-35674: Add os.posix_spawnp() (GH-11554) https://github.com/python/cpython/commit/92b8322e7ea04b239cb1cb87b78d952f13ddfebb --

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-01-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There are also some notes at https://tools.ietf.org/html/rfc3986#section-7.6 Because the userinfo subcomponent is rarely used and appears before the host in the authority component, it can be used to construct a URI intended to mislead a human user

[issue13285] signal module ignores external signal changes

2019-01-16 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > In Jeroen's API, I can see what the Python-level signal handler is, but > there's no way to find out whether that signal handler is actually in use or > not. I added support for that in the latest cysignals release. Now you can do >>> import signal >>>

[issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service

2019-01-16 Thread Christian Heimes
Christian Heimes added the comment: The bug is less critical and harder to exploit than I initially thought. td;dr if you have cert validation enabled and only trust public root CAs from CA/B forum, then you are not affected. The bug is only exploitable under two conditions: 1) The user has

[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no a crash. There is just an exception raised when you pass an inappropriate object as locals. This is an expected behavior, and I do not think that anything need to be changed. -- nosy: +serhiy.storchaka

[issue35750] process finished with exit code -1073740940 (0xc0000374)

2019-01-16 Thread Eryk Sun
Eryk Sun added the comment: A crash with the code STATUS_HEAP_CORRUPTION (0xC374) is due to a bug, not memory exhaustion. The bug may not be the fault of the interpreter or standard library if you're working with extension modules or ctypes. It's easy to corrupt the internal structures

[issue35750] process finished with exit code -1073740940 (0xc0000374)

2019-01-16 Thread STINNER Victor
STINNER Victor added the comment: You can enable faulthandler to get the Python traceback where the bug occurs. It might help a little bit. Either write the traceback into a file (file argument of faulthandler.enable()) or run your program in a terminal to see the traceback on the terminal.

[issue35750] process finished with exit code -1073740940 (0xc0000374)

2019-01-16 Thread Eric V. Smith
Eric V. Smith added the comment: I assume this is on Windows? 0xc374 is a heap corruption error on Windows. I agree that without a way to reproduce this it will be impossible to track down any error. -- nosy: +eric.smith ___ Python tracker

[issue35751] traceback.clear_frames manages to deadlock a background task

2019-01-16 Thread Тарас Войнаровський
New submission from Тарас Войнаровський : My use case: I have a background task, say called "coordination". In that task, I want to catch any errors and push those to the user waiting in the main task and only continue running the background coroutine after the user manually resolves the

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-01-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I just tested other implementations in Ruby and Go and they too return host as "evil.com" for "http://www.google@evil.com; along with the user info component. $ ruby -e 'require "uri"; puts URI("http://www.google@evil.com;).hostname'

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-01-16 Thread Christian Heimes
Christian Heimes added the comment: You cannot compare a low level library like Python's urllib module with a user interface like a modern browser. Browsers do a lot of extra work to make sense of user input. For example Firefox and Chrome mangle your example URL and replace \ with /.

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-01-16 Thread Neeraj Sonaniya
Neeraj Sonaniya added the comment: Hi, I know that \ (backslash) should be encoded to url encoding (%5c) but if the same url (without urlencoded form) typed into URL bar of browser we are getting hostname to 'https://www.google.com' -- ___

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-01-16 Thread Martin Panter
Martin Panter added the comment: FWIW I understand the backslash should be percent-encoded in URLs, otherwise the URL is not valid. This reminds me of a few other bugs: * Issue 30500: Made the behaviour of fragment (#. . .) versus userinfo (. . .@) consistent, e.g. in

[issue35749] Ignore exception if event loop wakeup pipe is full

2019-01-16 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch, patch, patch pull_requests: +11254, 11255, 11256 stage: -> patch review ___ Python tracker ___

  1   2   >