[issue23863] Fix EINTR Socket Module issues in 2.7

2016-04-03 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue13285] signal module ignores external signal changes

2016-04-03 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue26257] Eliminate buffer_tests.py

2016-04-03 Thread Martin Panter
Martin Panter added the comment: I see what you meant about making the diff smaller. However in your patch you also moved three extra methods into BaseTest: test_additional_(r)split() and test_strip(). I prefer to handle these three methods in a separate patch that deals with test_bytes.Bytes

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-03 Thread Sylvain Corlay
Sylvain Corlay added the comment: New version of the patch using the context manager. -- Added file: http://bugs.python.org/file42363/has_flag.diff ___ Python tracker ___ ___

[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Playing with Steven and Paul’s patches, they both seem to work well. Paul’s seems to have debug printing included, which should be removed. I confirmed both patches also seem to address the nargs="?" case (Issue 24223). At the moment I have zero knowledge of ho

[issue6953] readline documentation needs work

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Here is v3 which adds “. . . in the underlying library” for all the function and variable references. -- Added file: http://bugs.python.org/file42362/readline-doc.v3.patch ___ Python tracker

[issue24911] Context manager of socket.socket is not documented

2016-04-03 Thread Martin Panter
Martin Panter added the comment: FWIW I discovered that socket.close() or __exit__() does not actually raise exceptions for cases like EBADF, see Issue 26685. -- ___ Python tracker

[issue26685] Raise errors from socket.close()

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Here is socket.close.v2.patch which hopefully fixes the test for Windows (still untested by me though) -- Added file: http://bugs.python.org/file42361/socket.close.v2.patch ___ Python tracker

[issue26685] Raise errors from socket.close()

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Victor suggested making these errors be reported by the finalize method (garbage collection). I started investigating this, but faced various test suite failures (test_io, test_curses), as well as many new unhandled exceptions printed out during the tests which

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Jason Madden
Jason Madden added the comment: I'm sorry, I'm still not following the argument that `write` is likely to return nothing. `RawIOBase` and `BufferedIOBase` both document that `write` must return the number of written bytes; if you don't return that, you break anything that assumes you do, as do

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Martin Panter
Martin Panter added the comment: My worry was that it is easy to make a write() method that does not return anything, but is still useful in most cases. Since BufferedIOBase.write() has to guarantee to write everything, it may not seem important to return a value. But we could explicitly check

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Jason Madden
Jason Madden added the comment: `self.stdin` and `self.stderr` are documented to be `wsgi.input` and `wsgi.errors`, which are both described as "file-like" objects, meaning that the `write` method should return bytes written. It seems like the same could reasonably be said to be true for `self

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Jason Madden
Jason Madden added the comment: Is there an expected `self.stdout` implementation that doesn't return the number of bytes it writes? `sys.stdout` does, as does `io.RawIOBase`. It doesn't seem clear to me that practically speaking there's a compatibility problem with requiring that for `self.st

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Okay now I see the conflict. The use of WSGIRequestHandler with wbufsize = 0 was the missing key. I see two possible solutions: 1. Change SimpleHandler._write() to allow self.stdout to be a RawIOBase writer, and loop over stdout.write() until all the data is wr

[issue1346874] httplib simply ignores CONTINUE

2016-04-03 Thread Patrick J McNerthney
Patrick J McNerthney added the comment: "(though I don’t understand why Apache doesn’t renegotiate while the request body is being sent)" Apache does attempt to do this, but HttpsConnection is immediately sending the body of the request as fast as the socket will allow, which fills up the SSL

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Jason Madden
Jason Madden added the comment: Django uses a `wsgiref.simple_server` to serve requests, which in turn uses `socketserver.StreamRequestHandler` to implement its `WSGIRequestHandler`. That base class explicitly turns off buffering for writes (`wbufsize = 0` is the class default which gets passe

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-03 Thread Jason Madden
Jason Madden added the comment: gevent has another simple reproducer for this. I do believe it's not gevent's fault, the fault is in the standard library; SimpleHandler._write needs to loop until `sent += self.stdeout.write(data)` is `len(data)`. I have written up more on this at https://gith

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-03 Thread Jānis Šlapiņš
Jānis Šlapiņš added the comment: > that's why I'm choosing not to increase the complexity of my code I disagree about the classification of my proposal. This is not about increasing the complexity (changing algorithms, adding a new functionality and so on). It is just about getting the most ou

[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2016-04-03 Thread Dimitry Andric
Dimitry Andric added the comment: I am a FreeBSD committer, and I recently ran into this issue too, since I am working on an update of libc++ in the FreeBSD base system. As part of this work, we attempt to recompile all ports with the proposed change (see [1]). During such a recompile, we ge

[issue1346874] httplib simply ignores CONTINUE

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Thankyou, I think I understand your situation better now (though I don’t understand why Apache doesn’t renegotiate while the request body is being sent). I would still argue that this is a new feature to be added rather than a bug though, and should only go int

[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2016-04-03 Thread Stefan Krah
Stefan Krah added the comment: Ping. Just a reminder that it would be nice to get this into 3.6-alpha-1. :) -- ___ Python tracker ___

[issue26200] SETREF adds unnecessary work in some cases

2016-04-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reraised this issue on Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/156809 . -- ___ Python tracker ___ _

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-03 Thread Stefan Krah
Stefan Krah added the comment: I've been thinking about this, and I'm +1 for the change now. These structural typing issues for numbers come up regularly (see also msg257088), and the functions are so simple and self-explanatory that API-complexity does not really increase. In general, I under

[issue26479] Init documentation typo "may be return" > "may NOT be returned"

2016-04-03 Thread Samuel Colvin
Samuel Colvin added the comment: Sorry, I'm going mad, misread it. -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue21069] test_fileno of test_urllibnet intermittently fails

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Yes using select() would be another way to fix the immediate problem of read() returning None. In the long term I was hoping to use something like my patch to avoid the problems with reading the HTTP response (already discussed in this report) at the same time.

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-03 Thread SilentGhost
SilentGhost added the comment: I've left a comment on Rietveld -- nosy: +SilentGhost ___ Python tracker ___ ___ Python-bugs-list maili

[issue23735] Readline not adjusting width after resize with 6.3

2016-04-03 Thread Martin Panter
Martin Panter added the comment: Thanks for pointing that out Serhiy. It turns out sighandler_t is non-standard. My latest tweak seems to have fixed things. Also thankyou Eric for your persistence with this patch :) -- resolution: -> fixed stage: patch review -> resolved status: open

[issue23735] Readline not adjusting width after resize with 6.3

2016-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset e3f375047edf by Martin Panter in branch '3.5': Issue #23735: Avoid sighandler_t Gnu-ism https://hg.python.org/cpython/rev/e3f375047edf New changeset 0e576d094dc4 by Martin Panter in branch 'default': Issue #23735: Merge sighandler_t fix from 3.5 htt

[issue1346874] httplib simply ignores CONTINUE

2016-04-03 Thread Patrick J McNerthney
Patrick J McNerthney added the comment: Martin, My understanding of the intention of the "Expect: 100-continue" header would address being able to receive an error response that is determined solely from the http request headers sent. So I do think that that would be the proper way to address

[issue23551] IDLE to provide menu link to PIP gui.

2016-04-03 Thread Upendra Kumar
Upendra Kumar added the comment: I have one doubt about writing unittests for pip_gui. For writing the unittest what should I use as a test instance? For example, if we take particular pip package like : Flask Now, if I have to test the 'get_data_show()' function in temp_pip_v3.py (using the

[issue21069] test_fileno of test_urllibnet intermittently fails

2016-04-03 Thread STINNER Victor
STINNER Victor added the comment: I added a timeout because test_urllibnet fails with a timeout after 15 minutes on the ARM buildbot and other tests of the same file also use a timeout. I tried but failed to reproduce the timeout. I ran the test after my change and it passes so I considered th