[issue6610] Subprocess descriptor debacle

2010-05-13 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Thanks for the test! I'll take a look and likely commit this later. -- assignee: - gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6610

[issue8701] tarfile: first character of member names doubled

2010-05-13 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8701 ___

[issue8678] crashers in rgbimg

2010-05-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: haypo: what's the relationship? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8678 ___

[issue8699] Equality and hashing for functools.partial

2010-05-13 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: Sorry, I realized I made a stupid mistake. (I didn't use PyList_Sort to sort the list in partial_hash.) Here is the corrected patch. -- Added file: http://bugs.python.org/file17315/partial_eq_hash_2.diff

[issue8701] tarfile: first character of member names doubled

2010-05-13 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: Unfortunately, I cannot reproduce your problem and ask you to please provide more information. Would it be possible to attach the output or a screenshot depicting the problem? Which operating system/distribution do you use? Have you

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The issue is indeed gone in HEAD. I've also verified the other 3 active branches. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker

[issue7724] setup.py ignores SDK root on OSX

2010-05-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The attached version should fix the issue found by Stefan. I'm going to do builds on OSX as well as Linux before committing though. -- Added file: http://bugs.python.org/file17316/issue7724-v3.patch

[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-05-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've verified that HEAD for both 3.1 and 3.2 build fine now, hence this issue can be closed. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: If source/target file for unified format diff context doesn't end with new line, the diff should contain this marker: \ No newline at end of file Or else there is information loss when such patch is applied.

[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-05-13 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- assignee: - ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8455 ___ ___

[issue8703] Py3k PyList_Type documentation mentions types.ListType

2010-05-13 Thread Daniel Urban
New submission from Daniel Urban urban.dani...@gmail.com: The Py3k documentation of PyList_Type [1] contains the sentence: This is the same object as list and types.ListType in the Python layer. But there is no types.ListType object in py3k. [1]

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +easy type: - behavior versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8702 ___

[issue8422] tiger buildbot: test_abspath_issue3426 failure (test_genericpath.py)

2010-05-13 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: afaict, it needs backport to 2.7. -- components: +Tests nosy: +flox stage: - commit review status: closed - open type: - crash versions: +Python 2.7 -Python 3.2 ___ Python tracker

[issue1481] test_uuid is warning about unreliable functions

2010-05-13 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1481 ___ ___

[issue6419] Broken test_kqueue.py on OpenBSD

2010-05-13 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6419 ___ ___ Python-bugs-list

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-13 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: If the CGI script crashes before finishing the headers, cgitb will emit invalid HTTP headers before showing the error message. Below are HTTP headers I received, captured with a packet sniffer. Note the --: spam. HTTP/1.1

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-13 Thread Daniel Stutzbach
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8704 ___ ___

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I think difflib is behaving as intended here; changing to feature request. Could you please clarify about the information loss? I'm not seeing it. As far as I can tell, the fact that unified_diff produces a list rather than a single

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It turns out that this problem was already reported in issue 2142 (which has a patch); closing as a duplicate. -- resolution: - duplicate status: open - closed superseder: - naive use of ''.join(difflib.unified_diff(...)) results

[issue2142] naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that don't end with end-of-line char (same with context_diff)

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Closed 8702 as a duplicate of this one. Combining nosy lists. -- nosy: +mark.dickinson, techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2142

[issue2142] naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that don't end with end-of-line char (same with context_diff)

2010-05-13 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2142 ___ ___

[issue7449] A number tests crash if python is compiled --without-threads

2010-05-13 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Victor, I think one more skip is required in test_socketserver. -- nosy: +skrah resolution: fixed - status: closed - open Added file: http://bugs.python.org/file17317/nothreads-socketserver-shutdown.patch

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: You mean that this patch sits in here for 2 years already? This suxx. And nobody added the tag 'easy', because people haven't explicitly requested tracker privileges? That suxx. And it won't be in 2.7 because of that.. I am

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Trent, the \ New line... seems to be feature specific to unified format only. http://en.wikipedia.org/wiki/Diff#Unified_format -- ___ Python tracker rep...@bugs.python.org

[issue4898] {context, unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk

2010-05-13 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Another 'easy' patch hangs for ages. =/ tag:easy tag:difflib -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4898

[issue7585] difflib should separate filename from timestamp with tab

2010-05-13 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: tag:difflib -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7585 ___ ___

[issue8422] tiger buildbot: test_abspath_issue3426 failure (test_genericpath.py)

2010-05-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: afaict, it needs backport to 2.7. Right: r81135 (and r81137). Blocked on 2.6 (it doesn't have the non-ASCII path test): r81139. -- status: open - closed ___ Python tracker

[issue4898] {context, unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk

2010-05-13 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Thanks for the patch. This was fixed as part of issue 7585. Please add issue 7585 as superceder and close this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4898

[issue8084] pep-0370 on osx duplicates existing functionality

2010-05-13 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: It fails on x86 Tiger trunk buildbot, too. (the PPC Tiger buildbot is happy) -- keywords: +buildbot nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8084

[issue8699] Equality and hashing for functools.partial

2010-05-13 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: On python-dev Yaniv Aknin pointed out that the keywords dictionary of a partial object is mutable [1]. This causes problems with hashing and equality. The new patch replaces the keywords dictionary with a read-only proxy of that

[issue8705] shutil.rmtree with empty filepath

2010-05-13 Thread Dan Koch
New submission from Dan Koch koc...@ornl.gov: The following sequence raises an exception, but nonetheless removes all files from the Desktop under Windows Vista. import os, shutil, user desktop_dir = os.path.join(user.home, 'Desktop') os.chdir(desktop_dir) shutil.rmtree('') This does not

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Hmm. Not in my version of diff: it seems to use '\ No newline at end of file' for both unified and 'normal' diffs. $ diff --version diff (GNU diffutils) 2.8.1 Copyright (C) 2002 Free Software Foundation, Inc. ... $ diff 1.txt 2.txt 2c2

[issue8423] tiger buildbot: test_pep277 failures

2010-05-13 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- assignee: - ronaldoussoren components: +Macintosh, Tests nosy: +flox, mark.dickinson, michael.foord, ned.deily, ronaldoussoren stage: - needs patch type: - behavior versions: +Python 2.7 ___

[issue8423] tiger buildbot: test_pep277 failures

2010-05-13 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Some diagnosis information ... - happens for 2 tests inside test_pep277: test_listdir and test_normalize - happens only for 4 weird filenames (added with #8180) - happens only on x86 Tiger buildbot (PPC Tiger does not report this

[issue8701] tarfile: first character of member names doubled

2010-05-13 Thread Poor Yorick
Poor Yorick pooryor...@users.sourceforge.net added the comment: I can't reproduce it now, either. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8701 ___

[issue3605] Py_FatalError causes infinite loop

2010-05-13 Thread Jeffrey Yasskin
Jeffrey Yasskin jyass...@gmail.com added the comment: Fixed in r81142. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3605

[issue8423] tiger buildbot: test_pep277 failures

2010-05-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: It prefer if it were clear why these tests fail (but don't have time to look into this at the moment). That is, I don't mind if the tests get disabled on darwin, but only if there is a documented reason for it because otherwise

[issue8706] accept keyword arguments on all base type methods and builtins

2010-05-13 Thread Gregory P. Smith
New submission from Gregory P. Smith g...@krypto.org: C Python has a real wart in that standard types and library functions that are implemented in C do not always accept keyword arguments: 'xx'.find('xx', 4) 4 'xx'.find('xx', start=4) Traceback (most recent call last): File stdin,

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: After experimenting with changing the order of the multiplications and not having much luck, I went back and looked for other differences in Alexander's Python functions that might cause the speed difference. I believe

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-13 Thread Marcin Bachry
Marcin Bachry hegel...@gmail.com added the comment: I wrote a Perl script testing this issue and it fails too, so it's most probably a bug in sqlite itself. I think the bug is already reported under id 26ff0c82d1 in sqlite bug tracker: http://www.sqlite.org/src/rptview?rn=2 -- nosy:

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Daniel, Your variant does not seem to work: def partial_product3(j, i): ... a = [l 1 | 1 for l in range(j, i + 1)] ... n = len(a) ... while 1: ... if n == 1: ... return a[0] ...

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-05-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Support of characters outside the Unicode BMP (code 0x) is not complete in narrow build (sizeof(Py_UNICODE) == 2) for Python2: $ ./python Python 2.7b2+ (trunk:81139M, May 13 2010, 18:45:37) x=u'\U0001' x[0], x[1]

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Isn't it amazing how fast one can make incorrect code? ;-) Here is a fixed version of my partial_product3, but now it is no faster than partial_product. def partial_product3(j, i): a = [l 1 | 1 for l in range(j, i + 1)]

[issue8703] Py3k PyList_Type documentation mentions types.ListType

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

[issue1100562] deepcopying listlike and dictlike objects

2010-05-13 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: Unit tests added; tested both on python2.6 and python2.7. -- nosy: +maker versions: +Python 2.6 Added file: http://bugs.python.org/file17319/issue1100562.patch ___ Python tracker

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Does anyone feel like doing a speed comparison between Daniel's C patch and a version with a direct no-frills iterative version of factorial_part_product (i.e., just a simple 'for (i = n; i = m; i += 2) { multiply running product by i }?

[issue8423] tiger buildbot: test_pep277 failures

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It prefer if it were clear why these tests fail I agree. There's little point having tests if we're just going to disable them when they fail without understanding why they're failing first. At that point a green buildbot just means Hey,

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, May 13, 2010 at 5:31 PM, Mark Dickinson rep...@bugs.python.org wrote: And why are we trying to speed up the pure Python factorial code here? I would expect that for large factorials the performance will be

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I would expect that for large factorials the performance will be determined by the number of long multiplications and the size of multiplicands. Okay, but I don't think we should care about the performance of *really* large factorials for

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Speaking of getting side-tracked, I didn't see an answer to a question I asked earlier. I'd like to get some feedback before I proceed with revising the patch. For the find-last-set-bit (to replace log2) and count-set-bits

[issue1100562] deepcopying listlike and dictlike objects

2010-05-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Library (Lib) -None nosy: +ezio.melotti stage: unit test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1100562

[issue8707] Duplicated document in telnetlib.

2010-05-13 Thread INADA Naoki
New submission from INADA Naoki songofaca...@gmail.com: http://docs.python.org/dev/library/telnetlib.html#telnetlib.Telnet The part number can be passed to the constructor... is duplicated. -- assignee: d...@python components: Documentation messages: 105667 nosy: d...@python, naoki

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, May 12, 2010 at 3:47 PM, Mark Dickinson rep...@bugs.python.org wrote: ... Realistically though, I don't see an iterative version of factorial_part_product as an option for the C patch, without a significant

[issue8423] tiger buildbot: test_pep277 failures

2010-05-13 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: The gory details... import os, unicodedata tempdir = u'temp_pep277' name = u'\u0385\u03d3\u03d4' os.mkdir(tempdir) with open(os.path.join(tempdir, name), 'w') as f: ... f.write('foo') unicodedata.normalize('NFD', name)

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-05-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch for Python3: - Fix PyUnicode_AsWideChar() to support surrogates (Py_UNICODE: 2 bytes, wchar_t: 4 bytes) - u_set() of _ctypes uses PyUnicode_AsWideChar() - add a test (skipped if sizeof(wchar_t) is smaller than 4 bytes)

[issue8584] test_multiprocessing skips some tests

2010-05-13 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Value and copy come from multiprocessing.sharedctypes, not from ctypes. Changed the import and also the test skipping based on this. (done during a presentation with the Chicago Python Users Group) -- keywords: +patch nosy: +brian.curtin

[issue8584] test_multiprocessing skips some tests

2010-05-13 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- keywords: +needs review stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8584 ___

[issue8708] OpenID blunder

2010-05-13 Thread Jack Diederich
New submission from Jack Diederich jackd...@gmail.com: I tried logging into the tracker using my gmail login and accidentally created a new user. Could someone either wipe out the OpenID for jackd...@gmail.com (but NOT the jackdied login with email addy of jackd...@gmail.com) or combine the

[issue8707] Duplicated document in telnetlib.

2010-05-13 Thread Jack Diederich
Changes by Jack Diederich jackd...@gmail.com: -- assignee: d...@python - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707 ___

[issue8708] OpenID blunder

2010-05-13 Thread Jack Diederich
Jack Diederich jackd...@gmail.com added the comment: Woops, didn't know that email would create a new bug. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8708 ___

[issue8423] tiger buildbot: test_pep277 failures

2010-05-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Reference about OSX decomposition: http://developer.apple.com/mac/library/qa/qa2001/qa1173.html Mac OS X source code: http://www.opensource.apple.com/source/xnu/xnu-1504.3.12/bsd/vfs/vfs_utfconv.c?txt --

[issue4653] Patch to fix typos for Py3K

2010-05-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I fixed the typo in pythonrun.c: r81156. I don't use Windows, so I cannot review the other fixes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4653

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2010-05-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Here is a patch catching the _PyUnicode_AsString() error. input() uses sys.stdout.encoding to encode the prompt to a byte string, but PyOS_StdioReadline() writes the prompt to stderr (it should use sys_stdout). I don't know which

[issue5099] subprocess.Popen.__del__ causes AttributeError (os module == None)

2010-05-13 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: OK, my patch is committed: 2.6 81158 2.7 81154 3.1 81159 3.2 81155 I didn't apply your test, Gabriel, as it passed without the fixes. Thanks to the work you did on it, though. -- resolution: - fixed status: open - closed

[issue8698] PEP 391: Adding documentation of logging.config.dictConfig

2010-05-13 Thread Dan Buch
Changes by Dan Buch daniel.b...@gmail.com: -- nosy: +meatballhat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8698 ___ ___ Python-bugs-list

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread Dan Buch
Changes by Dan Buch daniel.b...@gmail.com: -- nosy: +meatballhat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2142 ___ ___ Python-bugs-list

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-13 Thread Dan Buch
Changes by Dan Buch daniel.b...@gmail.com: -- nosy: +meatballhat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8704 ___ ___ Python-bugs-list

[issue8706] accept keyword arguments on all base type methods and builtins

2010-05-13 Thread Dan Buch
Changes by Dan Buch daniel.b...@gmail.com: -- nosy: +meatballhat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8706 ___ ___ Python-bugs-list

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, May 13, 2010 at 5:58 PM, Mark Dickinson rep...@bugs.python.org wrote:  Optimizations that speed up, say, factorial(n) for n = 1000 would seem more valuable. I am attaching a variant of my patch which precomputes

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: That's a clever idea. Do you have a Python script that generates the precomputed values? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: It's a little too clever though. It gives the wrong answer for 29!. I'll have a revised version of my patch done sometime tomorrow. -- ___ Python tracker rep...@bugs.python.org

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Oh, my! How did that last term get into precomputed list?! It should have been precomputed[] = {3, 15, 5, 35, 315, 63, 693, 9009, 1287, 19305, 328185, 36465, 692835, 14549535, 1322685, 30421755,

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Attached is a patch to improve the unit tests for the factorial function. To compute the check value, it keeps a running total instead of recomputing the factorial from scratch inside the loop. It checks up to range(999) and

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Added file: http://bugs.python.org/file17327/factorial-precompute-partials.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17327/factorial-precompute-partials.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17325/factorial-precompute-partials.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Added file: http://bugs.python.org/file17328/factorial-precompute-partials.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Attached is a simple bash script to run math.factorial(n) through timeit for several values of n. It makes comparing the speed of different builds MUCH easier. -- Added file:

[issue8692] Use divide-and-conquer for faster factorials

2010-05-13 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Mark Does anyone feel like doing a speed comparison between Daniel's C patch and a version with a direct no-frills iterative version of factorial_part_product (i.e., just a simple 'for (i = n; i = m; i += 2) { multiply

[issue4898] {context, unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk

2010-05-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - fixed stage: - committed/rejected status: open - closed superseder: - difflib should separate filename from timestamp with tab ___ Python tracker rep...@bugs.python.org

[issue8708] OpenID blunder

2010-05-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I have retired the user Jack.Diederich. In the future, please use the meta tracker to discuss issues with this tracker. -- nosy: +loewis -Jack.Diederich ___ Python tracker rep...@bugs.python.org