[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Attached is a patch which fixes the issue. Instead of allowing the readline method to lose data, it adds a check to SocketIO.readinto() to ensure that the socket does not have a timeout and throws an IOError if it does. Also does the

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7322 ___ ___

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: issue1515839 seems to be a duplicate of this one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7995 ___

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-31 Thread Jacques Grove
Jacques Grove aquara...@gmail.com added the comment: Thanks for putting up the hg repo, makes it much easier to follow. Getting back to the performance regression I reported in msg124904: I've verified that if I take the hg commit 7abd9f9bb1 , and I back out the guards changes manually, while

[issue1515839] socket timeout inheritance on accept

2010-12-31 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The problem you have reported here was later independently reported in Issue7995 where a possible fix has been proposed. Suggest adding yourself to the nosy list of that issue to monitor current status. -- nosy: +ned.deily resolution: -

[issue6210] Exception Chaining missing method for suppressing context

2010-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le vendredi 31 décembre 2010 à 00:07 +, Patrick W. a écrit : Patrick W. p...@borntolaugh.de added the comment: Antoine Pitrou (pitrou) at 2010-12-30 18:32 (UTC) We are talking about context, not cause. Yes, but - as said before -

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: While this patch looks conformant to the documentation, it is very likely to break code in the wild. Even in the stdlib, there are uses of makefile() + socket timeouts (e.g. in http.client and urllib). It would be better to find a way to make

[issue3766] socket.socket.recv broken (unbearably slow)

2010-12-31 Thread Konstantin Osipov
Konstantin Osipov kostja.osi...@gmail.com added the comment: I was able to observe the same issue: I'm using Python 2.6.5 on Ubuntu 10.0.4 LTS. My system is 64 bit Intel Core I7, Quad core, Linux kernel 2.6.32-generic x86_64, Ubuntu EGLIBC 2.11.1-0ubuntu7.5. A simple client TCP socket, which

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread M. Z.
New submission from M. Z. mzdkm...@gmail.com: Trying to unpack a ZIP file where some packet files contain danish letters results in: zipfile.BadZipFile: File name in directory 'filename_with_æoå.txt' and header b'filename_with_\x91o\x86.txt' differ. Using Py 3.2b2 on Win7. Unpack the

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +amaury.forgeotdarc, haypo, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10801 ___ ___

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the patch. Comments/questions: - please don't use C++-style comments (//) in C code; some compilers can choke on them - should the code path be also enabled for netbsd? (or other variants?) - why does the test silence socket.error on

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The attached patch fixes it for me. No time to write tests right now. -- keywords: +patch Added file: http://bugs.python.org/file20205/zipfile.diff ___ Python tracker rep...@bugs.python.org

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: From what I coud see, the same applied to NetBSD so I enabled it for NetBSD as well - if there are any other OSes that need it enabled, they can be added. The updated patch checks for fcntl() failing and simply leaves the socket as is

[issue6210] Exception Chaining missing method for suppressing context

2010-12-31 Thread Ethan Furman
Ethan Furman et...@stoneleaf.us added the comment: raise AttributeError from None makes sense to me, and in a nice, short example like that I prefer it. In real code, however, I think raise AttributeError.no_context(Field %s is not in table % attr) is going to be easier for the human to

[issue9361] Tests for leapdays in calendar.py module

2010-12-31 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: I just tried John's patch, and: - it still applies without problem (except for a bit of offset) - I can confirm that it actually adds test coverage for leapdays() function (bringing calendar coverage from 71% to 72%). I think it would be

[issue9370] Add reader redirect from test package docs to unittest module

2010-12-31 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hi Nick, the See also section already points to unittest module; are you asking to extend its description to mention that's the tool people should use for their unittest suites? Cheers, Sandro -- nosy: +sandro.tosi

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-31 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: Why not? :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___

[issue1674555] sys.path in tests contains system directories

2010-12-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is a proof of concept patch if anyone wants to play with it.Note that a higher value could be used for the j option; multiple threads help even on uniprocessor systems since a bunch of the tests spend time waiting around. The

[issue9671] test_executable_without_cwd fails: AssertionError: 1 != 47

2010-12-31 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hello, I tried on a freshly build 2.7, and I can't replicate the reported error. Could it be it has been fixed by r78136? Sridhar, are you still seeing this error? Cheers, Sandro -- nosy: +sandro.tosi

[issue9361] Tests for leapdays in calendar.py module

2010-12-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Applied in r87590. I threw in an extra test for a multi-leapyear-range. Since there was no reason not to, I backported it to 3.1 in r87591 and 2.7 in r87592. In the latter two commits I also backported the issue 9342 patch. Thanks

[issue9342] Tests for monthrange in calendar.py module

2010-12-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Backported it to 3.1 in r87591 and 2.7 in r87592 along with the patch for issue 9361. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9342

[issue10270] Fix resource warnings in test_threading

2010-12-31 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Already fixed in r86107 -- nosy: +sandro.tosi resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10694] zipfile.py end of central directory detection not robust

