[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: > What kind of signals can be received in real-life? We use SIGUSR1 to reopen log files after rotation. sighandler works just fine, but after that Paste crashes. I suppose that implementing silent syscall restart at select.select() level is a bad idea (exp

[issue8218] Fix typos and phrasing in the Web servers howto

2010-04-04 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r79781 (trunk), r79782 (release26-maint), r79783 (py3k) and r79784 (release31-maint). Thanks to all! -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Pytho

[issue8300] Allow struct.pack to handle objects with an __index__ method.

2010-04-04 Thread Meador Inge
Meador Inge added the comment: Looks good to me. -- status: pending -> open ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris

2010-04-04 Thread R. David Murray
R. David Murray added the comment: Committed in r79778. We'll see how the buildbots fare. -- stage: patch review -> commit review ___ Python tracker ___

[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-04 Thread Jason R. Coombs
Jason R. Coombs added the comment: This latest patch (26) only merges the latest changes from the repo. -- Added file: http://bugs.python.org/file16761/windows symlink draft 26.patch ___ Python tracker _

[issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris

2010-04-04 Thread Dave Malcolm
Dave Malcolm added the comment: I believe $(INSTALL_SCRIPT) was changed to $(INSTALL_DATA) in r79716 (see http://bugs.python.org/issue8032#msg102288 ) Attaching refreshed version of the patch. -- Added file: http://bugs.python.org/file16760/introduce-var-for-gdb-hooks-002.patch

[issue8310] dis.dis function skips new-style classes in a module

2010-04-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r79769. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: This patch implements Michael's suggestion (but not the ErrorHolder part): http://bugs.python.org/issue7559#msg97462 The unit tests all pass with no change. If this approach looks good to you, I can add a unit test to the patch that checks that this bug has

[issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris

2010-04-04 Thread R. David Murray
R. David Murray added the comment: Hmm. The patch didn't apply to my current trunk checkout. I'll look into why later. -- nosy: +r.david.murray ___ Python tracker ___

[issue8035] urllib.request.urlretrieve hangs

2010-04-04 Thread R. David Murray
R. David Murray added the comment: @andyharrington: No, crash is when the interpreter segfaults. I'm making it priority high, though, since it is a hang during an operation that is likely to happen fairly frequently. Senthil may want to bump it up even higher. @neologix: Thanks for figuring

[issue8312] Add post/pre hooks for distutils commands

2010-04-04 Thread Tarek Ziadé
New submission from Tarek Ziadé : Add hooks to a script can be launched before/after a command. This will be useful to build pre/post commit hooks for install/uninstall commands for instance -- assignee: tarek components: Distutils2 messages: 102353 nosy: tarek severity: normal status:

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, hash values are C longs, regardless of platform. I think that's probably too ingrained to consider changing it (we'd have to change hashes of all the non-numeric types, too). -- ___ Python tracker

[issue8035] urllib.request.urlretrieve hangs

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: Alright, what happens is the following: - the file you're trying to retrieve is actually redirected, so the server send a HTTP/1.X 302 Moved Temporarily - in urllib, when we get a redirection, we call redirect_internal: def redirect_internal(self,

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Stefan Krah
Stefan Krah added the comment: Actually the current long_hash() is affected as well. On Windows 64-bit: >>> hash(2**31) -2147483648 >>> hash(2**32) 1 -- ___ Python tracker ___

[issue8311] wave module sets data subchunk size incorrectly when writing wav file

2010-04-04 Thread R. David Murray
R. David Murray added the comment: Any chance you could create a unit test for this? (The current set of tests is...pretty minimal.) Also, having the patch in unified diff format relative to the top of the source three would be helpful (although this one is small enough we could certainly ap

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Derek O'Connor
Derek O'Connor added the comment: @ Tim Peters " ... are much keener about speed than avoiding noise results for inputs in ranges they *never intend to use* ". It is the *unintended use* that worries me. Sadly, "Speed is King". Perhaps that aphorism should be "Speed is Ki(lli)ng". @ Mark Di

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Stefan Krah
Stefan Krah added the comment: Mark, very nice concept! - I'm just starting to review the patch, but I think the unsigned longs in_Py_HashDouble() and long_hash() should be uint64_t on a 64-bit OS. For instance, now on Windows 64-bit: >>> hash(2**61-1) 1073741823 -- _

[issue8311] wave module sets data subchunk size incorrectly when writing wav file

2010-04-04 Thread Jeff Pursell
Jeff Pursell added the comment: Here's my fix. The left file is the original and the right file is my version. Perhaps someone should check this patch on a big endian machine to make sure there are no issues there. I do not anticipate any issues. 416c416 < nframes = len(data) // (s

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: This is because difflib.ndiff (called by difflib.HtmlDiff.make_table), contrarily to difflib.unified_diff (and probably kdiff3), doesn't restrict itself to contiguous lines, and searches diff even inside lines, so the complexity is much worse (see ho

[issue8154] os.execlp('true') crashes the interpreter on 2.x

2010-04-04 Thread Paul Smith
Changes by Paul Smith : -- nosy: +paulsmith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: > We could similarly take on porting and maintaining KC Ng's fdlibm Gulp. If we did that, I'd definitely want to push for dropping Python support for non-IEEE 754 systems. I'm not sure I've fully recovered from the dtoa.c addition yet. :) -- _

[issue8304] strftime and Unicode characters

2010-04-04 Thread Brian Curtin
Changes by Brian Curtin : -- versions: -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Tim Peters
Tim Peters added the comment: At heart, this is really the same kind of thing that eventually prodded Python into adopting David Gay's burdensome ;-) code for correctly rounded double<->string I/O conversions. We could similarly take on porting and maintaining KC Ng's fdlibm (an open source

[issue8311] wave module sets data subchunk size incorrectly when writing wav file

2010-04-04 Thread Jeff Pursell
New submission from Jeff Pursell : I tried to create a 4 second file and only heard the first 2 seconds. The file size was correct for a 44.1 kHz, 16 bit mono file at 4 seconds, but both aplay and audactiy ignored the second half of the file. I went to this page https://ccrma.stanford.edu/co

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: I've refreshed the Rietveld patch as well: http://codereview.appspot.com/660042 -- ___ Python tracker ___ _

[issue7696] Improve Memoryview/Buffer documentation

2010-04-04 Thread Georg Brandl
Georg Brandl added the comment: > (I don't know why it doesn't have its own anchor, though) Because that is only a link to the real description: http://docs.python.org/dev/library/stdtypes.html#memoryview And I think even you, Mr Potrou, could infer how to add glossary entries from one look

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: New patch: - document and test sys.hash_info - document numeric hash definition (in Doc/library/stdtypes.rst; I'm not sure whether this is the best place for it) - document Decimal change (Decimal instances are now comparable with instances of float,

[issue8308] raw_bytes.decode('cp932') -- spurious mappings

2010-04-04 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> wont fix stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue8310] dis.dis function skips new-style classes in a module

2010-04-04 Thread Ozgur Dogan Ugurlu
New submission from Ozgur Dogan Ugurlu : The documentation says: dis.dis([bytesource]) Disassemble the bytesource object. bytesource can denote either a module, a class, a method, a function, or a code object. For a module, it disassembles all functions. For a class, it disassembles all method

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > What kind of signals can be received in real-life? There are lots of possible answers. Here's one. You launch a child process with os.fork() (and perhaps os.exec*() as well). Eventually you'll get a SIGCHLD in the parent when the child exits. If yo

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: In real life, you can receive for example SIGSTOP (strace, gdb, shell), but mostly SIGCHLD (any process spawning children), etc. The attached patch just restarts calls when EINTR is received, as is done in subprocess module. The mailing list is a goo

[issue8304] strftime and Unicode characters

2010-04-04 Thread AndiDog
AndiDog added the comment: Definitely a Windows problem. I did this on Visual Studio 2008: wchar_t out[1000]; time_t currentTime; time(¤tTime); tm *timeStruct = gmtime(¤tTime); size_t ret = wcsftime(out, 1000, L"%d%A", timeStruct); wprintf(L"ret = %d, out = (%s)\n", ret

[issue8308] raw_bytes.decode('cp932') -- spurious mappings

2010-04-04 Thread John Machin
John Machin added the comment: Thanks, Martin. Issue closed as far as I'm concerned. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: What kind of signals can be received in real-life? (I'm assuming that most signals are of the kind that you only receive if someone else deliberately sends it to you, in which case you are supposed to be prepared to handle it) Also, does your patch still allo

[issue8304] strftime and Unicode characters

2010-04-04 Thread AndiDog
AndiDog added the comment: Just installed Python 3.1.2, same problem. I'm using Windows XP SP2 with two Python installations (2.6.4 and now 3.1.2). -- ___ Python tracker ___ ___

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: A patch to make select calls EINTR-safe is attached, but: - there are many modules that suffer from the same problem, so maybe a fix at select level would be better - if not, it could be a good idea to add this EINTR-retry handler to a given module (s

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: > Python 3.1.2 -- 32 bit gives sin(2^60) = -0.7391806966492228 Interesting. I get >>> sin(2.**60) -0.83064921763725463 On both OS X 10.6.3 (64-bit build) and OS X 10.5.something (32-bit build). But this is all down to the platform math library, of course.

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Derek O'Connor
Derek O'Connor added the comment: Reply to Mark Dickinson Python 3.1.2 -- 32 bit gives sin(2^60) = -0.7391806966492228 PariGp 2.3.4 gives sin(2^60) = -0.8306492176372546505752817956 So it seems Intel's x87 FSIN is not being used. Application? I don't have one, but it is not too hard

[issue8307] test_pep263 failure on OS X

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, Benjamin's checkin seems to have fixed it for me, too. Thanks, Benjamin! There's still the issue of the Tkinter import changing the locale, but that seems to be out of Python's control. As far as I can tell, it happens when the module initialization ca

[issue8300] Allow struct.pack to handle objects with an __index__ method.

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: Merged to py3k in r79746. Meador, does this all look okay, now? -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> pending ___ Python tracker __

[issue8300] Allow struct.pack to handle objects with an __index__ method.

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: Committed (with some tabs in test_struct.py changed to spaces) to trunk in r79745. -- ___ Python tracker ___ __

[issue8300] Allow struct.pack to handle objects with an __index__ method.

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: Probably both those conditions can't be satisfied; I'm wasn't sure what happened if something's __index__ method returned something other than an int or long. But now I bother to look at the source (in Objects/abstract.c) I see that there *is* already an ex

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: What Ilya Sandler said! Computing sin or cos with large arguments requires high precision for the intermediate calculations (e.g., for sin(1e22) you'd need around 40 digits of precision for the reduction step), so most math libraries don't bother. This is

[issue7585] difflib should separate filename from timestamp with tab

2010-04-04 Thread R. David Murray
R. David Murray added the comment: We could avoid the 7583 problem by making the doctests use NORMALIZE_WHITESPACE and moving the real *tests* into the unittests for the module. I think that would be a good thing to do anyway. -- ___ Python tracke

[issue7583] doctest should normalize tabs when comparing output

2010-04-04 Thread R. David Murray
R. David Murray added the comment: Having thought about it some more, I see why you did the patch the way you did. The fact that there are two completely different ways to expand tabs in the output that are equally valid and have their advantages and disadvantages makes me wonder if this shou