Issue1628469
Created on 2007-01-05.08:34:24 by lmoore, last changed 2007-05-04.05:53:03 by kzuberi.
File name |
Uploaded |
Description |
Edit |
Remove |
builtins.patch
|
lmoore,
2007-01-05.08:34:24
|
|
|
|
msg2583 (view) |
Author: lantz moore (lmoore) |
Date: 2007-01-05.08:34:24 |
|
PyString
__int__: don't overflow, return a long instead
PyFloat
_pow: ValueError when raising number to fractional power
float___int__: don't overflow, return a long instead
__builtin__
ord: TypeError if not a string or a string longer than 1
unichr: ValueError when not 0 < len < 65536
chr: ValueError when not 0 < len < 256
hex: TypeError when no conversion possible
min: TypeError when zero args
vars: TypeError when arg has no __dict__
|
msg2584 (view) |
Author: Khalid Zuberi (kzuberi) |
Date: 2007-01-10.06:18:52 |
|
Nice. The attached patch also includes binascii updates but will skip that part assuming its the same as (or superceded by) patch 1626844. I'll look at applying the rest to 2.3.
Some of these could probably also be applied to 2.2/trunk, but lets return to that after.
Thanks!
- kz
|
msg2585 (view) |
Author: Khalid Zuberi (kzuberi) |
Date: 2007-01-15.08:16:31 |
|
About the chr/unichr changes, as far as i know the jython strategy has been for all strings to be unicode, so this difference from cpython is intentional. There is even a jython bugtest (test073) that checks that chr() will accept larger values. Also mentioned here:
http://jython.org/docs/differences.html
Unless i've misunderstood something, i'm inclinded to stick with historical jython behaviour in this case. The rest of the patch is looking okay to me so far.
|
msg2586 (view) |
Author: lantz moore (lmoore) |
Date: 2007-01-15.21:30:25 |
|
ah, didn't know about the different chr semantics. sorry about that.
and, yeah, the binascii stuff shouldn't have been part of this patch, my bad, again.
|
msg2587 (view) |
Author: Khalid Zuberi (kzuberi) |
Date: 2007-01-19.07:56:39 |
|
Commited to 2.3 in r3051, less the chr/unichr & binascii changes as mentioned. Didn't notice any regressions in the test suites, and several additional tests from test_builtin now pass.
Will drop a few of these into 2.2. I believe int->long was a change of behaviour in cpython from 2.2 to 2.3, but the others are probably good, have to check...
- kz (of the agonizingly-slow-patch-review-society ;-)
|
msg2588 (view) |
Author: Khalid Zuberi (kzuberi) |
Date: 2007-05-04.05:53:03 |
|
applied float _pow, __builtin__ hex and vars fixes to 2.2 in r3203.
- kz
|
|
Date |
User |
Action |
Args |
2007-01-05 08:34:24 | lmoore | create | |
|