[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2017-04-15 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1289 ___ Python tracker ___ ___ Python-bugs-list

[issue30079] Explain why it is recommended to pass args as a string rather than as a sequence If shell is True

2017-04-15 Thread Eryk Sun
Eryk Sun added the comment: In Unix, passing an args list with shell=True makes the first element the -c command. The remaining elements are arguments for the shell itself, which makes them $N variables. For example: >>> subprocess.call(['echo $0, $1', 'spam', 'eggs'], shell=True)

[issue19184] dis module has incorrect docs for RAISE_VARARGS

2017-04-15 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1288 ___ Python tracker ___ ___ Python-bugs-list

[issue30079] Explain why it is recommended to pass args as a string rather than as a sequence If shell is True

2017-04-15 Thread R. David Murray
R. David Murray added the comment: Because passing a sequence to shell=True won't work on unix. It only works more-or-less by accident on windows, even though the current docs kind of encourage it. Yes, I think it would be good if these sentences were clarified. See also issue 7839.

[issue30079] Explain why it is recommended to pass args as a string rather than as a sequence If shell is True

2017-04-15 Thread Philip Lee
New submission from Philip Lee: The doc here https://docs.python.org/3/library/subprocess.html#subprocess.Popen says : "If shell is True, it is recommended to pass args as a string rather than as a sequence." but without explain why ? Please add the explanation ! while in

[issue30075] Printing ANSI Escape Sequences on Windows 10

2017-04-15 Thread Eryk Sun
Eryk Sun added the comment: cmd.exe enables virtual terminal mode, but only for itself. It disables VT mode before starting other programs, and also at shutdown. It appears you've found a bug in the case of "cmd.exe /c ...". You can get the same result via os.system(''). It's failing to

[issue30075] Printing ANSI Escape Sequences on Windows 10

2017-04-15 Thread Martin Panter
Martin Panter added the comment: Maybe this is related to Issue 29059. If so, there seems to be resistance to enabling the feature by default, and preference to use existing APIs rather than adding a new API that enables it. -- components: +Windows nosy: +martin.panter, paul.moore,

[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-15 Thread R. David Murray
R. David Murray added the comment: Agreed that it looks like another example line should be added to the help for this case. -- nosy: +r.david.murray stage: -> needs patch versions: +Python 3.7 -Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-15 Thread Ilya Kazakevich
New submission from Ilya Kazakevich: In Py3 it is possible to run test filelike "python -m unittest tests/test_something.py" (it is *not* possible in Py2!) Here is doc: https://docs.python.org/3/library/unittest.html But "--help" seems to be simply copied from Py2 because it does not have

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: inspect.getargspec is deprecated in favor of .getfullargspec and .signature and is implemented in with .getfullargspec. This, in turn, calls ._signature_from_callable which ultimately looks for (perhaps after recursive unwrap calls) obj.__signature__. So I

[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2017-04-15 Thread Toby Thurston
Changes by Toby Thurston : -- pull_requests: +1287 ___ Python tracker ___ ___

[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2017-04-15 Thread Toby Thurston
New submission from Toby Thurston: aifc.py fails to open AIFF files containing the compression type "sowt" in the COMM chunk with an "unsupported compression type" error. This compression type is an Apple specific extension that signals that the data is not actually compressed but is stored

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-04-15 Thread Aviv Palivoda
Aviv Palivoda added the comment: In my patch I use sqlite3_create_function_v2 which was added in sqlite 3.7.3 (2010-10-08). There were a few problems after adding sqlite3_stmt_readonly in 284676cf2ac8 as can be seen in issue #29355. sqlite3_stmt_readonly was added in 3.7.4 (2010-12-07) so I

[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

2017-04-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Two new opcodes BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL (added in 3.5 and 3.6) have too long names (26 and 28 characters). This exceeds the width of the opcode names in the dis module (20 characters). Increasing the width of the column

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: For the record: the __code__ attribute of a Cython function is a real "code" object (the same type as the __code__ attribute of a Python function). Of course not all fields are relevant, for example co_code is empty. So I think it's clear that Cython tries

[issue30074] compile warnings of _PySlice_Unpack in 2.7

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for pointing on this and for your review Xiang! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue30074] compile warnings of _PySlice_Unpack in 2.7

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5e79321742cb3af2184d22e2148c6756cade1864 by Serhiy Storchaka in branch '2.7': bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed (#1154) https://github.com/python/cpython/commit/5e79321742cb3af2184d22e2148c6756cade1864

[issue11822] Improve disassembly to show embedded code objects

2017-04-15 Thread Nick Coghlan
Nick Coghlan added the comment: The problem I see is that we have conflicting requirements for the default behaviour: - if we modify dis() instead of adding a new function, then the default behaviour needs to be non-recursive for backwards compatibility reasons - if we allow the depth to be

[issue11822] Improve disassembly to show embedded code objects

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem with the *depth* parameter is that it adds a burden of choosing the value for the end user. "Oh, there are more deeper code objects, I must increase the depth and rerun dis()!" I think in most cases when that parameter is specified it would be

[issue30075] Printing ANSI Escape Sequences on Windows 10

2017-04-15 Thread Tithen Firion
New submission from Tithen Firion: Windows 10 supports ANSI Escape Sequences ( http://stackoverflow.com/a/38617204/2428152 https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx ) but Python just prints escape character. Adding `subprocess.call('', shell=True)`

[issue30011] HTMLParser class is not thread safe

2017-04-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue11822] Improve disassembly to show embedded code objects

2017-04-15 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for listing the nested code objects after the original one. In reviewing Serhiy's patch, the core technical implementation looks OK to me, but I think we may want to go with a "depth" argument rather than a simple "recursive" flag. My rationale for that

[issue30011] HTMLParser class is not thread safe

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 50f948edda0e6465e194ecc50b85fa2646039b8d by Serhiy Storchaka in branch '2.7': bpo-30011: Fixed race condition in HTMLParser.unescape(). (#1140) https://github.com/python/cpython/commit/50f948edda0e6465e194ecc50b85fa2646039b8d --

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > As indicated above, perfect emulation seems impossible for Cython or any > other external compiler that does not use the same bytecode. True, Cython functions are not implemented using Python bytecode, so perfect emulation is impossible. The use case I care

[issue11822] Improve disassembly to show embedded code objects

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue was open 6 years ago. The feature could be added in 3.3. But it still not implemented. Since there are problems with outputting the disassembly of internal code objects expanded in-line, proposed patch just outputs them after the disassembly of

[issue11822] Improve disassembly to show embedded code objects

2017-04-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1286 ___ Python tracker ___ ___

[issue30034] csv reader chokes on bad quoting in large files

2017-04-15 Thread Keith Erskine
Keith Erskine added the comment: OK Terry. Thank you everybody for your thoughts and suggestions. -- ___ Python tracker ___

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-04-15 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Thank you Martin for your comments in the code review tool. I prepared a new patch for the code review tool. The github changelog from patch v4 (Feb 2017) to my HEAD (currently patch v5, Apr 2017) is at:

[issue29378] Invalid example in documentation for PyErr_Fetch

2017-04-15 Thread Kaeptm Blaubaer
Kaeptm Blaubaer added the comment: The error is fixed in Python 3.5.3 documentation. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue27727] Update Tools/freeze to use .vcxproj files

2017-04-15 Thread Kaeptm Blaubaer
Changes by Kaeptm Blaubaer : -- resolution: -> duplicate ___ Python tracker ___

[issue29378] Invalid example in documentation for PyErr_Fetch

2017-04-15 Thread Kaeptm Blaubaer
Kaeptm Blaubaer added the comment: Please don't close the bug until it is fixed in the python 3.5 documentation! -- resolution: not a bug -> status: closed -> open ___ Python tracker

[issue30074] compile warnings of _PySlice_Unpack in 2.7

2017-04-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1285 ___ Python tracker ___ ___

[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adjusts column widths of the output of dis.dis() for large line numbers and instruction offsets and adds tests for widths of opcode names. Unfortunately this test is failed for two new opcodes: BUILD_MAP_UNPACK_WITH_CALL and

[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1284 ___ Python tracker ___ ___

[issue30011] HTMLParser class is not thread safe

2017-04-15 Thread Alessandro Vesely
Alessandro Vesely added the comment: Serhiy's analysis is correct. If anything more than a comment is going to make its way to the code, I'd suggest to move dictionary building to its own function, so that it can be called either on first use --like now-- or before threading if the user is

[issue30074] compile warnings of _PySlice_Unpack in 2.7

2017-04-15 Thread Xiang Zhang
New submission from Xiang Zhang: Compile 2.7 now get many warning about _PySlice_Unpack, not in 3.x. See an example: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%202.7/builds/109/steps/compile/logs/warnings%20%2822%29. -- messages: 291708 nosy: serhiy.storchaka,

[issue19184] dis module has incorrect docs for RAISE_VARARGS

2017-04-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> needs patch versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker

[issue25632] Document BUILD_*_UNPACK opcodes

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: They were documented in issue26213. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Document BUILD_*_UNPACK opcodes ___ Python tracker

[issue30011] HTMLParser class is not thread safe

2017-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is nothing wrong with building entitydefs multiple times since the result is same. An alternative is using locking, but this is more cumbersome solution. And building entitydefs is much faster than importing the threading module. $ ./python -m timeit

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: inspect.isfunction(object) is documented to Return true if the object is a Python function, which includes functions created by a lambda expression. This is currently implemented as "isinstance(object, types.FunctionType)". The docs usually regard a