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

2010-04-04 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This mapping is in conformance with the de-facto standard of that encoding, Microsoft Windows, see http://www.autumn.org/etc/unidif.html http://mail.python.org/pipermail/i18n-sig/2003-June/001598.html

[issue7583] doctest should normalize tabs when comparing output

2010-04-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

[issue7585] difflib should separate filename from timestamp with tab

2010-04-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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. --

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Committed (with some tabs in test_struct.py changed to spaces) to trunk in r79745. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300

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

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org

[issue8307] test_pep263 failure on OS X

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Derek O'Connor
Derek O'Connor derekrocon...@eircom.net 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

[issue8304] strftime and Unicode characters

2010-04-04 Thread AndiDog
AndiDog andi...@web.de 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 rep...@bugs.python.org http://bugs.python.org/issue8304

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-04-04 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: Thanks, Martin. Issue closed as far as I'm concerned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8308 ___

[issue8304] strftime and Unicode characters

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

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr 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

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

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

2010-04-04 Thread Ozgur Dogan Ugurlu
New submission from Ozgur Dogan Ugurlu dog...@gmail.com: 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

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

2010-04-04 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - wont fix stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8308

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue7696] Improve Memoryview/Buffer documentation

2010-04-04 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I've refreshed the Rietveld patch as well: http://codereview.appspot.com/660042 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8188

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

2010-04-04 Thread Jeff Pursell
New submission from Jeff Pursell jpurs...@gmail.com: 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

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Tim Peters
Tim Peters tim.pet...@gmail.com 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

[issue8304] strftime and Unicode characters

2010-04-04 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ Python-bugs-list

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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. :)

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

2010-04-04 Thread Paul Smith
Changes by Paul Smith paulsm...@pobox.com: -- nosy: +paulsmith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8154 ___ ___ Python-bugs-list mailing

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr 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

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

2010-04-04 Thread Jeff Pursell
Jeff Pursell jpurs...@gmail.com 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

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

[issue8309] Sin(x) is Wrong

2010-04-04 Thread Derek O'Connor
Derek O'Connor derekrocon...@eircom.net 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

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

2010-04-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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 rep...@bugs.python.org http://bugs.python.org/issue8188

[issue8035] urllib.request.urlretrieve hangs

2010-04-04 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr 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

[issue8188] Unified hash for numeric types.

2010-04-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue8312] Add post/pre hooks for distutils commands

2010-04-04 Thread Tarek Ziadé
New submission from Tarek Ziadé ziade.ta...@gmail.com: 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

[issue8035] urllib.request.urlretrieve hangs

2010-04-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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.

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

2010-04-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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 rep...@bugs.python.org http://bugs.python.org/issue8287

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-04 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com 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

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

2010-04-04 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r79769. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8310

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

2010-04-04 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com 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:

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

2010-04-04 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com 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 rep...@bugs.python.org

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

2010-04-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed in r79778. We'll see how the buildbots fare. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8287

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

2010-04-04 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Looks good to me. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___

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

2010-04-04 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Vetoshkin Nikita
Vetoshkin Nikita nikita.vetosh...@gmail.com 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()