[issue23796] BufferedReader.peek() crashes if closed

2015-04-01 Thread John Hergenroeder
John Hergenroeder added the comment: Thanks for the feedback, Berker! I've added a test case that closes a buffered reader and then attempts to both peek and read1 it. I tacked it onto the end of the BufferedReaderTest class in test_io, but let me know if there's a better place to put it.

[issue23843] ssl.wrap_socket doesn't handle virtual TLS hosts

2015-04-01 Thread John Nagle
New submission from John Nagle: ssl.wrap_socket() always uses the SSL certificate associated with the raw IP address, rather than using the server_host feature of TLS. Even when wrap_socket is used before calling connect(port, host), the host parameter isn't used by TLS. To get proper TLS

[issue23731] Implement PEP 488

2015-04-01 Thread Steve Dower
Steve Dower added the comment: I don't actually see any essential changes. The bdist_wininst and bdist_msi changes are just for usage help, and presumably they'll go from do not compile .py to .pyo (optimized) to do not compile .py to optimized .pyc. I'd prefer to leave the .pyo file

[issue23588] Errno conflicts in ssl.SSLError

2015-04-01 Thread John Nagle
John Nagle added the comment: If SSL error reporting is getting some attention, something should be done to provide better text messages for the SSL errors. All certificate verify exceptions return the string certificate verify failed (_ssl.c:581). The line number in _ssl.c is not

[issue23731] Implement PEP 488

2015-04-01 Thread Paul Moore
Paul Moore added the comment: A few minor review comments. Nothing substantial, tbh. Looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___

