[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-05-05 Thread Jürgen Gmach

Jürgen Gmach  added the comment:

This was merged already.


I did not know I have to manually close the issue, but here we go!

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-26 Thread miss-islington

miss-islington  added the comment:


New changeset 027b6699276ed8d9f68425697ac89bf61e54e6b9 by Jürgen Gmach in 
branch 'master':
bpo-43354: xmlrpc: Fix type documentation for Fault.faultCode (GH-24707)
https://github.com/python/cpython/commit/027b6699276ed8d9f68425697ac89bf61e54e6b9


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-02 Thread Jürgen Gmach

Jürgen Gmach  added the comment:

The approved typeshed PR:
https://github.com/python/typeshed/pull/5083

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-02 Thread Jürgen Gmach

Change by Jürgen Gmach :


--
keywords: +patch
pull_requests: +23482
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24707

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-01 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-01 Thread Paul Ganssle


Paul Ganssle  added the comment:

The evidence you have here seems pretty compelling and this change seems 
straightforward enough. I don't see an expert listed here, but I'm happy to 
merge a docs PR fixing this.

Probably a good idea to make a PR to typeshed in parallel, in case they have 
some further insight into this.

--
nosy: +p-ganssle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-01 Thread Jürgen Gmach

New submission from Jürgen Gmach :

I created a XMLRPC API (via Zope), which gets consumed by a C# application.

C#'s XMLRPC lib expects an `int` for the `faultCode` but I currently return a 
string, as this is the type which is currently documented in the official docs
https://docs.python.org/3/library/xmlrpc.client.html#xmlrpc.client.Fault.faultCode

This leads to a `TypeMismatch` error on the client's side.


The documentation for `faultCode` is pretty much unchanged since 2007, when 
`xmlrpc.client.rst` was first created (at least at that place) by Georg Brandl. 
The docs are most probably older, but I do not know where they were managed 
before.

I had a look at the cpython source code, and at least the tests all use ints 
for `faultCode` (both of them :-) )

eg 
https://github.com/python/cpython/blob/255f53bdb54a64b93035374ca4484ba0cc1b41e1/Lib/test/test_xmlrpc.py#L166

Having a look at the XMLRPC spec at http://xmlrpc.com/spec.md it is clearly 
shown that `faultCode` has to be an int.

Typeshed recently added type hints for xmlrpc lib, and they used string for 
`faultCode` - but I guess this is just an aftereffect from the faulty 
documentation.
https://github.com/python/typeshed/pull/3834

I suggest to both update cpython's documentation and to create a PR for 
typeshed in order to fix the type issue.

If any core dev agrees on this, I'd like to prepare the pull requests.

Thanks for taking your time to look into this!

--
assignee: docs@python
components: Documentation
messages: 387866
nosy: docs@python, jugmac00
priority: normal
severity: normal
status: open
title: xmlrpc.client: Fault.faultCode erroneously documented to be a string, 
should be int
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com