Issue2051

classification
Title: float.hex() does not work per CPython 2.7.,3
Type: behaviour Severity: major
Components: Core Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: normanshelley, santa4nt, zyasoft
Priority: Keywords:

Created on 2013-05-15.05:44:07 by normanshelley, last changed 2013-05-17.19:24:22 by santa4nt.

Messages
msg8014 (view) Author: (normanshelley) Date: 2013-05-15.05:44:06
$ ~/bin/jython2.7b1/bin/jython
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52) 
[OpenJDK 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_24
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1234e38
>>> a.hex()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: hex() takes 2 arguments (0 given)


$ python
Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1234e38
>>> a.hex()
'0x1.6aa3d783845dap+136'
>>>
msg8015 (view) Author: Santoso Wijaya (santa4nt) Date: 2013-05-15.21:16:43
One of my patches must've fixed this already:

$ ./dist/bin/jython
*sys-package-mgr*: processing modified jar, '/home/santa/Code/jython/dist/jython-dev.jar'
Jython 2.7b1+ (default:7ef569b359d1, May 15 2013, 14:14:32) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_21
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1234e38
>>> a.hex()
'0x1.6aa3d783845dap+136'
>>> 

Probably need to be included in a unit test, though, if it isn't covered already.
msg8017 (view) Author: Jim Baker (zyasoft) Date: 2013-05-17.18:59:31
I fixed the particular bug in question at the PyCon sprints, so it's trunk with corresponding unit tests from test_float.py. I'm currently reviewing other bugs in test_float and will look at the patches Santoso submitted to see if those can help - sorry I was not aware you had patches for the problem at hand.
msg8018 (view) Author: Santoso Wijaya (santa4nt) Date: 2013-05-17.19:24:22
I have a bunch of patches applied to my mercurial branch and somehow this behavior is fixed there. Haven't had the time to narrow down which actually fixed this, but I suspect it had something to do with this patch of mine: http://bugs.jython.org/issue2013
History
Date User Action Args
2013-05-17 19:24:22santa4ntsetmessages: + msg8018
2013-05-17 18:59:31zyasoftsetstatus: open -> closed
resolution: out of date
messages: + msg8017
nosy: + zyasoft
2013-05-15 21:16:43santa4ntsetmessages: + msg8015
2013-05-15 21:10:46santa4ntsetnosy: + santa4nt
type: behaviour
2013-05-15 05:44:07normanshelleycreate