[issue2173] Python fails silently on bad locale

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Stuart! I've committed the fix in r67703 and r67704, so it should appear in 3.0.1. This should fix the silent build failure, and the zero-output interpreter. The behaviour is still not ideal: a bad LC_CTYPE setting causes sys.stdout and sys.

[issue2173] Python fails silently on bad locale

2008-12-11 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue2173> ___ ___ Python-bugs-list

[issue3167] math test fails on Solaris 10

2008-12-11 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10764/issue3167.patch ___ Python tracker <http://bugs.python.org/issue3167> ___ ___ Python-bugs-list m

[issue3167] math test fails on Solaris 10

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, both! Fixed in the trunk in r67707. I'll wait to be sure that the buildbots are happy, then merge to 2.6, 3.0, 3.1. -- versions: +Python 3.0, Python 3.1 ___ Python tracker <http://bugs.py

[issue2819] Full precision summation

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this. Let's stick with what we have. -- status: open -> closed ___ Python tracker <http://bugs.python.or

[issue3439] create a numbits() method for int and long types

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Victor, Thanks for the updated patch. I think you need to do a PyErr_Clear after the 'return PyLong_FromSize_t' line. To be safe, you should probably check the exception type first, and either do a PyErr_Clear and continue if it's an Overflo

[issue3439] create a numbits() method for int and long types

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Alternatively, you could just ignore _PyLong_NumBits entirely and put the whole calculation into long_numbits. You're already halfway there with the calculation of msd_bits anyway, and I suspect the code will look cleaner (and run faster) tha

[issue3167] math test fails on Solaris 10

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Buildbots seem content. Merged to 2.6, 3.0, 3.1. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue3682] test_math: math.log(-ninf) fails to raise exception on OpenBSD

2008-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: I've committed the issue 3167 fix in revisions r67707 to r67710. I'm fairly sure that this patch should resolve this issue. (Let me know if it doesn't.) -- resolution: -> fixed status: open -> closed _

[issue3439] create a numbits() method for int and long types

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: Victor, This looks good. If it's okay with you, I'll work on the documentation a little (we need an entry in whatsnew, and a description of the semantics of numbits for 0 and negative integers.) Then I think this will be ready. > I prefe

[issue3439] create a numbits() method for int and long types

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: Here's Victor's patch, but with extra documentation. No code has been changed. Two more questions about the code, Victor; specifically about long_numbits: - why do you use PyLong_FromSize_t rather than PyInt_FromSize_t? - isn't the i

[issue3439] create a numbits() method for int and long types

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: Oops. Here's the patch. Added file: http://bugs.python.org/file12331/numbits-6a.patch ___ Python tracker <http://bugs.python.org/i

[issue4642] optparse - dosn't distinguish between '--option' and '-option'

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: Duplicate of issue #4640. -- nosy: +marketdickinson resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4641] optparse - dosn't distinguish between '--option' and '-option'

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: Duplicate of issue #4640. -- nosy: +marketdickinson resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue3439] create a numbits() method for int and long types

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: > I choosed to use consistent result type. But now I would prefer int :-) I see > that PyInt_FromSize_t() returns a long if the value doesn't fit in an int. So > it's correct. Cool. I think int is better, simply because the result is almo

[issue3439] create a numbits() method for int and long types

2008-12-12 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12331/numbits-6a.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: As far as I'm concerned, this patch is ready to be applied. Raymond, care to give a second opinion? -- assignee: marketdickinson -> rhettinger stage: patch review -> commit review ___ Python tra

