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

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall 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 same for SocketIO.write()

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

2010-12-31 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +loewis, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

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

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: issue1515839 seems to be a duplicate of this one. -- ___ Python tracker ___ ___ Python-bugs-list mai

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

2010-12-31 Thread Jacques Grove
Jacques Grove 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 leaving the FAST_IN

[issue1515839] socket timeout inheritance on accept

2010-12-31 Thread Ned Deily
Ned Deily 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: -> duplicate status

[issue6210] Exception Chaining missing method for suppressing context

2010-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le vendredi 31 décembre 2010 à 00:07 +, Patrick W. a écrit : > Patrick W. 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 - obviously the cause takes a hig

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

2010-12-31 Thread Antoine Pitrou
Antoine Pitrou 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 readline() funct

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

2010-12-31 Thread Konstantin Osipov
Konstantin Osipov 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 sends 35 bytes over to a

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

2010-12-31 Thread M. Z.
New submission from M. Z. : 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 attached ZIP file

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

2010-12-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc, haypo, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

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

2010-12-31 Thread Antoine Pitrou
Antoine Pitrou 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 accept()? - wh

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

2010-12-31 Thread Martin v . Löwis
Martin v. Löwis 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 ___

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

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall 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 if it fails. The test

[issue6210] Exception Chaining missing method for suppressing context

2010-12-31 Thread Ethan Furman
Ethan Furman 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 parse than raise Att

[issue9361] Tests for leapdays in calendar.py module

2010-12-31 Thread Sandro Tosi
Sandro Tosi 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 good to apply it to py3k

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

2010-12-31 Thread Sandro Tosi
Sandro Tosi 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 added the comment: Why not? :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue1674555] sys.path in tests contains system directories

2010-12-31 Thread R. David Murray
R. David Murray 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 patch removes the '-l'

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

2010-12-31 Thread Sandro Tosi
Sandro Tosi 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 ___ Python trac

[issue9361] Tests for leapdays in calendar.py module

2010-12-31 Thread R. David Murray
R. David Murray 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 for the patch, John, and

[issue9342] Tests for monthrange in calendar.py module

2010-12-31 Thread R. David Murray
R. David Murray 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 ___

[issue10270] Fix resource warnings in test_threading

2010-12-31 Thread Sandro Tosi
Sandro Tosi added the comment: Already fixed in r86107 -- nosy: +sandro.tosi resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker _

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

2010-12-31 Thread R. David Murray
R. David Murray 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 tests that test the b

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

2010-12-31 Thread R. David Murray
R. David Murray 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 ___

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

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy 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 : -- nosy: +bethard versions: +Python 3.2 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing li

[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 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? -- nosy: +terry.r

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy 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. ..." this is a f

[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 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 give referen

[issue10789] Lock.acquire documentation is misleading

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy 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 C-coded _thread.lo

[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy 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 ___ Python tracker

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

2010-12-31 Thread Nick Coghlan
Nick Coghlan 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: -> invalid status:

[issue10794] Infinite recursion while garbage collecting loops indefinitely

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

[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file20199/z6285.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy 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 message as in the

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

2010-12-31 Thread Matthew Barnett
Matthew Barnett 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 added the comment: Bug and fix also apply to missing Idlelib/help.txt. r87601 News entry for 3.2. Thanks Scott. -- ___ Python tracker ___ _

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

2010-12-31 Thread Jacques Grove
Jacques Grove 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 my regression tests

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

2010-12-31 Thread Eli Bendersky
Eli Bendersky added the comment: I'll try to produce a test in the next hour or two -- nosy: +eli.bendersky ___ Python tracker ___ __

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

2010-12-31 Thread Eli Bendersky
Eli Bendersky 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/ and placed the

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

2010-12-31 Thread Eli Bendersky
Changes by Eli Bendersky : Removed file: http://bugs.python.org/file20210/issue10801_test.1.patch ___ Python tracker ___ ___ Python-bugs-list

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

2010-12-31 Thread Eli Bendersky
Changes by Eli Bendersky : Added file: http://bugs.python.org/file20211/issue10801_test.1.patch ___ Python tracker ___ ___ Python-bugs-list ma