Title: `multiprocessing.Array` and `multiprocessing.managers.SyncManager.Array` APIs are similar but not the same
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.8
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bjs, davin, jthistle, pitrou
Priority: normal Keywords:

Created on 2020-07-28 18:34 by jthistle, last changed 2020-07-28 18:36 by xtreak.

Messages (1)
msg374519 - (view) Author: James Thistlewood (jthistle) Date: 2020-07-28 18:34
I stumbled across this by trying to implement a call to the latter, while reading the docs for the former.

I think this is quite confusing and unnecessary that the APIs between these two definitions should differ.  The same goes for `multiprocessing.Value` and `multiprocessing.managers.SyncManager.Value`.

This is especially exacerbated by the fact that the docs _are incorrect_. On this page [1], under 'Server process', a link to 'Array' is made. If it were correct, it would link to `multiprocessing.managers.SyncManager.Array`, since it's talking about a manager object - the kind returned by `Manager()`. But it links to `multiprocessing.Array`. Of course, the simple solution would be to change the link to link to the correct place, but I think this shows an unnecessary inconsistency in the API itself.

I don't have a PR for this yet, nor have I fully investigated, but should it be feasible I would like to implement it myself. I'm interested to hear what people think.

Date User Action Args
2020-07-28 18:36:30xtreaksetnosy: + pitrou, davin
2020-07-28 18:35:27bjssetnosy: + bjs
2020-07-28 18:34:04jthistlecreate