[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2008-12-13 Thread Mark Summerfield
Mark Summerfield added the comment: Although I stand by my criticism of IDLE not offering the option of switching off cursor blink, I've now discovered that the problem was with Fedora 10 no longer executing xrdb .Xdefaults; once I added that line to my .bash_profile the cursor blinking st

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: About the name: Java's Bignum has a 'significantBits' method, which apparently returns the position of the MSB (i.e., numbits - 1). GMP has mpz_sizeinbase; mpz_sizeinbase(n, 2) is almost the same as numbits, except that mpz_sizeinbase(0,

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: > Perhaps n.bit_length() with an underscore. I thought I recalled Guido having a preference for float.fromhex over float.from_hex when that got implemented. But either spelling seems good to me. ___ Python tracker &l

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: > I thought I recalled Guido having a preference for float.fromhex over Can't find anything to back this up. It looks like I'm just making this up. ___ Python tracker <http://bugs.pyth

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: > Did you look at the O(lg n) algorithm yet? Any thoughts? So there are two places this could be applied: the int_numbits method and _PyLong_NumBits. I'd be quite surprised if this offered any noticeable speedup in either case. Might be wor

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: Three files: (1) bit_length7.patch just does the numbits->bit_length renaming; otherwise it's the same as numbits-6b.patch. (2) bit_length7_opt.patch uses the fast bitcount method that Raymond pointed out. (3) bit_length_pybench.patch adds a

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file12337/bit_length7_opt.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file12338/bit_length_pybench.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: > Well, I don't think bit_length() warrants a specific test which will > slow down the whole pybench suite. Me neither. It's a temporary patch to pybench, to establish whether it's worth applying optimizations to bit_length. I didn

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: Slightly improved optimized version. Added file: http://bugs.python.org/file12339/bit_length7_opt.patch ___ Python tracker <http://bugs.python.org/issue3

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12337/bit_length7_opt.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: Added another test to pybench; it makes sense to consider cases where the input n is uniformly distributed in [0, 2**31) as well as cases where the output n.bit_length() is uniformly distributed in [0, 32). Added file: http://bugs.python.org/file12340

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12338/bit_length_pybench.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Pytho

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: I think I've found the happy medium: bit_length7_opt2.patch achieves nearly the same performance gains as bit_length7_opt.patch (around 7% for uniformly-distributed inputs, 3.5% for uniformly-distributed outputs), but is much more straightforwar

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12332/numbits-6b.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: > In the documentation, should "same value as ``x.bit_length``" not be > "same value as ``x.bit_length()``"? Yes, of course. Thanks! Added file: http://bugs.python.org/file12343/bit_length7_opt2.patch

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12342/bit_length7_opt2.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12339/bit_length7_opt.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12336/bit_length7.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch; cleanup of comments and slight refactoring of code. Int->float conversions are even a speck faster than the current code, for small inputs. (On my machine, on a Friday night, during a full moon. Your results may differ. :)) Also, retar

[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10694/long_as_double.patch ___ Python tracker <http://bugs.python.org/issue3166> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12343/bit_length7_opt2.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Update both patches: (1) change PyLong_FromLong(ndigits-1) to PyLong_FromSsize_t(ndigits-1) in both patches (it's possible to have a 32-bit long and 64-bit Py_ssize_t), and (2) in the optimized patch, add the table lookup optimization for long_bit_l

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file12349/bit_length7_opt2.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12320/long_as_double2.patch ___ Python tracker <http://bugs.python.org/issue3166> ___ ___ Python-bug

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch (force_to_memory2.patch) that I'm hoping fixes the cmath test failures on Solaris 10/x86. Skip, could you give it a try? The patch isn't final: I need to look for more places where Py_FORCE_DOUBLE should be applied. But I&

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: > The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c) > is attached. The result don't depend from optimisation flag. Thanks, Roumen. I rather suspected that Py_IS_INFINITY was dodgy this way. On the other hand, this i

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Skip. Looks like this problem is 'solved in principle'. Now I have to figure out a non-hackish solution. ___ Python tracker <http://bugs.python.

