Skip to content

gh-129948: Add set() to multiprocessing.managers.SyncManager#129949

Merged
gpshead merged 40 commits into
python:mainfrom
mmingyu:feature/set-proxy
Feb 23, 2025
Merged

gh-129948: Add set() to multiprocessing.managers.SyncManager#129949
gpshead merged 40 commits into
python:mainfrom
mmingyu:feature/set-proxy

Conversation

@mmingyu

@mmingyu mmingyu commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

Resolve : #129948

The SyncManager provides support for various data structures such as dict, list, and queue, but oddly, it does not support set. This inconsistency feels little bit weird.

This PR introduces support for set by defining SetProxy and registering it with SyncManager.

@mmingyu mmingyu requested a review from gpshead as a code owner February 10, 2025 10:51
@ghost

ghost commented Feb 10, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

bedevere-app Bot commented Feb 10, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Feb 10, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@mmingyu mmingyu changed the title gh-129948: Add set() Support to multiprocessing.managers.SyncManager gh-129948: Add set() to multiprocessing.managers.SyncManager Feb 10, 2025
@bedevere-app

bedevere-app Bot commented Feb 11, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@auvipy auvipy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

may be some description regarding why adding this would be beneficiary is helpful to understand the reasoning

@mmingyu

mmingyu commented Feb 11, 2025

Copy link
Copy Markdown
Contributor Author

may be some description regarding why adding this would be beneficiary is helpful to understand the reasoning

Thanks for the advice!
Are you suggesting that I should make the PR description more detailed? I've updated the PR description

@auvipy auvipy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

yes it seems more clear now

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

New features require a full-fleded What's New Entry (in Doc/whatsnew/3.14.rst in this case) as well as an updated documentation (likely in Doc/library/multiprocessing.rst). Please add them as well.

Comment thread Lib/test/_test_multiprocessing.py Outdated
Comment thread Misc/NEWS.d/next/Library/2025-02-11-06-42-17.gh-issue-129948.ZcugY9.rst Outdated
@bedevere-app

bedevere-app Bot commented Feb 11, 2025

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Comment thread Lib/multiprocessing/managers.py Outdated
Comment thread Lib/multiprocessing/managers.py Outdated
@mmingyu mmingyu requested a review from picnixz February 23, 2025 01:22

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some final nits and I think we're good (but we'll need to wait for @gpshead's review because he's the mp's expert, I'm not).

Comment thread Lib/multiprocessing/managers.py Outdated
Comment thread Lib/multiprocessing/managers.py
Comment thread Lib/test/_test_multiprocessing.py
@picnixz

picnixz commented Feb 23, 2025

Copy link
Copy Markdown
Member

I've merged main into the branch because I think the CI has changed.

In addition, please avoid force-pushing in general. We squash-merge at the end, and force-pushing makes incremental reviews harder. TiA.

picnixz and others added 4 commits February 23, 2025 18:56
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Lib/test/_test_multiprocessing.py Outdated
Comment thread Doc/library/multiprocessing.rst
@gpshead gpshead self-assigned this Feb 23, 2025
@gpshead gpshead added the type-feature A feature request or enhancement label Feb 23, 2025
@gpshead gpshead enabled auto-merge (squash) February 23, 2025 19:27
@gpshead gpshead merged commit 9f81f82 into python:main Feb 23, 2025
@picnixz

picnixz commented Feb 23, 2025

Copy link
Copy Markdown
Member

Thank you for the contribution @mmingyu and for the review @gpshead !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add set() to multiprocessing.managers.SyncManager

4 participants