2010-12-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I finally got around to researching this issue in the tracker. Issue 10298 is a close relative to this issue. The fix from that issue make the test that Xuanji added here pass. That issue contains no testsit would be ideal to have

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: FWIW, having just looked at related code in zipfile recently, this patch looks correct to me. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue10771] descriptor protocol documentation has two different definitions of owner class

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: For future reference, the 'trunk' branch was frozen with the release of 2.7 in June 2010. However, this particular text is unchanged since in 2.7.1 and still in 3.2b2 (except for removal of 'new style'.) -- nosy: +terry.reedy

[issue10772] Several actions for argparse arguments missing from docs

2010-12-31 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +bethard versions: +Python 3.2 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10772 ___

[issue10782] Not possible to cross-compile due to poor detection of %lld support in printf

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Requests for information should go to python-list or other support forums. That said, does the response settle this issue, so that it can be closed, or is there still a claim that something should be changed in the Python repository?

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Since the current behavior matches the current doc, class unittest.TextTestRunner(stream=sys.stderr, descriptions=True, verbosity=1, runnerclass=None, warnings=None) A basic test runner implementation which prints results on standard error.

[issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: From reading the Wikipedia article, I might conclude that beta = 1/theta, but from reading random.py, beta=theta. I think this much should be clarified, but without giving the formula in a hard to read text form. Perhaps the random doc should

[issue10789] Lock.acquire documentation is misleading

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Since threading is written in Python, one might expect Lock to be written in Python and its methods to accept keywords. However, threading.py (3.2) has _acquire_lock = _thread.acquire_lock Lock = _aquire_lock so threading.Lock objects are

[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: 2.6 is finished except for possible security patches. This should be verified in a current release, preferably 3.2 -- nosy: +terry.reedy stage: - needs patch versions: +Python 2.7 -Python 2.6 ___

[issue9370] Add reader redirect from test package docs to unittest module

2010-12-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Yeah, I think I wrote this issue based on the diff that added the new note at the top, rather than looking at the existing intro text that already references unittest and doctest. No need to change anything after all. -- resolution:

[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-31 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: it happens on 3.2 (py3k head). -- Added file: http://bugs.python.org/file20208/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10794

[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Removed file: http://bugs.python.org/file20199/z6285.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6285 ___

[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I verified the bug by creating a copy of idlelib/help.txt, making the new help entry, testing it, deleting the copy, and retesting -- IDLE silently disappears. (A copy is necessary because IDLE checks that the file exists and gives a similar

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-31 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: Just to check, does this still work with your changes of msg124959? regex.search(r'\d{4}(\s*\w)?\W*((?!\d)\w){2}', XX) For me it fails to match! -- ___ Python tracker

[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Bug and fix also apply to missing Idlelib/help.txt. r87601 News entry for 3.2. Thanks Scott. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6285

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-31 Thread Jacques Grove
Jacques Grove aquara...@gmail.com added the comment: You're correct, after the change: regex.search(r'\d{4}(\s*\w)?\W*((?!\d)\w){2}', XX) doesn't match (i.e. as before commit 7abd9f9bb1). I was, however, just trying to narrow down which part of the code change killed the performance on

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I'll try to produce a test in the next hour or two -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10801 ___

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I'm attaching a patch with a test for Martin's fix. I had trouble programmatically generating a bad zip for this bug, since it has different encodings for the header and filename (probably created by WinZip?). So I created a directory in test/

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: Removed file: http://bugs.python.org/file20210/issue10801_test.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10801 ___

[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: Added file: http://bugs.python.org/file20211/issue10801_test.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10801 ___