[issue4653] Patch to fix typos for Py3K

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: It looks to me as though all these are valid, and the patch should be applied to py3k and the 3.0 maintenance branch. Minor nit: the "sizeof(theInfo)" line exceeds 79 characters, in violation of PEP 7. Is there any core developer who's in a p

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for all the comments. Here's an updated patch, with quite a few changes: code: - drop lookup tables in favour of "while(x) {x >>= 1; count += 1;}" - add example to docstring, and use PyDoc_STRVAR macro for docstrings docs

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Changes by Mark Dickinson : -- components: +Interpreter Core -Library (Lib) ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bugs-list mailin

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: Okay; I don't have strong feelings about the form the Python code takes; I'll let you guys argue it out and then fix things accordingly ___ Python tracker <http://bugs.python.

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch. Added file: http://bugs.python.org/file12363/bit_length9.patch ___ Python tracker <http://bugs.python.org/issue3

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12348/bit_length7.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12349/bit_length7_opt2.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12362/bit_length8.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: Bah. Fix test_int so that it actually works. Added file: http://bugs.python.org/file12364/bit_length10.patch ___ Python tracker <http://bugs.python.org/issue3

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12363/bit_length9.patch ___ Python tracker <http://bugs.python.org/issue3439> ___ ___ Python-bug

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: ...and use proper unittest methods instead of asserts... Added file: http://bugs.python.org/file12365/bit_length11.patch ___ Python tracker <http://bugs.python.org/issue3

[issue3439] create a numbits() method for int and long types

2008-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: > Before applying, consider adding back the part of the docs with the '1 + > floor(...' definition. My only (minor) objection to this definition is that a straight Python translation of it doesn't work, thanks to roundoff error and the

[issue4684] sys.exit() exits program when non-daemonic threads are still running

2008-12-17 Thread Mark Florisson
New submission from Mark Florisson : sys.exit() exits the program when non-daemonic threads are still running, in versions >= 2.5. Test included. A demonstration here: http://paste.pocoo.org/show/95766/ (On debian GNU/Linux) -- components: None files: foo.py messages: 77978 nosy: e

[issue3439] create a numbits() method for int and long types

2008-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Committed to trunk in r67822, py3k in r67824. -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue4397] test_socket fails occassionaly in teardown: AssertionError: [Errno 57] Socket is not connected

2008-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. I can reproduce this both on the py3k branch and the trunk. It looks as though there's a race condition in the testShutDown/_testShutDown pair of methods in SocketConnectedTest. If you add the line time.sleep(0.01) to the m

[issue4689] Typo in PyObjC URL on "GUI Programming on the Mac"

2008-12-17 Thread Mark Evans
New submission from Mark Evans : The "GUI Programming on the Mac" page: http://www.python.org/doc/2.5.3/mac/node10.html states that the PyObjC project is at: http://pybojc.sourceforge.net This is incorrect and should be: http://pyobjc.sourceforge.net This appears fixed in t

[issue4692] Framework build fails if OS X on case-sensitive file system

2008-12-18 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in r67844 (trunk), r67845 (2.6), r67846 (py3k) and r67847 (3.0). Thanks for the report and patch! -- nosy: +marketdickinson resolution: -> fixed status: open -> closed versions: +Python 2.7, Pyth

[issue3439] create a numbits() method for int and long types

2008-12-19 Thread Mark Dickinson
Mark Dickinson added the comment: About the footnote: floor(log(n, 2)) is poor code. This is not supposed to be a dramatic statement, just a statement of fact. Its correctness is dependent on minute details of floating point. It is poor code in exactly the same way that "while x <

[issue3439] create a numbits() method for int and long types

