Skip to content

Fix typing of multiprocessing.Value and Array - #11576

Merged
srittau merged 5 commits into
python:mainfrom
prauscher:prauscher-patch-2
Mar 15, 2024
Merged

srittau merged 5 commits into
python:mainfrom
prauscher:prauscher-patch-2

Conversation

@prauscher

Copy link
Copy Markdown
Contributor

could fix #8799 and #9898, but request review for side effects. Without this change, static type checkers would treat Value(ctypes.c_float, 0.0) like ctypes.c_float, but Value offers a field value for storage

could fix python#8799 and python#9898, but request review for side effects.
Without this change, static type checkers would treat `Value(ctypes.c_float, 0.0)` like `ctypes.c_float`, but `Value` offers a field `value` for storage
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@prauscher

Copy link
Copy Markdown
Contributor Author

I do not want to be too demanding, but just to be sure I'm not missing anything: Is there anything left for me to help going forward to merge?

@JelleZijlstra

Copy link
Copy Markdown
Member

One of the maintainers will hopefully find time to look at this soon.

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My experience with ctypes and multiprocessing is limited, but based on the lack of complaints from our tests, the review by @f0rmiga, and playing around with ctypes a bit, this change makes sense to me.

@srittau
srittau merged commit 6943dcd into python:main Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typing of multiprocessing.Value broken since mypy 0.981

4 participants