[issue27017] Python3.5.1: type().startswith()

2016-05-13 Thread Ray
New submission from Ray: This doesn't look like proper functionality Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> type('') >>> type('').startswith('s

[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Patch 3 looks good to me -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue27016] BlockingIOError not raised inside function.

2016-05-13 Thread Ned Deily
Ned Deily added the comment: What platform are you running this on and can you give a more detailed procedure for reproducing the problem you see? -- nosy: +ned.deily ___ Python tracker ___

[issue27016] BlockingIOError not raised inside function.

2016-05-13 Thread padraic cunningham
padraic cunningham added the comment: When the following code snippets are run from two separate shells, the code inside the function does not raise any error on the second call while the second snippet successfully raises a BlockingIOError on the second run: # No error raised. def func():

[issue27016] BlockingIOError not raised inside function.

2016-05-13 Thread padraic cunningham
New submission from padraic cunningham: When the following code snippets are run from two separate shells, the code inside the function does not raise any error on the second call while the second snippet successfully raises a BlockingIOError on the second run: # No error raised. def func():

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread Colm Buckley
Colm Buckley added the comment: @haypo - new version of patch attached with comments and references per your request. -- Added file: http://bugs.python.org/file42842/getrandom-nonblocking-v2.patch ___ Python tracker

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-05-13 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue27014] maximum recursion depth when using typing options

2016-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Ow, that's bad. :-( Great job reducing this to a minimal repro! I'm guessing it's got to do with registration. I'll try to figure out how to fix it; the fix should appear in Python 3.5.2. -- assignee: -> gvanrossum __

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread paul czyzewski
paul czyzewski added the comment: >If you use the arrow keys to select and copy as you go, you still have > to hit tab twice to close the box (or click elsewhere). Not for me. If i use arrow keys then I just type "()" and the box disappears. So there's two(?) fewer keystrokes needed if you us

[issue27014] maximum recursion depth when using typing options

2016-05-13 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Thankyou for testing this Meador, it increases my confidence in my code. I’ll try to commit this soon if there are no objections. -- stage: patch review -> commit review ___ Python tracker

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread STINNER Victor
STINNER Victor added the comment: Please elaborate the comment in the patch: - explain that the RNG is not initialized yet with enough entropy - add a referénce to this issue - explain that it's a deliberate choice to use weak (non initialized) RNG for practical reasons --

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: When the correct item is highlighted, hit tab once to copy it to the text, hit tab a second time to close the box. If you use the arrow keys to select and copy as you go, you still have to hit tab twice to close the box (or click elsewhere). --

[issue23749] asyncio missing wrap_socket (starttls)

2016-05-13 Thread Yury Selivanov
Yury Selivanov added the comment: I'll create a PR on the GitHub for this. I like the proposed design, and I've implemented an SSL test micro-framework that we can use to test starttls in asyncio. -- ___ Python tracker

[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-05-13 Thread Yury Selivanov
Yury Selivanov added the comment: OK, I'll see what I can do (this is some code that I don't know/use). -- ___ Python tracker ___ ___

[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Yury can you take this on? -- assignee: -> yselivanov ___ Python tracker ___ ___ Python-bugs-list

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread paul czyzewski
paul czyzewski added the comment: hi Terry, thanks for all the responses. Well, what *I* found maddening was that typing "os." pause "g" works but typing "os.g" (with no pause) does nothing. :) But, anyway, I guess you're saying that that's as designed. >The list is not supposed to shrin

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: The time delay and popup is only after a key letter, like '.' or '"'. Having the box appear whenever one pauses would be maddening. I have the delay set to .1 second. The list is not supposed to shrink. Having everything disappear on a typo would not seem g

[issue21261] Teach IDLE to Autocomplete dictionary keys

2016-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. Being on Windows, I never paid attention to rlcompleter. The big difference is that IDLE completions use IDLE's hyperparser module (which is used for other purposes also). I will look at the tests. -- ___

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread paul czyzewski
paul czyzewski added the comment: hi Tal and Terry, I hadn't noticed that continuing to type does go to the appropriate spot. However, I see what I think are two or three bugs (not sure is 'a)' is a bug) in the behavior: a) on my system it does not visibly filter the list. EG, if I type

[issue27010] email library could "recover" from bad mime boundary like (some?) email clients do

2016-05-13 Thread Maciej Szulik
Changes by Maciej Szulik : -- nosy: +maciej.szulik ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread Colm Buckley
Colm Buckley added the comment: See https://lwn.net/Articles/606141/ for an explanation of the blocking behavior of getrandom(). This makes sense to me - before the pool has initialized, /dev/urandom will be readable but will return highly predictable data - ie: it should not be considered saf

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

2016-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a problem not only with CalledProcessError, but with all custom exceptions with overridden __init__. BaseException.__new__ saves positional arguments as the "args" attribute, but ignores keyword arguments. repr() and pickle use "args". -- no

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 148757a88f19 by Yury Selivanov in branch '3.5': Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input. https://hg.python.org/cpython/rev/148757a88f19 New changeset f5e69e2f50d7 by Yury Selivanov in branch 'default': Merge 3.5 (iss