2008-12-19 Thread Mark Dickinson
Mark Dickinson added the comment: > ... so that ``k`` is approximately ``1 + int(log(abs(x), 2))``. I guess that could work. One other thing: the docs for the trunk seem to suggest that we should be using trunc here, rather than int. I'm looking at: http://docs.python.org/dev

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Mark Dickinson
New submission from Mark Dickinson : pybench needs to be updated for Python 3.0, in particular to remove use of cmp. Here's a patch, against the py3k branch. Questions (mainly for Marc-André Lemburg): 1. Should the version number be bumped for *all* tests, or just for those that

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Still to do: pybench needs updating to remove a cmp reference; since the changes required for pybench are a little bit more substantial than simple cmp replacement, I've broken this out into a separate issue: issue 4704. There are many uses of cmp

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Should Py_CmpToRich (in object.c) disappear? It's currently used in longobject.c, but nowhere else as far as I can tell. It shouldn't be too hard to update longobject.c to remove the use. ___ Python trac

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like a bug to me. I get the expected behaviour on my machine. Python 3.0+ (release30-maint:67878, Dec 20 2008, 17:31:44) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license&

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Correction: it looks like two bugs to me. I think the wrong-return-type bug is rather serious, possibly a release blocker for 3.0.1. I'll see if I can produce a patch. The incorrect rounding (returning 30.0 instead of 20.0) is less serious, but still

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Why do you say the return type is incorrect? It should, and does, > return a float. The documentation at: http://docs.python.org/dev/3.0/library/functions.html#round says, of round(x[, n]): """The return value is an integer if cal

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Jeffrey, any opinion on this? -- nosy: +jyasskin ___ Python tracker <http://bugs.python.org/issue4707> ___ ___ Python-bug

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Is your guess for round(25.0, > -1)==30.0 that 25.0*(1/10.0) is slightly more than 2.5 on some > systems? Yes, something like that. I don't think it's feasible to make round perfectly correct (for floats) in all cases without implement

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a first attempt at a patch for round(int, int) -> int. -- keywords: +patch Added file: http://bugs.python.org/file12407/round_int_int.patch ___ Python tracker <http://bugs.python.or

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch: fix test_builtin. (Rest of the patch unchanged.) Added file: http://bugs.python.org/file12412/round_int_int2.patch ___ Python tracker <http://bugs.python.org/issue4

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: > >>> round(2, -2**31 + 2) # Press Ctrl + C > Segmentation fault > (backtrace below) Thanks, Daniel. It looks like I messed up the refcounting in the error- handling section of the code. I'll fix this. I don't think the hang i

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: Cause of segfault was doing Py_XDECREF on a pointer that hadn't been initialised to NULL. Here's a fixed patch. I still get the instant result: >>> round(2, -2**31+1) 2 which is a little odd. It's the correct result, but I can

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: Aha. The special result for round(x, 1-2**31) has nothing to do with this particular patch. It's a consequence of: #define UNDEF_NDIGITS (-0x7fff) /* Unlikely ndigits value */ in bltinmodule.c. The same behaviour results for all types, not just

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: > [Me] > > which is a little odd. It's the correct result, but I can't see how [Daniel] > Is it correct? No. :-) It should be 0, as you say. > Given that "round(2, 2**31)" throws an OverflowError I think this is wrong,

[issue4704] Update pybench for python 3.0

2008-12-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the responses! > I don't think should go into 3.0.1 - they are a new feature > and not a bug fix. But if these changes don't go into 3.0.1, and the removal of cmp does, that means that pybench won't run on 3.0.1. It seem

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: Final patch. Skip, could you please give this one a try, and then with any luck this can be fixed for 3.0.1. (Sorry for creating more work; this should be the last time.) I've added a configure test that detects x87 FPU usage, via the double rou

[issue4789] Documentation changes break existing URIs

