[issue5792] Enable short float repr() on Solaris/x86

2009-11-15 Thread Mark Dickinson
Mark Dickinson added the comment: Committed in r76300 (trunk) and r76301 (py3k). Thanks for all your help, Stefan. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: Yes, test_ascii_formatd fails with 'ImportError: No module named _ctypes'. -- ___ Python tracker ___ __

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Is the test_ascii_formatd failure due to a failed 'from ctypes import ...'? That's the only failure that looks like it could be related. Thanks for this. -- ___ Python tracker _

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: The tests that you mention run o.k., except capi, but that looks harmless: ste...@opensolaris:~/svn/py3k/Lib/test# ../../python test_capi.py test_instancemethod (__main__.CAPITest) ... ok -- Ran

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: > As for the other tests, the errors I get seem to be the same with or > without the patch. Any other tests I should watch out for apart from > test_float.py? Well *ideally* you shouldn't be getting any test failures :-). But I could imagine than running Sola

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Many thanks for testing this, Stefan! I'll tidy up the patch a little bit and add a Misc/NEWS entry, then commit this. -- ___ Python tracker _

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: Tested the patch against an updated 3.2. repr-style is 'short', and I did not see obvious float errors. In particular, test_float.py is passed. I also did not see new compile warnings. As for the other tests, the errors I get seem to be the same with or without th

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: My copy is 32-bit. I never installed a 64-bit version, but I strongly assume that uname -p gives x86_64. BTW, uname -p works on Solaris, but returns 'unknown' on my 64 bit Linux. -- ___ Python tracker

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Stefan, please could you test the attached patch (against py3k) with suncc? With this patch, sys.float_repr_style should report 'short', and 'make test' should not produce any obviously float-related failures. -- keywords: +patch Added file: http://bug

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks. uname looks like the way to go, then. Is your copy of OpenSolaris running in 32-bit mode or 64-bit mode? Does the mode make a difference to the output of uname, or is uname -p always i386, regardless of the mode? I think the configure test for the in

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: If gcc and suncc are present, ./configure chooses gcc and everything is fine. If only suncc is present, it's detected as cc. These tests should be possible: ste...@opensolaris:~/svn/py3k$ cc -V cc: Sun C 5.9 SunOS_i386 Patch 124868-07 2008/10/07 usage: cc [ optio

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: fesetprec and fegetprec are at least semi-standard, it seems. They're recommended in the C99 rationale (see page 121 of http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf ). -- ___ Python tracker

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Excellent! From a bit of searching, it looks as though this assembler syntax works on icc as well, which is very good news. Thanks for finding fesetprec as well. It's a shame this isn't standard C. Oh well; maybe for C201X. I think I'd prefer to stick with

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: The inline asm compiles, but I don't know how good the GNU inline asm support is with suncc in general. I'm not a heavy user of suncc, I just use it for testing. That said, perhaps fesetprec works, too: http://docs.sun.com/app/docs/doc/816-5172/fesetprec-3m

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Stefan, is it possible that suncc already accepts the assembler syntax used in Python/pymath.h (py3k or trunk) for the functions _Py_get_387controlword and _Py_set_387controlword? -- ___ Python tracker

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Looking at: http://docs.sun.com/app/docs/doc/816-5172/fesetenv-3m it seems that fesetenv isn't what we want here. It 'only installs the state of the floating-point status flags represented through its argument'. -- __

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: I see two alternatives: (1) Use fesetenv. I don't know what the appropriate value to pass would be though, or even whether solaris lets you use fesetenv to control the x87 precision. It seems that its primary purpose is to set flags and traps. (2) Use inline

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Stefan Krah mentions in the issue 7281 discussion that suncc supports the C99 fenv functions. I'm not sure how to use these to set the x87 precision, though. (Setting the rounding mode is straightforward.) -- ___ P

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Stefan Krah
Stefan Krah added the comment: I can confirm that short float repr() is active and all float tests are passed on this combination: Ubuntu64bit -> KVM -> OpenSolaris32bit/Python3.2/gcc -- nosy: +skrah ___ Python tracker

[issue5792] Enable short float repr() on Solaris/x86

2009-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: There are some related comments in issue #7281. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue5792] Enable short float repr() on Solaris/x86

2009-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: See the comments in the Include/pyport.h file for an explanation of what's required. (Search for HAVE_PY_SET_53BIT_PRECISION.) -- ___ Python tracker ___

[issue5792] Enable short float repr() on Solaris/x86

2009-04-19 Thread Mark Dickinson
New submission from Mark Dickinson : The short float repr() that's in 3.1 (probably) doesn't work on Solaris/x86 when using Sun's compiler to build. It would be nice to fix this. It probably works on Solaris/x86/gcc, though confirmation of that would be appreciated. Marking as easy, because