GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-129948: Add `set()` to `multiprocessing.managers.SyncManager` by mmingyu · Pull Request #129949 · python/cpython

Conversation

@mmingyu

@mmingyu mmingyu commented Feb 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

  • Issue: Add set() to multiprocessing.managers.SyncManager #129948

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mmingyu
python#129948: support multiprocessing.manager.set
bd5b81c
@mmingyu
mmingyu requested a review from gpshead as a code owner February 10, 2025 10:51
@ghost

ghost commented Feb 10, 2025 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Feb 10, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Feb 10, 2025
Add set() to multiprocessing.managers.SyncManager #129948
Closed
@mmingyu
fix lint
d762661
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it
📜🤖 Added by blurb_it.
3514b42
@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
blurb-it Bot and others added 3 commits February 11, 2025 06:36
@blurb-it
📜🤖 Added by blurb_it.
e529f5f
@mmingyu
remove first doc
f0f7d25
@mmingyu
remove doc
41cb4a6
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blurb-it Bot and others added 4 commits February 11, 2025 06:42
@blurb-it
📜🤖 Added by blurb_it.
4796816
@mmingyu
fix lint
40c60cc
@mmingyu
fix doc lint
5e0977f
@mmingyu
doc: update comment
5c02940
auvipy
auvipy reviewed Feb 11, 2025
View reviewed changes

@auvipy auvipy left a comment

Copy link
Copy Markdown

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

auvipy
auvipy approved these changes Feb 11, 2025
View reviewed changes

@auvipy auvipy left a comment

Copy link
Copy Markdown

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.

yes it seems more clear now

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mmingyu reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Feb 11, 2025
picnixz
picnixz previously requested changes Feb 11, 2025
View reviewed changes

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/_test_multiprocessing.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2025-02-11-06-42-17.gh-issue-129948.ZcugY9.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting changes and removed awaiting core review labels Feb 11, 2025
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz reviewed Feb 11, 2025
View reviewed changes
Comment thread Lib/multiprocessing/managers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

mmingyu added 2 commits February 11, 2025 22:10
@mmingyu
Remove hard coding in MakeProxyType
3132d2a
@mmingyu
test: Seperate test_set, Add test_set_contain_all_method
deb8b73
mmingyu added 2 commits February 23, 2025 09:21
@mmingyu
Fix the bug where SetProxy's __ior__, __ixor__, __iand__, and __isub_…
3706c78
…_ return a set instead of a SetProxy
@mmingyu
Fix missing __ge__, __gt__, __le__, and __lt__ methods in SetProxy
a259b39
mmingyu
mmingyu commented Feb 23, 2025
View reviewed changes
Comment thread Lib/multiprocessing/managers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mmingyu
Addressed code review comments
121b742
@mmingyu
mmingyu force-pushed the feature/set-proxy branch from 6252328 to 121b742 Compare February 23, 2025 01:00
mmingyu added 2 commits February 23, 2025 10:16
@mmingyu
Hardcode SetProxy methods
e8b449f
@mmingyu
Grouping tests for issuperset and issubset
c3c3075
@mmingyu
mmingyu requested a review from picnixz February 23, 2025 01:22
picnixz
picnixz approved these changes Feb 23, 2025
View reviewed changes

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

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.

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).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/multiprocessing/managers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/multiprocessing/managers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/_test_multiprocessing.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting changes labels Feb 23, 2025
@picnixz

picnixz commented Feb 23, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

picnixz and others added 4 commits February 23, 2025 18:56
@picnixz
Merge branch 'main' into feature/set-proxy
3af48c3
@gpshead @picnixz
Update Lib/test/_test_multiprocessing.py
13c18c7
Co-authored-by: Bénédikt Tran <[email protected]>
@gpshead @picnixz
Update Lib/multiprocessing/managers.py
af37eae
Co-authored-by: Bénédikt Tran <[email protected]>
@gpshead @picnixz
Update Lib/multiprocessing/managers.py
a34e461
Co-authored-by: Bénédikt Tran <[email protected]>
gpshead
gpshead approved these changes Feb 23, 2025
View reviewed changes
Comment thread Lib/test/_test_multiprocessing.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@gpshead
Update Lib/test/_test_multiprocessing.py
df6330a
gpshead
gpshead reviewed Feb 23, 2025
View reviewed changes
Comment thread Doc/library/multiprocessing.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@gpshead
Update Doc/library/multiprocessing.rst
9d13129
@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
@bedevere-app bedevere-app Bot removed the awaiting merge label 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 !

mmingyu reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mmingyu added a commit to mmingyu/typeshed that referenced this pull request Feb 25, 2025
@mmingyu
Add SetProxy and support for set operations in multiprocessing manage…
75e584a
…rs for Python 3.14.0a5+ (python/cpython#129949)
@mmingyu mmingyu mentioned this pull request Feb 25, 2025
Add SetProxy and support for set operations in multiprocessing.managers for Python 3.14.0a5+ python/typeshed#13535
Closed
This was referenced May 16, 2025
Add SetProxy and support for set operations in multiprocessing.managers for Python 3.14 python/typeshed#14076
Closed
Add SetProxy and support for set operations in multiprocessing.managers for Python 3.14 python/typeshed#14077
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead approved these changes
@picnixz picnixz picnixz approved these changes
+1 more reviewer
@auvipy auvipy auvipy approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gpshead gpshead

Labels

type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add set() to multiprocessing.managers.SyncManager

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mmingyu @picnixz @gpshead @auvipy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.