2008-12-30 Thread Mark Sapiro
New submission from Mark Sapiro : The Mailman GUI contains a few links to the python.org documentation which are now broken. These links and the current equivalents are: http://www.python.org/doc/ works, but could map to http://docs.python.org/ http://www.python.org/doc/current/ works

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-01 Thread Mark Hammond
Mark Hammond added the comment: I've no time to dig deeper now as I suspect testing will require removal of the vc9 assembly from the GAC and testing with a local one, but some comments: test.c's error is "can't find the DLL" - this will be as we attempt to load Pyth

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-01 Thread Mark Hammond
Mark Hammond added the comment: I meant to mention: FWIW, *some* py2exe apps work fine with the old scheme - specifically, IIUC, any app will work fine so long as the .pyd files were next to the executable, which is next to the assembly. I understand this is a significant restriction, but its

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-01 Thread Mark Hammond
New submission from Mark Hammond : This block in exceptions.c: #if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) ... /* turn off assertions in debug mode */ prevCrtReportMode = _CrtSetReportMode(_CRT_ASSERT, 0); #endif Does exactly what the c

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Mark Hammond
Mark Hammond added the comment: I've hacked together something that fixes the problem. I'm working on making it a real patch, but the basis is: * In DllMain (dl_nt.c), we call: case DLL_PROCESS_ATTACH: GetCurrentActCtx(&PyWin_DLLhActivationContext);

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Mark Hammond
Mark Hammond added the comment: It would be interesting to know which tests actually fail. If the tests are explicitly checking a bad fd, then IMO it makes more sense for that test to simply be avoided in debug builds and nothing of value would be left untested. OTOH, I'd also be happy

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Mark Hammond
Mark Hammond added the comment: I guess another option is to expose it via msvcrt and let the test themselves disable it? ___ Python tracker <http://bugs.python.org/issue4

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Mark Hammond
Mark Hammond added the comment: Attaching a patch which works for me against python 2.6. Only ever tested on Vista (ie, where the function pointers etc all load) -- keywords: +needs review, patch Added file: http://bugs.python.org/file12536/bug4566.patch

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Mark Hammond
Changes by Mark Hammond : Removed file: http://bugs.python.org/file12536/bug4566.patch ___ Python tracker <http://bugs.python.org/issue4566> ___ ___ Python-bugs-list m

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Mark Hammond
Mark Hammond added the comment: Attaching a new patch with some typos in the comments corrected. While I'm here, I also meant to mention (again!): * No need to remove the the assembly from the sxs cache - the test "fails correctly" with VS2009 installed. FWIW, I compiled

[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: > Accordingly, I recommend Decimal.from_float(f) with no qualifiers or > optional arguments. I agree with this. Since lossless conversion is feasible, this seems the obvious way to go. It's lucky that the exponent range for (binary) floats is

[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: One also has to worry about the exponent of the converted result: e.g., should Decimal.from_float(10.0) produce Decimal('1E1') or Decimal('10')? The latter looks nicer, to me. IEEE 754 isn't much help here: as far as I can tell it s

[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: > Just for the avoidance of all doubt, do you mean the largest exponent > with the number normalised to one digit to the right of the decimal > place? No. I'm using 'exponent' in the sense described in the standard. See: http:/

[issue1717] Get rid of more refercenes to __cmp__

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch (against py3k) generated from the current state of the py3k-issue1717 branch, for ease of review and testing. The patch needs serious review; it should be considered a first draft, and there are probably many more changes still to be mad

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: [Raymond] > I would > not like to see that extended to cmath or complex() unless compelling > real-world use cases arise. Hmm. Have you looked at the cmath module recently? You may be in for a nasty surprise... > Mark, does Inf hav

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: cdavid, in your application, how hard is it to work around the problem by simply printing and parsing pairs of floats rather than complex numbers? E.g., z = complex(float(real_part), float(imag_part)) ___ Python tracker

[issue4760] cmp gone---What's new in 3.1

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: > Uhm ? The builtin cmp wasn't removed. Non-removal of cmp for 3.0 was an oversight. It *might* be removed in 3.0.1. See issue 1717. -- nosy: +marketdickinson ___ Python tracker <http://bugs

[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: > It looks like you and Raymond have rejected #2 but are keeping #1 I'm not against #2, but I'm not particularly for it either. In any case, once you've converted your float to Decimal it's trivial to round it to whatever precisi

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Mark Hammond
Changes by Mark Hammond : Removed file: http://bugs.python.org/file12537/bug4566.patch ___ Python tracker <http://bugs.python.org/issue4566> ___ ___ Python-bugs-list m

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Mark Hammond
Mark Hammond added the comment: Uploading a corrected patch; some old docs I saw said DWORD, and I obviously neglected to fix every spot I used that, and I've changed 'Vista' to 'XP' in the patch comments. Added file: http://bugs.python.or

<    22   23   24   25   26   27   28   29   30   31   >