05-04-2020, 01:36 PM
(This post was last modified: 05-04-2020, 01:37 PM by remkonoteboom.)
This seems to be a problem with the python implementation of XMLRPC. It should understand that the data can come from different sources that may have different definition of int, especially since there is such a large int limitation in python2. In the xmlrpc code, they should have something like:
This would solve the problem for XMLRPC. Since this is all fixed in Python 3, I don't know if there is much of an appetite to fix this in Python2.
Since you do have control over what you are sending from the client, I think this is the only place you have the opportunity to circumvent the problem, even if you have to use the less than ideal solution of converting to a string and then converting back to a long.
Code:
try:
value = int(input)
except WhateverException:
value = long(input)
This would solve the problem for XMLRPC. Since this is all fixed in Python 3, I don't know if there is much of an appetite to fix this in Python2.
Since you do have control over what you are sending from the client, I think this is the only place you have the opportunity to circumvent the problem, even if you have to use the less than ideal solution of converting to a string and then converting back to a long.