[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Yury Selivanov
Yury Selivanov added the comment: Fixed in https://hg.python.org/peps/rev/7ad183c1d9be I'll quote the commit message here: pep-492: Update benchmark code Since coroutines now have a distinct type, they do not support iteration. Instead of doing 'list(o)', we now do 'o.send(None)'

[issue5945] PyMapping_Check returns 1 for lists

2015-07-17 Thread Christian Barcenas
Changes by Christian Barcenas : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-07-17 Thread Martin Panter
Martin Panter added the comment: The original Python-ideas thread: If you want shorter field names, how about just r and w (as they are currently documented)? os.write(our_pipe.w, b"data") os.read(our_pipe.r, 1024) “Input” and “output” would also wor

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Alex Walters
Alex Walters added the comment: on 2.5, I figured the answer would be along those lines. for 2, Linking to the documentation at least would be helpful (or otherwise indicating that there are arguments that are not listed and are in the docs) if the arguments cant be listed reasonably easily.

[issue24563] Encoding declaration: doc supported encodings

2015-07-17 Thread Martin Panter
Martin Panter added the comment: PEP 263 doesn’t say exactly what encodings are supported. It mentions Shift JIS is supported, but UTF-16 is not. Only UTF-8 is allowed if the file starts with a UTF-8 BOM. I guess many of the Python-specific text encodings from the second section may be support

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Ned Deily
Ned Deily added the comment: > For what it's worth, the El Capitan Beta's apparently don't ship with > OpenSSL headers anymore though they do still ship with the dylibs. Hmm, I had tested installing existing python.org binary releases with the first DPs of 10.11 and I *thought* I had tested bui

[issue24658] open().write() fails on 2 GB+ data (OS X)

2015-07-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Extension Modules, IO -Interpreter Core nosy: +haypo, ned.deily, ronaldoussoren ___ Python tracker ___ _

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Donald Stufft
Donald Stufft added the comment: For what it's worth, the El Capitan Beta's apparently don't ship with OpenSSL headers anymore though they do still ship with the dylibs. -- ___ Python tracker _

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Ned Deily
Ned Deily added the comment: And the tradeoff for supplying private copies of newer OpenSSL libs with the Pythons installed by python.org OS X installers is that we would then need to solve the CA management problem for all users of those Pythons. So far there hasn't been a good solution to t

[issue24563] Encoding declaration: doc supported encodings

2015-07-17 Thread Martin Panter
Martin Panter added the comment: You can remove the “.. XXX” line; I understand it is just like a TODO comment, and with this fixed it would no longer be relevant. I suggest putting the links next to the sentence that ends “. . . the encoding name must be recognized by Python.” The links shou

[issue24658] open().write() fails on 2 GB+ data (OS X)

2015-07-17 Thread Eric O. LEBIGOT
Eric O. LEBIGOT added the comment: PS: I should have written "2 GB" bytearray (so this looks like a signed 32 bit integer issue). -- title: open().write() fails on 4 GB+ data (OS X) -> open().write() fails on 2 GB+ data (OS X) ___ Python tracker

[issue24658] open().write() fails on 4 GB+ data (OS X)

2015-07-17 Thread Eric O. LEBIGOT
New submission from Eric O. LEBIGOT: On OS X, the Homebrew and MacPorts versions of Python 3.4.3 raise an exception when writing a 4 GB bytearray: >>> open('/dev/null', 'wb').write(bytearray(2**31-1)) 2147483647 >>> open('/dev/null', 'wb').write(bytearray(2**31)) Traceback (most recent call la

[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-07-17 Thread takayuki
New submission from takayuki: I executed CGIHTTPServer and requested the following URI, "http://localhost:8000/cgi-bin/test.py?k=aa%2F%2Fbb"; to pass "aa//bb" as argument "k", but test.py received "aa/bb". I looked in CGIHTTPServer.py and found _url_collapse_path function discards continuous sla

[issue24655] _ssl.c: Missing "do" for do {} while(0) idiom

2015-07-17 Thread Brian Cain
Brian Cain added the comment: Whoops, that's not right. Corrected. -- Added file: http://bugs.python.org/file39942/ssl_convert_3rd.patch ___ Python tracker ___ _

[issue24655] _ssl.c: Missing "do" for do {} while(0) idiom

2015-07-17 Thread Brian Cain
Brian Cain added the comment: New patch. -- Added file: http://bugs.python.org/file39941/ssl_convert_2nd.patch ___ Python tracker ___

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2015-07-17 Thread David Steele
David Steele added the comment: Patch attached, to sort the desktop default browser to the top of _tryorder. -- keywords: +patch Added file: http://bugs.python.org/file39940/preferredbrowser.diff ___ Python tracker

[issue24656] remove "assret" from mock error checking

2015-07-17 Thread Ethan Furman
New submission from Ethan Furman: Per Nick's suggestion here is the patch to remove the "assret" check, but leave the "assert" check in place. As Terry summarized: > 1. It is false that 'assret' is necessarily a typo. Someone might quite > legitimately use it as an attribute. Aside from the fac

[issue24650] Error in yield expression documentation

2015-07-17 Thread swanson
swanson added the comment: Okay, interesting - I hadn't checked the glossary. I don't ultimately care what it's called as long as the documentation is clear and consistent. But for anyone just looking at the names of the classes and the class hierarchy, they'd come away saying, "A generator

[issue24655] _ssl.c: Missing "do" for do {} while(0) idiom

2015-07-17 Thread Martin Panter
Martin Panter added the comment: The patch is certainly an improvement and could be committed. It looks like the same fault is in the 3.4 and 2.7 code. However, since the usage of this macro is limited to the four lines immediately following its definition, it might be clearer to just drop the

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 06600287f11f by Steve Dower in branch '3.5': Issue #24642: Adds installer notes and links to What's New for 3.5 https://hg.python.org/cpython/rev/06600287f11f New changeset d6c91b8242d2 by Steve Dower in branch 'default': Issue #24642: Adds installe

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24650] Error in yield expression documentation

2015-07-17 Thread Martin Panter
Martin Panter added the comment: Technically, the glossary defines the unqualified term “generator” as the factory function: . (The 3.6 documentation should say the same but the build has been broken or out of date for a few months.) Th

[issue24655] _ssl.c: Missing "do" for do {} while(0) idiom

2015-07-17 Thread Brian Cain
New submission from Brian Cain: _ssl.c has a "convert()" macro which misuses the "do { ... } while(0)" pattern by accidentally omitting the "do". This was discovered when building with clang, it reports "while loop has empty body". Effectively, convert puts the body into gratuitous scope brac

[issue21258] Add __iter__ support for mock_open

2015-07-17 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Steve Dower
Steve Dower added the comment: > 1. This should be more prominently documented. Very true. I'll get a link to the updated docs page in there. > 2. passing /? should list the available kay-value arguments. Should be doable. I've mostly been holding off until I stop changing the arguments. At t

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: The fix for this uncovered more testing / scenarios that folk use mock_open for that were not accounted for. I'm reverting it from mock, and am going to roll-forward for Python: I should have a fix in a day or two and we can fix it more completely then. http

[issue24641] Log type of unserializable value when raising JSON TypeError

2015-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be better to change error message to mention the type only. Yet one argument is that the repr of affected object can be very large, while the type name usually is short enough. repr() even can raise an exception (e.g. MemoryError).

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Would it help to remove the offending bytes and then feed the bytes-object to > ZipFile? Yes, it will. import zipfile, struct, io with open('not_working.zip', 'rb') as f: data = f.read() i = data.rindex(b'PK\5\6') + 22 i += struct.unpack('

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: timeit(binary, 5, 3) timeit(abinary, 5, 3) gives me the same error running on Win 7 from Idle -- nosy: +terry.reedy stage: -> needs patch type: enhancement -> behavior ___ Python tracker

[issue24649] python -mtrace --help is wrong

2015-07-17 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24641] Log type of unserializable value when raising JSON TypeError

2015-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: A typical TypeError message use the following pattern: TypeError: 'int' object is not callable as it is the class, not the value, that is the problem. If the same is always true for the JSON TypeError, at the point of failure, then the dumps message could fol

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Yasar L. Ahmed
Yasar L. Ahmed added the comment: @Serhiy These files are inside another Zip-bundle exported from a commercial control software for chromatography (UNICORN 6+ by GE Healthcare). Some of the other Zip-Files in the bundle work fine but some (like this one) don't. I'm writing a script to extract/

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: The fork of OpenSSL that Apple ships also looks at the CA list in the Keychain. IIRC that cannot be disabled. BTW. Annoyingly this fork uses a private API to access the keychain, which means we couldn't optionally use this behavior when not using Apple's bin

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do we know exactly why OS X's OpenSSL accepts it? -- nosy: +ned.deily, pitrou, ronaldoussoren ___ Python tracker ___ ___

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Alexei Romanov
Alexei Romanov added the comment: 7z archiver could extract this ZIP archive without any problems: ~/tmp $ 7z x not_working.zip 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 p7zip Version 9.20 (locale=en_US.utf8,Utf16=on,HugeFiles=on,4 CPUs) Processing archive: not_working.z

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: not_working.zip has 85972 extra null bytes at the end. This doesn't look as common ZIP file, and adding support such files can be considered as new feature (if it is worth to do at all). How did you get this file Yasar? -- type: behavior -> enhanceme

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Marcin Szewczyk
New submission from Marcin Szewczyk: Using benchmark from the section https://www.python.org/dev/peps/pep-0492/#async-await raises: Traceback (most recent call last): File "./bench.py", line 28, in timeit(abinary, 19, 30) File "./bench.py", line 23, in timeit list(gen(depth)) TypeEr

[issue24644] --help for runnable stdlib modules

2015-07-17 Thread Ezio Melotti
Ezio Melotti added the comment: > writing tests for the CLI are a pain too It shouldn't be particularly difficult to do it using script_helper.assert_python_{ok|failure}(), even though you could also check the argument /parsing/ separately without having to launch a subprocess. -- nos

[issue24635] test_typing is flaky

2015-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: You can list me as the expert for typing.py, since I wrote it. :-) (However, until mid August I have limited availability since I'm on vacation.) This looks indeed like a test order dependency. The three failures are all basic failures where an empty set,

[issue23792] help crash leaves terminal in echo off mode

2015-07-17 Thread R. David Murray
R. David Murray added the comment: Well, not exactly. While the title was inaccurate, the real problem was the management of the subprocess, not what mode the terminal was in. -- ___ Python tracker __

[issue24644] --help for runnable stdlib modules

2015-07-17 Thread R. David Murray
R. David Murray added the comment: Yes, that's pretty much why things are in the state they are in ;) Still, opening individual issues for help problems with individual modules is the way to go, as you did (thank you). -- ___ Python tracker

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Alex Walters
Alex Walters added the comment: Having now worked with the new installer, there is nothing wrong with it, and provides sufficient scritpability, if that is a word. I only have two (and a half) thoughts on it: 1. This should be more prominently documented. The addition of the new web install

[issue24653] Mock.assert_has_calls([]) incorrectly passes

2015-07-17 Thread Robert Collins
Robert Collins added the comment: This might go back further, haven't checked 3.3, but IIRC we're only doing fixes on 3.4 up anyhow. -- nosy: +berker.peksag, kushal.das, michael.foord versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue24653] Mock.assert_has_calls([]) incorrectly passes

2015-07-17 Thread Robert Collins
New submission from Robert Collins: >From https://github.com/testing-cabal/mock/issues/243 from unittest import mock mmock = mock.MagicMock() mmock.foobar("baz") mmock.assert_has_calls([]) # No exception raised. Why?mmock.assert_has_calls(['x']) # Exception raised as expected. --- Traceback

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41d55ac50dea by Robert Collins in branch '3.4': Issue #21750: mock_open.read_data can now be read from each instance, as it https://hg.python.org/cpython/rev/41d55ac50dea New changeset 0da764c58322 by Robert Collins in branch '3.5': Issue #21750: mo

[issue24652] C-API Pure Embedding enhancement

2015-07-17 Thread Justin Huang
New submission from Justin Huang: >From the example in here: https://docs.python.org/2/extending/embedding.html#pure-embedding when directly using the example (compiling and trying with external file etc.) it doesn't work right away. Instead an extra line: PySys_SetArgv(argc, argv);

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Robert Collins
New submission from Robert Collins: We had a discussion on the list sparked by the assret checking, and in it I proposed that the API would be cleaner if the asserts were module functions. e.g. rather than:: a_mock.assert_called_with(Foo) assert_called_with(a_mock, Foo) Michael has object

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Robert Collins
Changes by Robert Collins : -- nosy: +berker.peksag, kushal.das, michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue23792] help crash leaves terminal in echo off mode

2015-07-17 Thread swanson
swanson added the comment: Changing the title in case anyone else is looking for this bug. This is not raw mode. It's just that echo is turned off. It is sufficient to type (invisibly, of course): stty echo to resume normal use of the terminal. -- nosy: +swanson title: help crash leav

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: Ok, so - good to commit to 3.4 and up? -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Berker Peksag
Berker Peksag added the comment: > There are already explicit tests for that Great, then the test is fine :) Thanks for writing the patch. -- ___ Python tracker ___

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: There are already explicit tests for that, do you want another one? -- ___ Python tracker ___ ___ Py