[issue15944] memoryviews and ctypes

2015-08-05 Thread Martin Panter
Martin Panter added the comment: In my experience, I tend to only use memoryview() for “bytes-like” buffers (but see Issue 23756 about clarifying what this means). Example from /Lib/_compression.py:67: def readinto(self, b): with memoryview(b) as view, view.cast("B") as byte_view:

[issue24795] Make event loops with statement context managers

2015-08-05 Thread Martin Panter
Martin Panter added the comment: >From what I can see, the examples in the current documentation tend to diectly >call loop.close() without an exception handler. Only two examples have the >bare-bones try / finally handler (which is important for the example that uses >Ctrl+C). -- nos

[issue24800] exec docs should note that the no argument form in a local scope is really the two argument form

2015-08-05 Thread eryksun
eryksun added the comment: > If exec gets two separate objects as globals and locals, > the code will be executed as if it were embedded in a > class definition. Probably there needs to be more clarification of the compilation context. Class definitions support lexical closures, whereas sourc

[issue24801] right-mouse click in IDLE on Mac doesn't work

2015-08-05 Thread Mark Roseman
New submission from Mark Roseman: For popup menus, control-click works, but right-click on mouse buttons that support it, doesn't work. This is a followup to #10404, last addressed in 2010. As noted there, right click behaviour should be supported. The right click Tk text bindings on Mac (whi

[issue24801] right-mouse click in IDLE on Mac doesn't work

2015-08-05 Thread Mark Roseman
Changes by Mark Roseman : -- components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue24787] csv.Sniffer guesses "M" instead of \t or , as the delimiter

2015-08-05 Thread Tiago Wright
Tiago Wright added the comment: I've run the Sniffer against 1614 csv files on my computer and compared the delimiter it detects to what I have set manually. Here are the results: SnifferHuman,;\t\(blank)Error:)ceMpGrand TotalError rate,498 2 110 1 5122.7%; 1 10.0%\t3 9

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-08-05 Thread Eric Snow
Eric Snow added the comment: @Fabian, hey, thanks for bringing it to our attention! -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-08-05 Thread Eric Snow
Eric Snow added the comment: If I don't get any feedback before then, I'll commit the patch on Friday. -- ___ Python tracker ___ ___ P

[issue18082] Inconsistent behavior of IOBase methods on closed files

2015-08-05 Thread Martin Panter
Martin Panter added the comment: The documentation says “. . . calling any method (even inquiries) on a closed stream is undefined. Implementations may raise ValueError”. So IMO you shouldn’t rely on any particular success or failure beha

[issue24787] csv.Sniffer guesses "M" instead of \t or , as the delimiter

2015-08-05 Thread Skip Montanaro
Skip Montanaro added the comment: Tiago, sorry, but your last post with results is completely unintelligible. Can you toss the table in a file and attach it instead? -- ___ Python tracker _

[issue24800] exec docs should note that the no argument form in a local scope is really the two argument form

2015-08-05 Thread R. David Murray
R. David Murray added the comment: OK, yes, so "a class body at global scope" or something like that :) LOAD_CLASSDEREF is another whole level of complication to the scoping weirdness for classes; see issue 19979 and issue 24129. -- ___ Python track

[issue24802] PyFloat_FromString Buffer Over-read

2015-08-05 Thread John Leitch
New submission from John Leitch: Python suffers from a buffer over-read in PyFloat_FromString() that is caused by the incorrect assumption that buffers returned by PyObject_GetBuffer() are null-terminated. This could potentially result in the disclosure of adjacent memory. PyObject * PyFloat_

[issue24802] PyFloat_FromString Buffer Over-read

2015-08-05 Thread John Leitch
John Leitch added the comment: Attaching repro -- Added file: http://bugs.python.org/file40133/PyFloat_FromString_Buffer_Over-read.py ___ Python tracker ___

[issue24803] PyNumber_Long Buffer Over-read.patch

2015-08-05 Thread John Leitch
New submission from John Leitch: Python suffers from a buffer over-read in PyNumber_Long() that is caused by the incorrect assumption that buffers returned by PyObject_GetBuffer() are null-terminated. This could potentially result in the disclosure of adjacent memory. PyObject * PyNumber_Long

[issue24803] PyNumber_Long Buffer Over-read.patch

2015-08-05 Thread John Leitch
John Leitch added the comment: Attaching repro. -- Added file: http://bugs.python.org/file40135/PyNumber_Long_Buffer_Over-read.py ___ Python tracker ___ _

[issue24804] https://www.python.org/ftp/python/2.7.4/python-2.7.4.msi actually installs 2.7.7

2015-08-05 Thread Laura Creighton
New submission from Laura Creighton: Mail to webmaster The Link to [1]https://www.python.org/ftp/python/2.7.4/python-2.7.4.msi actually installs 2.7.7 Best, Jean Doig All prompts in the install dialog indicate 2.7.4 but the final install is 2.7.7  -- components: Installation messages:

[issue24803] PyNumber_Long Buffer Over-read.patch

2015-08-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: security -> crash ___ Python tracker _

[issue24802] PyFloat_FromString Buffer Over-read

2015-08-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: security -> behavior versions: +Python 2.7, Python 3.4, Python 3.6 ___ Python tracker

[issue24802] PyFloat_FromString Buffer Over-read

2015-08-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- type: behavior -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue24803] PyNumber_Long Buffer Over-read.patch

2015-08-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 2.7, Python 3.4, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue24804] https://www.python.org/ftp/python/2.7.4/python-2.7.4.msi actually installs 2.7.7

2015-08-05 Thread Zachary Ware
Zachary Ware added the comment: The report is almost certainly not accurate and is probably a result of trying to install 2.7.4 on top of 2.7.7, which will not work (the 2.7.7 python27.dll is newer and not overwritten). Either way, neither version is supported anymore. -- components:

[issue23672] IDLE can crash if file name contains non-BMP Unicode characters

2015-08-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset dda625798111 by Terry Jan Reedy in branch '3.4': Issue #23672: Allow Idle to edit and run files with astral chars in name. https://hg.python.org/cpython/rev/dda625798111 New changeset 97d50e6247e1 by Terry Jan Reedy in branch '3.5': Issue #23672:Mer

[issue23672] IDLE can crash if file name contains non-BMP Unicode characters

2015-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I made a different fix for avoid the error posted when running. Sanad, PLEASE test running a file with astral char, the same way you did before, to see is there are any other problems. I cannot get such a file into an Idle editor on Windows. I *think* this p

[issue21279] str.translate documentation incomplete

2015-08-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset ae53bd5decae by Zachary Ware in branch '3.4': Issue #21279: Flesh out str.translate docs https://hg.python.org/cpython/rev/ae53bd5decae New changeset 064b569e38fe by Zachary Ware in branch '3.5': Issue #21279: Merge with 3.4 https://hg.python.org/cp

[issue21279] str.translate documentation incomplete

2015-08-05 Thread Zachary Ware
Zachary Ware added the comment: Very minor grammatical fixes, reflowed the .rst docs, and re-added the codecs module mention in a less obtrusive manner, but the patch is committed. Thank you Kinga, Martin, and John! -- nosy: +zach.ware ___ Python t

[issue24805] Python installer having problem in installing Python for all users in Windows

2015-08-05 Thread Debarshi Goswami
New submission from Debarshi Goswami: Python installer (msi) having problem in installing Python for all users in Windows. It gets installed for installing user only. I was able to log the python output and found the below in the log. MSI (s) (8C:D0) [07:13:00:212]: Determined that existing p

[issue24805] Python installer having problem in installing Python for all users in Windows

2015-08-05 Thread Zachary Ware
Zachary Ware added the comment: The default for the 3.4 installer is to install for all users, so it's strange that you can't get it to install for all users. The log message you quote suggests that there's already a Python 3.4 installed per-user, is that the case? What results do you get wi

[issue15944] memoryviews and ctypes

2015-08-05 Thread eryksun
eryksun added the comment: A functional memoryview for ctypes objects would avoid having to use workarounds, such as the following: >>> d = ctypes.c_double() >>> b = (ctypes.c_char * ctypes.sizeof(d)).from_buffer(d) >>> b[:] = b'abcdefgh' >>> d.value 8.540883223036124e+194

<    1   2