[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function

2015-04-01 Thread STINNER Victor
STINNER Victor added the comment: Obviously, an unit test is missing ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___

[issue23830] Add AF_IUCV support to sockets

2015-04-01 Thread Neale Ferguson
Neale Ferguson added the comment: Updated patch - Removes tabs - Strips name/user/node returned by connect - Checks lengths of name/user/node -- Added file: http://bugs.python.org/file38788/af_iucv.patch ___ Python tracker rep...@bugs.python.org

[issue23830] Add AF_IUCV support to sockets

2015-04-01 Thread Neale Ferguson
Neale Ferguson added the comment: Corrected a length error in the strip routine Initialized the end of string indicator -- Added file: http://bugs.python.org/file38789/af_iucv.patch ___ Python tracker rep...@bugs.python.org

[issue23796] BufferedReader.peek() crashes if closed

2015-04-01 Thread STINNER Victor
STINNER Victor added the comment: John Hergenroeder added the comment: my assumption is that a 0-length read on a closed BufferReader should fail, not return an empty bytestring. I agree. -- ___ Python tracker rep...@bugs.python.org

[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function

2015-04-01 Thread Matthias Klose
Matthias Klose added the comment: casting to a long works ... os.major(long(os.makedev(8,65))) 8 so maybe revert that optimization for the released branches? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842

[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function

2015-04-01 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing

[issue23756] Tighten definition of bytes-like objects

2015-04-01 Thread Martin Panter
Martin Panter added the comment: I will to pull the stdtypes.rst changes out into a separate patch and issue, if that will make review easier. I think they are an improvement because the previous version was incorrect and misleading, but they are probably not necessary for people to

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: I believe it goes here under the TestTokenize class. Going to give it a shot now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___

[issue9026] argparse subcommands not printed in the same order they were added

2015-04-01 Thread ddve...@ucar.edu
ddve...@ucar.edu added the comment: This problem is occurring again in python 2.7.7, can we open it again? -- nosy: +ddve...@ucar.edu ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9026 ___

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread STINNER Victor
STINNER Victor added the comment: ITSM it's not the TextIOWrapper but the detect_encoding fails and throws an error. Oh, right. But TextIOWrapper can fail for differen reasons. For example, CTRL+c may send KeyboardInterrupt. Try for example: with unittest.mock.patch.object(tokenize,

[issue23796] BufferedReader.peek() crashes if closed

2015-04-01 Thread Martin Panter
Martin Panter added the comment: New patch with tests looks good to me. The BufferedReaderTest class is a sensible place for the test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23796

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: Comparing to introom. Any reason to not wrap the entire in a try? Attached patch. -- nosy: +itsmemattchung Added file: http://bugs.python.org/file38793/issue23840.patch ___ Python tracker rep...@bugs.python.org

[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed

2015-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3c7ae99b8e0 by Victor Stinner in branch 'default': Issue #23834: Modify socket.sendall() to reuse sock_call() with https://hg.python.org/cpython/rev/b3c7ae99b8e0 -- ___ Python tracker

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: Curious, @haypo, are you looking for a new unittest or a function within an existing unit test? Perhaps go under TestTokenize? 1227 def test_main(): 1228 from test import test_tokenize 1229 support.run_doctest(test_tokenize, True) 1230

[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function

2015-04-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, this is a catch when backport to 2.7. Here is a patch that makes dev_t converter to support int and int-like types. Added tests (surprisingly there were no tests for makedev/major/minor at all). so maybe revert that optimization for the released

[issue23844] test_ssl: fails on recent libressl version with BAD_DH_P_LENGTH

2015-04-01 Thread Cédric Krier
New submission from Cédric Krier: Since [1], libressl fails if DH keys are too small (1024). Here is a patch to increase the dh keys to 1024 for the tests. [1] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/ssl/s3_clnt.c?rev=1.108content-type=text/x-cvsweb-markup --

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread shiyao.ma
shiyao.ma added the comment: ITSM it's not the TextIOWrapper but the detect_encoding fails and throws an error. So I wrapped a try/catch block around that. -- keywords: +patch nosy: +introom Added file: http://bugs.python.org/file38792/tokenize.patch

[issue23839] Clear caches after every test

2015-04-01 Thread Robert Collins
Robert Collins added the comment: I'd like to see a definite profile of a bloated stdlib test process before we assume we know the issue - the usual leak I see in test code is used test objects, and I'm not sure we've ported the usual fix for that into unittest yet (we should). As far as

[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function

2015-04-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___

[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed

2015-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 358a2bcd0d0b by Victor Stinner in branch 'default': Issue #23834: Add sock_call() helper function https://hg.python.org/cpython/rev/358a2bcd0d0b -- nosy: +python-dev ___ Python tracker

[issue23839] Clear caches after every test

2015-04-01 Thread Robert Collins
Robert Collins added the comment: +1 on moving to the summary classes rather than actual tracebacks in unittest. (Or perhaps even just serialised tracebacks like we do in testtools). -- ___ Python tracker rep...@bugs.python.org

[issue23845] test_ssl: fails on recent libressl with SSLV3_ALERT_HANDSHAKE_FAILURE

2015-04-01 Thread Cédric Krier
New submission from Cédric Krier: SSLv3 has been deactivated by default [1], as stated in the commit message it can be reactivated by clearing the option. So here is a patch that reactivate it in the test when needed. [1] http://marc.info/?l=openbsd-cvsm=141339479327258w=2 -- files:

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread shiyao.ma
shiyao.ma added the comment: On Wed, Apr 1, 2015 at 6:18 PM, STINNER Victor rep...@bugs.python.org wrote: Oh, right. But TextIOWrapper can fail for differen reasons. For example, CTRL+c may send KeyboardInterrupt. Yes. Any comment on the test? I wil update a second patch. Regards. --

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread STINNER Victor
STINNER Victor added the comment: Yes. Any comment on the test? Yes, as I wrote, I reviewed patches. You may get a notification by email. Anyway, it's here: http://bugs.python.org/review/23840/diff/14417/Lib/test/test_tokenize.py (I also commented tokenize.py) --

[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed

2015-04-01 Thread STINNER Victor
STINNER Victor added the comment: Snow Leopard doesn't like me (or the opposite?), the changeset 358a2bcd0d0b introduced a regression. I'm unable to reproduce, I ran test_socket on Linux (3.18), Mac OS X (Yosemite, Mac OS X 10.10) and FreeBSD (10). I don't see a significant difference in

[issue23376] getargs.c: redundant C-contiguity check

2015-04-01 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23376 ___ ___ Python-bugs-list

<    1   2