[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...
Github user asfgit closed the pull request at: https://github.com/apache/tinkerpop/pull/418 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...
Github user admiralFedora commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/418#discussion_r79325013 --- Diff: gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py --- @@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer): def _dictify(self, number): if isinstance(number, bool): # python thinks that 0/1 integers are booleans return number -elif isinstance(number, long): +elif isinstance(number, long) or (number > 2147483647): # in python all numbers are int unless specified otherwise --- End diff -- Whoops. Thanks for reminding me. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...
Github user leifurhauks commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/418#discussion_r79199796 --- Diff: gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py --- @@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer): def _dictify(self, number): if isinstance(number, bool): # python thinks that 0/1 integers are booleans return number -elif isinstance(number, long): +elif isinstance(number, long) or (number > 2147483647): # in python all numbers are int unless specified otherwise --- End diff -- Maybe the absolute value of the integer should be checked here. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...
Github user spmallette commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/418#discussion_r79189025 --- Diff: gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py --- @@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer): def _dictify(self, number): if isinstance(number, bool): # python thinks that 0/1 integers are booleans return number -elif isinstance(number, long): +elif isinstance(number, long) or (number > 2147483647): # in python all numbers are int unless specified otherwise --- End diff -- i guess the expectation is a signed integer --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...
Github user leifurhauks commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/418#discussion_r78990181 --- Diff: gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py --- @@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer): def _dictify(self, number): if isinstance(number, bool): # python thinks that 0/1 integers are booleans return number -elif isinstance(number, long): +elif isinstance(number, long) or (number > 2147483647): # in python all numbers are int unless specified otherwise --- End diff -- is graphson's Int32 unsigned? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...
GitHub user admiralFedora opened a pull request: https://github.com/apache/tinkerpop/pull/418 Fixed issue in NumberSerializer that could cause integer out of bounds In python, unless a number is specified with an L, it will be an int whether it's a 32 or 64 bit integer. When a 64 bit integer is serialized, it could potentially be labeled as an int32 which would cause an integer out of bounds error. You can merge this pull request into a Git repository by running: $ git pull https://github.com/admiralFedora/tinkerpop master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/418.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #418 commit 5573def4a93072a79b66b3bb2e8a1727256b2d3e Author: Carlos Cheung Date: 2016-09-15T02:15:49Z Fixed issue in NumberSerializer where a 64bit integer is misidentified as 32bit --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---