-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-76187: Document the c typecode for multiprocessing.Array.
#132504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
gpshead
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also mention that the w typecode of array is not supported? (glancing at the code, it is missing from Lib/multiprocessing/sharedctypes.py)
Will do. Do you think it's worth to improve the error message for invalid typecodes as well? >>> array('x')
...
ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)(And I just noticed that the error message doesn't include 'w' 😆 ) |
|
Yeah, improving the error message and/or even adding 'w' support are all also viable options. I expect this part of the code was inherited from the original upstream project multiprocessing came from and likely hasn't been meaningfully touched since? It's a dark corner. |
|
Updated to mention that
I'll send a patch to improve the error message and align it with that of |
|
I'm planning to merge this docs fix, we can think about supporting 'w' in a separate issue :) |
|
Thanks @tomasr8 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
pythonGH-132504) * Document the `c` typecode for `multiprocessing.Array`. * Add quotes * Mention that 'w' is not supported (cherry picked from commit 136f6d8) Co-authored-by: Tomas R. <[email protected]>
|
GH-143369 is a backport of this pull request to the 3.14 branch. |
pythonGH-132504) * Document the `c` typecode for `multiprocessing.Array`. * Add quotes * Mention that 'w' is not supported (cherry picked from commit 136f6d8) Co-authored-by: Tomas R. <[email protected]>
|
GH-143370 is a backport of this pull request to the 3.13 branch. |
I linked to the ctypes types table and added this sentence:
The rest of the diff is just wrapping.
📚 Documentation preview 📚: https://cpython-previews--132504.org.readthedocs.build/