X Tutup
The Wayback Machine - https://web.archive.org/web/20260312003011/https://github.com/python/cpython/pull/102930
Skip to content

gh-102927: xmlrpc: allow 64bit and bigintegers#102930

Closed
ghost wants to merge 2 commits intomainfrom
unknown repository
Closed

gh-102927: xmlrpc: allow 64bit and bigintegers#102930
ghost wants to merge 2 commits intomainfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Mar 22, 2023

When using xmlrpc, integer values smaller than MININT = -2147483648
or larger than MAXINT = 2147483647, an OverflowError:
"int exceeds XML-RPC limits" is thrown.

As this might be perfectly in line with the original XML-RPC spec, the
tag and has evolved and even is used in the library on
the receiving end.

This patch will change the behavior in the sense that 32 bit integer
values will still be sent with the tag, while larger (smaller)
numbers are enclosed with the tag or tag respectively.

Minimal code example to test:

import xmlrpc.client
xmlrpc.client.dumps(("bla",2147483648))

Signed-off-by: Matthias Schoepfer m.schoepfer@rethinkrobotics.com
Co-authored-by: Erick Kramer e.kramer@rethinkrobotics.com

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@ghost
Copy link

ghost commented Mar 22, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

1 similar comment
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@arhadthedev arhadthedev added the stdlib Standard Library Python modules in the Lib/ directory label Mar 23, 2023
@ghost ghost changed the title gh-102927: xmlrpc: allow 64bit integers and encode as i8 gh-102927: xmlrpc: allow 64bit and bigintegers Mar 24, 2023
blurb-it bot and others added 2 commits March 30, 2023 14:33
When using xmlrpc, integer values smaller than MININT = -2147483648
or larger than MAXINT = 2147483647, an OverflowError:
"int exceeds XML-RPC limits" is thrown.

As this might be perfectly in line with the original XML-RPC spec, the
<i8> tag and <biginteger> has evolved and even is used in the library on
the receiving end.

This patch will change the behavior in the sense that 32 bit integer
values will still be sent with the <int> tag, while larger (smaller)
numbers are enclosed with the <i8> tag or <biginteger> tag respectively.

Minimal code example to test:

>>> import xmlrpc.client
>>> xmlrpc.client.dumps(("bla",2147483648))

Signed-off-by: Matthias Schoepfer <m.schoepfer@rethinkrobotics.com>
Co-authored-by: Erick Kramer <e.kramer@rethinkrobotics.com>
@gvanrossum gvanrossum removed their request for review March 30, 2023 16:46
@ericsnowcurrently ericsnowcurrently removed their request for review March 30, 2023 18:22
@brettcannon brettcannon removed their request for review March 30, 2023 18:59
@rhettinger rhettinger removed their request for review March 31, 2023 01:57
@berkerpeksag berkerpeksag removed their request for review April 3, 2023 07:58
@JelleZijlstra JelleZijlstra removed their request for review April 14, 2023 05:34
@encukou
Copy link
Member

encukou commented Feb 13, 2024

I'll close for now; see discussion on the issue -- PyPI would be a better place for new XMLRPC features.

@encukou encukou closed this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stdlib Standard Library Python modules in the Lib/ directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup