[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
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 module timeit(abinary, 19, 30) File ./bench.py, line 23, in timeit list(gen(depth)) TypeError: 'coroutine' object is not iterable Am I missing something or is a correction needed in code or documentation? BTW, PEP 492 uses the term plain generator, but unlike generator-based coroutine or native coroutine it's not defined in section https://www.python.org/dev/peps/pep-0492/#glossary. I think adding a definition would be beneficial. -- assignee: docs@python components: Documentation, asyncio messages: 246856 nosy: docs@python, gvanrossum, haypo, wodny, yselivanov priority: normal severity: normal status: open title: PEP 492 - example benchmark doesn't work (TypeError) type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24654 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24644] --help for runnable stdlib modules
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. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24644 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24635] test_typing is flaky
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, dict or list is expected to be an instance of the corresponding ABC (AbstractSet, Mapping, Sequence) defined in typing.py. Those ABCs in turn derive (in a slightly sneaky way) from the corresponding ABCs in collections.abc. My hunch is that some other test messes with the ABC registration cache and doesn't restore it -- or typing.py's sneaky way of deriving from collections.abc has a subtle bug in it. Maybe something is calling reload(collections.abc)? I haven't done any research to confirm or deny this theory. It shouldn't be too hard to find the (probably only a handful of) tests that mess with the registration cache. -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24635 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24644] --help for runnable stdlib modules
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 rep...@bugs.python.org http://bugs.python.org/issue24644 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23792] help crash leaves terminal in echo off mode
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 rep...@bugs.python.org http://bugs.python.org/issue23792 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24621] zipfile.BadZipFile: File is not a zip file
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 - enhancement versions: +Python 3.6 -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24621 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24652] C-API Pure Embedding enhancement
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); must be added to get it to work. -- messages: 246847 nosy: Justin Huang priority: normal severity: normal status: open title: C-API Pure Embedding enhancement type: enhancement versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24652 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21750] mock_open data is visible only once for the life of the class
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: mock_open.read_data can now be read from each instance, as it https://hg.python.org/cpython/rev/0da764c58322 New changeset 92a90e469424 by Robert Collins in branch 'default': Issue #21750: mock_open.read_data can now be read from each instance, as it https://hg.python.org/cpython/rev/92a90e469424 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24650] Error in yield expression documentation
New submission from swanson: https://docs.python.org/3/reference/expressions.html in 6.2.9. Yield expressions end of 1st paragraph: Using a yield expression in a function’s body causes that function to be a generator. NO! As the very next sentence explains, a generator is what's returned by such a function, not the function itself. Basically, it should be sufficient to add the word function to the end of that sentence: ... generator function. However, this error does NOT exist in 3.0 to 3.2 - just in 3.3 to 3.6, so I suggest just using the same wording as 3.0 to 3.2: Using a yield expression in a function definition is sufficient to cause that definition to create a generator function instead of a normal function. -- assignee: docs@python components: Documentation messages: 246841 nosy: docs@python, swanson priority: normal severity: normal status: open title: Error in yield expression documentation versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24650 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21750] mock_open data is visible only once for the life of the class
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 rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21750] mock_open data is visible only once for the life of the class
Robert Collins added the comment: Ok, so - good to commit to 3.4 and up? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24651] Mock.assert* API is in user namespace
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 objected to this saying that the current structure is part of mock's success - but I'm filing this since a number of other core devs seemed to really like the idea. We can discuss here and if the consensus is that it wouldn't be an improvement - thats fine. OTOH if the consensus is that it is an improvement, this can serve as a memo to someone to implement the new API. -- components: Library (Lib) messages: 246846 nosy: rbcollins priority: normal severity: normal status: open title: Mock.assert* API is in user namespace type: enhancement versions: Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24651] Mock.assert* API is in user namespace
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +berker.peksag, kushal.das, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23792] help crash leaves terminal in echo off mode
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 leaves terminal in raw mode - help crash leaves terminal in echo off mode ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23792 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21750] mock_open data is visible only once for the life of the class
Robert Collins added the comment: There are already explicit tests for that, do you want another one? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24646] Python accepts SSL certificate that should be rejected on OSX
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 binaries. -- On the road, hence brief. Op 17 jul. 2015 om 17:55 heeft Antoine Pitrou rep...@bugs.python.org het volgende geschreven: Antoine Pitrou added the comment: Do we know exactly why OS X's OpenSSL accepts it? -- nosy: +ned.deily, pitrou, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24621] zipfile.BadZipFile: File is not a zip file
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.zip Extracting CoordinateData.AmplitudesDataType Extracting CoordinateData.Amplitudes Extracting CoordinateData.VolumesDataType Extracting CoordinateData.Volumes Everything is Ok Files: 4 Size: 103746 Compressed: 176384 -- nosy: +alexei.romanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24621 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24646] Python accepts SSL certificate that should be rejected on OSX
Antoine Pitrou added the comment: Do we know exactly why OS X's OpenSSL accepts it? -- nosy: +ned.deily, pitrou, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24653] Mock.assert_has_calls([]) incorrectly passes
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 rep...@bugs.python.org http://bugs.python.org/issue24653 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24653] Mock.assert_has_calls([]) incorrectly passes
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 (most recent call last): File tt.py, line 7, in module mmock.assert_has_calls(['x']) # Exception raised as expected. File /home/robertc/work/cpython/Lib/unittest/mock.py, line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: ['x'] Actual: [call.foobar('baz')] -- messages: 246849 nosy: rbcollins priority: normal severity: normal status: open title: Mock.assert_has_calls([]) incorrectly passes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24653 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24642] Will there be an MSI installer?
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 installer is listed in What's New, but not that the change to the new installer, and lack of the old msi installer. This is noteworthy for anyone who does scripted installs of python. 2. passing /? should list the available kay-value arguments. 2.5. The help should really be to stdout... If you are running /? on an installer executable, you are in the command prompt - no one creates a shortcut to an installer exe then modifies that shortcut to add the /? argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24621] zipfile.BadZipFile: File is not a zip file
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/decode the deta so I'd be happy to get them extracted via python in some way (without requiring external dependencies). Would it help to remove the offending bytes and then feed the bytes-object to ZipFile? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24621 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24641] Log type of unserializable value when raising JSON TypeError
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). -- nosy: +bob.ippolito, pitrou, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24641 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24649] python -mtrace --help is wrong
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24649 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24641] Log type of unserializable value when raising JSON TypeError
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 follow the same pattern. However, I don't know if the message *is* value independent. The SO question asked about TypeError: {'album': [uRooney's Lost Album], 'title': [u'The Kids After Sunset'], 'artist': [u'Rooney']} is not JSON serializable and the OP claimed in a comment to the accepted answer that the problem was that the value objects represented as lists were not list() objects, just as '5' here is not an int() object. The JSON error code, in 3.5 at File C:\Programs\Python35\lib\json\encoder.py, line 180, in default raise TypeError(repr(o) + is not JSON serializable) could be expanded to check whether the string representation starts with the class name and if it does not, add 'classname' object at the front. This would solve Madison's posted issue, but not the SO problem. (It would, however, have made it clear that the {}s represented a real dict() object and directed attention inward.) For testing, compile('','','exec') returns an object that cannot be dumped. To me, this looks more like an enhancement than bugfix, so a change might be limited to future releases. -- nosy: +ezio.melotti, rhettinger, terry.reedy stage: - test needed type: - enhancement versions: +Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24641 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
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 rep...@bugs.python.org http://bugs.python.org/issue24654 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24621] zipfile.BadZipFile: File is not a zip file
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('H', data[i-2: i])[0] if data[i:].strip(b'\0') == b'': data = data[:i] zf = zipfile.ZipFile(io.BytesIO(data)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24621 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24654 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21750] mock_open data is visible only once for the life of the class
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. https://github.com/testing-cabal/mock/issues/288 -- stage: commit review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24642] Will there be an MSI installer?
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 the very least, I can add a link to the doc page from here as well. 2.5. The help should really be to stdout... Unfortunately, I don't think this one is possible as the installer is SUBSYSTEM:WINDOWS not CONSOLE. stdout is unbound by default, and the only way to bind it is to open a new console window, which doesn't really help here. Switching to SUBSYSTEM:CONSOLE is going to open a new console window every time you run it (and running by double-clicking or from a browser will be the vast majority). I can probably add a link from the front page of the installer to bring up the help page, but I wouldn't want it to be too obtrusive (maybe from the Customize Options page?) - the aim is to reduce the number of decisions for most users by having a very clean front page. There was a suggestion a while ago to generate a full command line based on the options selected in the UI, which is doable, but maybe not useful enough to justify the time and effort. I'd expect anyone capable of this sort of deployment to be able to figure out the command line for themselves though, given access to the list of possible options. -- assignee: - docs@python components: +Documentation nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24658] open().write() fails on 4 GB+ data (OS X)
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 last): File stdin, line 1, in module OSError: [Errno 22] Invalid argument This has an impact on pickle, in particular (http://stackoverflow.com/questions/31468117/python-3-can-pickle-handle-byte-objects-larger-than-4gb). -- components: Interpreter Core messages: 246878 nosy: lebigot priority: normal severity: normal status: open title: open().write() fails on 4 GB+ data (OS X) type: behavior versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24658 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
Brian Cain added the comment: Whoops, that's not right. Corrected. -- Added file: http://bugs.python.org/file39942/ssl_convert_3rd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
Brian Cain added the comment: New patch. -- Added file: http://bugs.python.org/file39941/ssl_convert_2nd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24563] Encoding declaration: doc supported encodings
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 should be internal links, rather than hard-coded Internet links to another version of the documentation. See https://docs.python.org/devguide/documenting.html#cross-linking-markup. The Standard Encodings section already has a label already set up for you to use :) -- nosy: +vadmium stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24563 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24646] Python accepts SSL certificate that should be rejected on OSX
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 that problem so we have elected to continue to use the least unattractive solution of continuing to use the Apple-supplied libs with the 10.6+ installer variants (Issue17128). Eventually, we will have to bite the bullet and come up with s better solution as Apple will likely eventually stop shipping OpenSSL libs altogether. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24646] Python accepts SSL certificate that should be rejected on OSX
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 rep...@bugs.python.org http://bugs.python.org/issue24646 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24563] Encoding declaration: doc supported encodings
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 supported. Probably any text encoding in general, as long as the first one or two lines can “rougly” be parsed in ASCII. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24563 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24536] os.pipe() should return a structsequence (or namedtuple.)
Martin Panter added the comment: The original Python-ideas thread: https://www.marc.info/?t=14355895454 If you want shorter field names, how about just r and w (as they are currently documented)? os.write(our_pipe.w, bdata) os.read(our_pipe.r, 1024) “Input” and “output” would also work for me (though I am also happy with read, read_fd, etc). However it does seem a bit novel; in my experience people tend to say pipes have read and write ends, not inputs and outputs. os.write(our_pipe.input, bdata) os.read(our_pipe.output, 1024) -- nosy: +vadmium type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24642] Will there be an MSI installer?
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.
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 slash letters even they are in the given parameters. -- components: Library (Lib) messages: 246877 nosy: takayuki priority: normal severity: normal status: open title: CGIHTTPServer module discard continuous '/' letters from params given by GET method. versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24657 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24658] open().write() fails on 2 GB+ data (OS X)
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 rep...@bugs.python.org http://bugs.python.org/issue24658 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5945] PyMapping_Check returns 1 for lists
Changes by Christian Barcenas christ...@cbarcenas.com: -- versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24658] open().write() fails on 2 GB+ data (OS X)
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Extension Modules, IO -Interpreter Core nosy: +haypo, ned.deily, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24658 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24646] Python accepts SSL certificate that should be rejected on OSX
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 building from source, as well. But, yes, it appears that the headers are no longer there, at least on the most recent DP I have installed. I'm traveling and essentially off-the-net for another week but I will take a closer look at the situation then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21258] Add __iter__ support for mock_open
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21258 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
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 braces and happens to be followed by a while(0);. If convert() were used in some context where it weren't followed by a semicolon, it might do something terribly interesting. Or, more likely, just fail to build. -- components: Extension Modules files: ssl_convert.patch keywords: patch messages: 246868 nosy: Brian.Cain priority: normal severity: normal status: open title: _ssl.c: Missing do for do {} while(0) idiom versions: Python 3.6 Added file: http://bugs.python.org/file39938/ssl_convert.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24642] Will there be an MSI installer?
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 installer notes and links to What's New for 3.5 https://hg.python.org/cpython/rev/d6c91b8242d2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24650] Error in yield expression documentation
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 is a type of iterator, not A generator is a type of function. (Functions can't even have subtypes.) If the docs are painting a different picture than the already existing reality, it seems like that would be confusing to anyone who doesn't already know how they work. (If you already know how something works, you don't really need the docs, so it's easy to think they're clearer than they really are.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24650 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24656] remove assret from mock error checking
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 fact that it might be an *intentional* misspelling to avoid a clash with 'assert', I found the following on Google. a. It appears to be both a (person) name (Turkey?) and a username. b. It can be a contraction, abbreviation, or pair of acronym: ass-et ret-ention, ass-istant ret-ired (?), and something in connection with high-pressure oil lines. Python usage is not restricted to English- speaking geeks. 2. It gives the impression that 'assret' is a legitimate alias for 'assert'. See https://stackoverflow.com/questions/31382895/any-core-real-reference-to-assret-as-alias-to-assert If the doc is revised to counter this impression, then I predict that this will join the list of Python warts and reasons to ridicule Python. 3. It violates Python design principles. To many, the beauty of Python is that it is relatively clean and simple, and not filled with hundreds of nitpicky exceptions and special cases. -- files: remove_assret.stoneleaf.01.patch keywords: patch messages: 246873 nosy: ethan.furman, michael.foord priority: normal severity: normal status: open title: remove assret from mock error checking versions: Python 3.5 Added file: http://bugs.python.org/file39939/remove_assret.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24651] Mock.assert* API is in user namespace
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
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 do-while hackery in this case. (And make it CONVERT uppercase to signify that it is a macro.) -- nosy: +vadmium stage: - commit review type: - compile error versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24650] Error in yield expression documentation
Martin Panter added the comment: Technically, the glossary defines the unqualified term “generator” as the factory function: https://docs.python.org/3.5/glossary.html#term-generator. (The 3.6 documentation should say the same but the build has been broken or out of date for a few months.) Though I agree adding the old wording would make it clearer. The 3.3 change was made in revision e02da391741f for Issue 12704. -- nosy: +nikratio, vadmium stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24650 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24241] webbrowser default browser detection and/or public API for _trylist.
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 rep...@bugs.python.org http://bugs.python.org/issue24241 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com