[issue26293] Embedded zipfile fields dependent on absolute position

2016-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this may be a bug. After appending all offsets are absolute file positions. Here is a patch that presumably fixes this issue. Unfortunately I can't write tests for this issue. ZipFile is too lenient and all written tests are passes with unpatched code.

[issue8886] zipfile.ZipExtFile is a context manager, but that is not documented

2016-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset ae50bf6e3ac8 by Serhiy Storchaka in branch '3.5': Restored test_interleaved. After issue #8886 it was a duplicate of https://hg.python.org/cpython/rev/ae50bf6e3ac8 New changeset 62d844d2bd07 by Serhiy Storchaka in branch 'default': Restored test_int

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

2016-05-13 Thread Taywee
New submission from Taywee: When using kwargs to construct a CalledProcessError, the repr doesn't show those args, and using kwargs also breaks pickling: >>> import pickle; from subprocess import CalledProcessError >>> CalledProcessError(2, 'foo') CalledProcessError(2, 'foo') >>> CalledProcessE

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread Colm Buckley
Colm Buckley added the comment: @haypo - yes, it's strange that Linux's getrandom() might block even when reading the urandom pool. However, I think we need to just cope with this and add the GRND_NONBLOCK flag rather than attempting to force a change in the Linux kernel -- _

[issue26920] android: test_sys fails

2016-05-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: > On Android, os.fsdecode(os.fsencode('\xe6')) does not raise UnicodeError in > the test.support module. Because of changeset ad6be34ce8c9. -- ___ Python tracker

[issue26992] 64-bit Python 2.7.11 hangs in 64-bit Windows 10 - CMD and Git Bash

2016-05-13 Thread Steve Dower
Steve Dower added the comment: I wonder if it's related to issue26882? Seems unlikely as they are very different versions, but it's possible. -- ___ Python tracker ___ _

[issue26998] Unable to import "site" in an embedded application

2016-05-13 Thread Steve Dower
Steve Dower added the comment: The PEP doesn't really apply to 2.7, apart from explicitly expecting tools to still detect 32-bit and 64-bit versions despite sys.winver being the same. As for sys.winver being incorrect in 2.7.11, that's been fixed (issue25824), but wasn't deemed critical enough

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread Colm Buckley
Colm Buckley added the comment: A couple of things to note: * Despite the earlier title; this does not just apply to VMs; any system with a potentially-blocking getrandom() (including all Linux 3.17+ and Solaris 11+) is affected. * It's true that getrandom() only blocks on Linux when called b

[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-05-13 Thread David Coles
David Coles added the comment: Since I reported this, I haven't seen any proposed solutions other other than a retry loop to ensure that the lock is guaranteed to be reacquired when the sleeping coroutine is woken. The four possibilities of cancelling the waiting coroutine are: 1. Before wait

[issue21261] Teach IDLE to Autocomplete dictionary keys

2016-05-13 Thread Martin Panter
Martin Panter added the comment: I have no idea how IDLE works internally, but I wonder if it is possible to share some of the work with the Readline completer (rlcompleter module). Despite the name, rlcompleter should be usable without also using Readline, though recently (Issue 25660) I thin

[issue5062] Rlcompleter.Completer does not use __dir__ magic method

2016-05-13 Thread Martin Panter
Changes by Martin Panter : -- components: +Library (Lib) -Documentation, Extension Modules ___ Python tracker ___ ___ Python-bugs-list

[issue5062] Rlcompleter.Completer does not use __dir__ magic method

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Issue 14782 is open for complaints about the opening brackets. I think this report was mainly about attributes that fail the hasattr() test. In Issue 25590 we were conservative and only fixed it in 3.6+. -- nosy: +martin.panter resolution: -> duplicate

[issue27014] maximum recursion depth when using typing options

2016-05-13 Thread Roy Shmueli
New submission from Roy Shmueli: While creating class of List and using a Optional as part of the typing system. I have got an error when I was importing one of my module. I was able to simplify the problem by creating a one module that replicate the crash. -- files: bug.py messages: 2

[issue14782] Tab-completion of callables displays opening paren

2016-05-13 Thread Martin Panter
Martin Panter added the comment: FWIW, count me against the automatic brackets as well. Another way it gets in the road: >>> class C(object(. . . In Issue 5062, Carl thought there might be a switch to turn the behaviour off. Perhaps we could add some sort of configuration option. --

[issue22143] rlcompleter.Completer has duplicate matches

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Actually more like Issue 25590 (this was about attribute names, not global names) -- superseder: Make rlcompleter avoid duplicate global names -> tab-completition on instances repeatedly accesses attribute/descriptors values ___

[issue22143] rlcompleter.Completer has duplicate matches

2016-05-13 Thread Martin Panter
Martin Panter added the comment: I think this was fixed by Issue 25663. (Sorry I wasn’t aware of the work already done here.) -- nosy: +martin.panter resolution: -> out of date status: open -> closed superseder: -> Make rlcompleter avoid duplicate global names ___

[issue22141] rlcompleter.Completer matches too much

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Maybe there are two special cases colliding here: 1. complete("A.foo", 0) returns "A.foo(". But the opening bracket is in readline.get_completer_delims(), which means the completer has suggested not only a “word” but also a delimiter. 2. Perhaps Lorenz has tak

[issue26092] doctest should allow custom sys.displayhook

2016-05-13 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: > What problem does replacing __displayhook__ provoke? I don't know for sure. But the documentation says "These objects contain the original values of displayhook and excepthook at the start of the program." So, other code in stdlib may assume something

[issue27013] IDLE completion for dict keys

2016-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: #21261 has a patch that I have not looked at. Comment and review welcome. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Teach IDLE to Autocomplete dictionary keys ___ Python

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks Paul, that will probably be helpful somehow. I was expecting the opposite. H. Box comes up after cntl-space or time delay after key char. I have time delay much shorter than default. I do what Tal said -- type a couple of letters, then sometim

[issue26920] android: test_sys fails

2016-05-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: > test_ioencoding_nonascii does not fail when LANG is set to en_GB.UTF-8 in the > environment. When LANG is not set, we have on an android emulator: >>> from test.support import FS_NONASCII >>> print(FS_NONASCII) Traceback (most recent call last): File "", l

[issue19992] subprocess documentation not explicit about fileno()

2016-05-13 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-b

[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Where would you draw the line though? At one extreme, BufferedWriter is a wrapper, but if you removed BufferedWriter.fileno() it would break all the code that does with open(os.devnull, "wb") as null: proc = subprocess.Popen(..., stdout=null) Would you rem

[issue26920] android: test_sys fails

2016-05-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: test_ioencoding_nonascii does not fail when LANG is set to en_GB.UTF-8 in the environment. -- ___ Python tracker ___ __

[issue26919] android: test_cmd_line fails

2016-05-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch updated after vadmium review. -- Added file: http://bugs.python.org/file42839/retrofit_osx_2.patch ___ Python tracker ___

[issue26039] More flexibility in zipfile write interface

2016-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 175c3f1d0256 by Serhiy Storchaka in branch 'default': Issue #26039: zipfile.ZipFile.open() can now be used to write data into a ZIP https://hg.python.org/cpython/rev/175c3f1d0256 -- ___ Python tracker

[issue22274] subprocess.Popen(stderr=STDOUT) fails to redirect subprocess stderr to stdout

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch Akira. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue26039] More flexibility in zipfile write interface

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Yes this looks okay to me, so go ahead. My only concern was other methods affecting the file position while in the middle of writing, but it looks like those methods maintain separate objects like self.filelist, so there is no conflict. -- ___

[issue26919] android: test_cmd_line fails

2016-05-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: This patch follows Victor suggestion in msg230407 and brings the changes made in issue #4388 and issue #16416 to the Android platform. As a consequence, it adds a new test for Android in test_cmd_line named test_osx_android_utf8 (was previously test_osx_utf8).

[issue27013] IDLE completion for dict keys

2016-05-13 Thread Tal Einat
New submission from Tal Einat: I just wanted to mention that I once added this feature to IDLE and it's really great for interactive work, especially with data structures such as tables or JSON. If there's ever interest, I can try to hunt down my old code. -- components: IDLE messages:

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-05-13 Thread Tal Einat
Tal Einat added the comment: Regarding your questions about completion behavior: You don't have to scroll, you can continue typing and the completion list will filter itself to options that match the additional characters. Deleting characters works too (options reappear in the list). The seco

[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2016-05-13 Thread Jonas H.
Jonas H. added the comment: I just hit this too. I'd say remove the fileno() method from wrapper objects like GzipFile. I'm happy to submit a patch. -- nosy: +jonash ___ Python tracker

[issue26892] debuglevel not honored in urllib

2016-05-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thank you for the patch, Chi Hsuan Yen. -- assignee: -> orsenthil resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker __

[issue26892] debuglevel not honored in urllib

2016-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63e23b2dedcc by Senthil Kumaran in branch '3.5': Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler. https://hg.python.org/cpython/rev/63e23b2dedcc New changeset e0ec68d46464 by Senthil Kumaran in branch 'default': merge from 3.5 http

[issue26839] Python 3.5 running in a virtual machine with Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-13 Thread Colm Buckley
Colm Buckley added the comment: The attached patch (against 20160330) addresses the issue for me on Linux; it has not been tested on other platforms. It adds the GRND_NONBLOCK flag to the getrandom() call and sends the appropriate failure return if it returns due to lack of entropy. The enclos

[issue22274] subprocess.Popen(stderr=STDOUT) fails to redirect subprocess stderr to stdout

2016-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 642933771fa5 by Martin Panter in branch '3.5': Issue #22274: Redirect stderr=STDOUT when stdout not redirected, by Akira Li https://hg.python.org/cpython/rev/642933771fa5 New changeset 5979e7aadd59 by Martin Panter in branch 'default': Issue #22274: