[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2012-08-18 Thread Ben Darnell
Ben Darnell added the comment: Related pypy issue: https://bugs.pypy.org/issue1238 -- nosy: +Ben.Darnell ___ Python tracker ___ ___ Pyt

[issue15285] test_timeout failure when system on IPv4 10.x.x.x subnet

2012-08-18 Thread Ned Deily
Ned Deily added the comment: The patch looks good to me. Thanks for setting up the infrastructure to allow reproducible testing! -- stage: needs patch -> commit review ___ Python tracker _

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: I've come to see more downsides than upsides to this idea. I'm withdrawing it. Good points, Greg! (And others.) -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: -1 on doing this from me. While I don't see it hurting anything when "type(query) is dict" I'd much rather encourage people to write better tests that do not take the lazy way out. Tests that get by comparing a generated string to a "golden" string are soo

[issue15526] test_startfile crash on Windows 7 AMD64

2012-08-18 Thread Jeremy Kloth
Jeremy Kloth added the comment: Unfortunately, this is a legitimate failure of the test. The test (actually the support code) is attempting to remove a directory that is the current directory of an active process. The test has documented this issue and attempted to work around it by adding a sl

[issue15285] test_timeout failure when system on IPv4 10.x.x.x subnet

2012-08-18 Thread Trent Nelson
Trent Nelson added the comment: Proposed patch attached. -- keywords: +patch nosy: +trent Added file: http://bugs.python.org/file26890/test_timeout.patch ___ Python tracker ___ _

[issue1574] Touchpad 2 Finger scroll does not work in IDLE on Mac (But scroll wheel of external mouse does)

2012-08-18 Thread Ned Deily
Ned Deily added the comment: On current OS X systems (tested on OS X 10.7.4), the 2-finger scrolling gesture scrolls IDLE text editor windows with long files, tested with current versions of ActiveTcl 8.5 and ActiveTcl 8.4. So I think the issue can be closed. -- nosy: +ned.deily resol

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Even if we write in chunks, if we are calling the OS write function > and O_APPEND is set, wouldn't be satisfying the condition? Or, > rather, the OS would be. That is, I don't really see a guarantee of > an *atomic* write in the quoted description. I'm not

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread R. David Murray
R. David Murray added the comment: Even if we write in chunks, if we are calling the OS write function and O_APPEND is set, wouldn't be satisfying the condition? Or, rather, the OS would be. That is, I don't really see a guarantee of an *atomic* write in the quoted description. -- n

[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-18 Thread Greg Stein
Changes by Greg Stein : -- nosy: -gstein ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > By leaf, you mean the derived subtype? That sounds a bit quirky (you > need the aforementioned "if"), how about the base heap type instead? I think this fails (currently) because a subtype defined in Python using a "class" statement will automatically get sub

[issue15526] test_startfile crash on Windows 7 AMD64

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: It crashed again, despite issue15496 being fixed: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/496 -- title: regrtest crash on Windows 7 AMD64 -> test_startfile crash on Windows 7 AMD64 ___

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2012-08-18 Thread Robin Schreiber
Robin Schreiber added the comment: I have removed some redundant modulestate lookups and the testsuite now executes the decimal tests as fast as before the patch is applied. (at least for me). May I ask how you tested the decimal performance? Regarding the failing test: It appears that the hac

[issue1574] Touchpad 2 Finger scroll does not work in IDLE on Mac (But scroll wheel of external mouse does)

2012-08-18 Thread Roger Serwy
Roger Serwy added the comment: Tk support on Mac has improved greatly since 2008. Is this still a valid issue? -- nosy: +serwy ___ Python tracker ___ _

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Poul-Henning Kamp
Poul-Henning Kamp added the comment: POLA = Principle Of Least Astonishment We use that a lot in architectural decision in FreeBSD :-) As I said: You deal with this as you see fit. If all python2 gets is a doc- or errata-notice, that's perfectly fine with me. I interpret "The writev() functio

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I have not tried io.open(), nor would I suspect most users would > realize that they needed to do so, in order to get the canonical > behaviour from an operation called "write" on a file opened in > "append" mode. The reason I'm asking is that open() is the sa

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Poul-Henning Kamp
Poul-Henning Kamp added the comment: I have not tried io.open(), nor would I suspect most users would realize that they needed to do so, in order to get the canonical behaviour from an operation called "write" on a file opened in "append" mode. IMO: If pythons file.write() does not give the gu

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, sorry. I was stupidly looking for "atomic" and only found the pipe-specific remarks. (the other points remain, though :-)) -- ___ Python tracker __

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Poul-Henning Kamp
Poul-Henning Kamp added the comment: Yes, it does: If the O_APPEND flag of the file status flags is set, the file offset shall be set to the end of the file prior to each write and no intervening file modification operation shall occur between changing the file offset and the write operation.

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > When a file is opened in append mode, the operating system guarantees > that all write(2) system calls atomically appended their payload to the > file. Does it? I don't see such strong guarantees in http://pubs.opengroup.org/onlinepubs/9699919799/functions/w

[issue15723] Python breaks OS' append guarantee on file writes

2012-08-18 Thread Poul-Henning Kamp
New submission from Poul-Henning Kamp: When a file is opened in append mode, the operating system guarantees that all write(2) system calls atomically appended their payload to the file. At least on FreeBSD, Python breaks this guarantee, by chopping up large writes into multiple write(2) sysca

[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So I'd propose that it is actually the leaf subtype which decrefs > ob_type. The check whether you are the leaf type is then done by > checking whether tp_dealloc is the one you are "in" right now. By leaf, you mean the derived subtype? That sounds a bit quirk

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 2) The patch slows down _decimal by 25% (!). Ouch. That's an interesting observation, because I guess other modules could be affected as well. Robin, can you please take care that other modules don't have significant performance regressions after your work?

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Honestly, this looks much more like an enhancement than a bugfix to me, so I think it should only target 3.4. As for the idea proper, I sounds ok to me, as long as only exact dict instances are affected (i.e. OrderedDict and friends keep using their native orde

[issue15615] More tests for JSON decoder to test Exceptions

2012-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks and congratulations for your patch! It's now committed to all three branches. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue15615] More tests for JSON decoder to test Exceptions

2012-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd9a4883dd02 by Antoine Pitrou in branch '3.2': Issue #15615: Add some tests for the json module's handling of invalid input data. http://hg.python.org/cpython/rev/cd9a4883dd02 New changeset 01717c3da4fb by Antoine Pitrou in branch 'default': Issue

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2012-08-18 Thread Ned Deily
Ned Deily added the comment: What version of 10.8 are you seeing those messages with? And do you see them without the patch applied? -- nosy: +ned.deily ___ Python tracker ___

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Note, the sort may fail if e.g. bytes and str are mixed in the keys. So this should be caught and ignored. An alternative would just be to fix the call site to pass in sorted(query.items()) instead of sorted(query). Still, I think that more predictable out

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-18 Thread Stefan Mihaila
Stefan Mihaila added the comment: Maybe you can set this issue as the superseder of issue9269, because the patches there have already been applied here. -- ___ Python tracker __

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Stefan Krah
Stefan Krah added the comment: Thanks, Mark. With your change applied I can't measure any performance differences either. -- ___ Python tracker ___ __

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: With the Py_tp_bases line removed, all tests pass for me on a non-debug 64-bit build on OS X 10.6. A quick timing of random.random() showed no distinguishable performance impact. -- ___ Python tracker

[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-18 Thread R. David Murray
R. David Murray added the comment: This is much better. But let me try tuning the problem paragraph a bit, since I'm a native English speaker: If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if the target directory already exists. If *exists_ok* is ``True`` an

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: The Py_tp_bases line below doesn't look right. I suspect that's what's causing the segfault. +static PyType_Slot Random_Type_slots[] = { +{Py_tp_getattro, PyObject_GenericGetAttr}, +{Py_tp_doc, random_doc}, +{Py_tp_methods, random_methods}, +{

[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-18 Thread Hynek Schlawack
Hynek Schlawack added the comment: Ok, let’s do it here, that’s easier: .. function:: makedirs(path, mode=0o777, exist_ok=False) .. index:: single: directory; creating single: UNC paths; and os.makedirs() Recursive directory creation function. Like :func:`mkdir`, but makes

[issue8323] buffer objects are picklable but result is not unpicklable

2012-08-18 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue15672] PEP 3121, 384 Refactoring applied to testbuffer module

2012-08-18 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: -> skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Stefan Krah
Stefan Krah added the comment: I tried to benchmark this patch but I'm getting a segfault: Python 3.3.0b2+ (default:dc18d73e67a5, Aug 18 2012, 15:37:04) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import random Segmentation fault -- n

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2012-08-18 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: -> skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2012-08-18 Thread Stefan Krah
Stefan Krah added the comment: Thank you for the patch and the big amount of work that you are doing on so many modules! I'm afraid though that the patch is not acceptable in its current state: 1) The unit tests do not pass. This could be fixed. 2) The patch slows down _decimal by 25%

[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15641] Clean up importlib for Python 3.4

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15720] move __import__() out of the default lookup chain

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15716] Ability to specify the PYTHONPATH via a command line flag

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15720] move __import__() out of the default lookup chain

2012-08-18 Thread R. David Murray
R. David Murray added the comment: I could be wrong, but it is hard for me to see how we could justify doing this before python4, at this point in python3. Adding a warning would be uncontroversial, though. -- nosy: +r.david.murray ___ Python tracke

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2012-08-18 Thread Robin Schreiber
Changes by Robin Schreiber : -- components: +Extension Modules -Regular Expressions ___ Python tracker ___ ___ Python-bugs-list mailin

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2012-08-18 Thread Robin Schreiber
New submission from Robin Schreiber: Changes proposed in PEP3121 and PEP384 have now been applied to the decimal module! -- components: Regular Expressions files: _decimal_pep3121-384_v0.patch keywords: patch messages: 168511 nosy: Robin.Schreiber, ezio.melotti, mrabarnett, skrah priori

[issue9920] test_cmath on atan fails on AIX

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: The fix applied for issue #15477 should also fix this issue. -- status: open -> closed versions: +Python 3.3 ___ Python tracker ___ _

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: Apple bug report filed: Bug ID# 12128251. Closing the issue. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 336653319112 by Mark Dickinson in branch 'default': Issue #15477: Merge fix from 3.2 http://hg.python.org/cpython/rev/336653319112 -- ___ Python tracker __

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 08418369da7b by Mark Dickinson in branch '3.2': Issue #15477: Add workaround for log1p(-0.0) on platforms where it's broken. http://hg.python.org/cpython/rev/08418369da7b -- nosy: +python-dev ___ Python t

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: > BTW, did anybody file a bug report with Apple? I'll file one. -- ___ Python tracker ___ ___ Pytho

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2012-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: See http://www.python.org/download/mac/tcltk/ It may be that using a different build of Tcl/Tk solves that problem. -- nosy: +loewis ___ Python tracker _

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2012-08-18 Thread Robin Schreiber
New submission from Robin Schreiber: Changes proposed in PEP3121 and PEP384 have now been applied to the tkinter module! When running the test form inside Python.exe (tkinter._test()), the litte "test-window" is rendered correctly. However there are still some error messages popping up inside

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: BTW, did anybody file a bug report with Apple? Even to my untrained eye, that looks like a clear violation of the POSIX standard: If x is ±0, or +Inf, x shall be returned. http://pubs.opengroup.org/onlinepubs/009604599/functions/log1p.html C seems to make it

[issue15588] quopri: encodestring and decodestring handle bytes, not strings

2012-08-18 Thread Petri Lehtinen
Petri Lehtinen added the comment: The encode() and decode() functions also expect binary file objects. Attached a patch that changes documentation and docstrings. Removed the mentions of readline(), because read() is called on input instead, if the binascii module is available. Also removed th

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Trent Nelson
Trent Nelson added the comment: Happy to report your patch does the trick Mark. test_cmath passes on 10.7 and 10.8 with it applied. -- ___ Python tracker ___ __

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: See also http://bugs.python.org/issue9920; the patch here *should* fix that issue, too. -- ___ Python tracker ___

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- components: +Extension Modules stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.2 ___ Python tracker ___

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file26884/log1p_sign_workaround.patch ___ Python tracker ___ ___ Python-bugs-

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch that also removes the sysconfig checks from the cmath tests. -- Added file: http://bugs.python.org/file26885/log1p_sign_workaround.patch ___ Python tracker __

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: Trent, many thanks for the report and analysis. The LOG1P_DROPS_ZERO_SIGN hackery was a result of a previous attempt to 'fix' the tests on another platform whose log1p didn't preserve zero signs. But now that this behaviour has emerged on OS X too, I think i

[issue15477] test_cmath failures on OS X 10.8

2012-08-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt