Skip to content

Add SynchronizedBase to __all__ #110304

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

distortedsignal
Copy link

Recently I was writing some heavily-parallel code,
and I tried to type-check with mypy. I (naively)
thought that multiprocessing.Value was a class
and was very confused when mypy threw an error
on that line. I dropped into the interpreter and
tried to use the help function to find the
return type of Value - and failed. I dropped
into the code and found that the type returned
from the Value function was not exported from
the module.

I want types in Python to be awesome. I think
mypy is a step in the right direction for that.
This change is me doing my part to expose more
types so mypy can become as good as it can be.

@distortedsignal distortedsignal requested a review from tiran as a code owner October 3, 2023 17:54
@ghost
Copy link

ghost commented Oct 3, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Oct 3, 2023

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@distortedsignal
Copy link
Author

Reviewers: I didn't think this needed a GH Issue # b/c it's such a small change. I'm fine with exporting a different class, or masking this differently, but - to me - this seems like something that's obviously necessary. If this shouldn't go in, I'm fine with it not going in.

distortedsignal and others added 5 commits October 3, 2023 17:08
Recently I was writing some heavily-parallel code,
and I tried to type-check with `mypy`. I (naively)
thought that `multiprocessing.Value` was a class
and was very confused when `mypy` threw an error
on that line. I dropped into the interpreter and
tried to use the `help` function to find the
return type of `Value` - and failed. I dropped
into the code and found that the type returned
from the `Value` function was not exported from
the module.

I want types in Python to be _awesome_. I think
`mypy` is a step in the right direction for that.
This change is me doing my part to expose more
types so `mypy` can become as good as it can be.

distortedsignal<distortedsignal@gmail.com>
@distortedsignal
Copy link
Author

Boop.

# Methods for getting synchronization wrappers
'Value', 'Array',
# The synchronization types
'Synchronized', 'SynchronizedArray', 'SynchronizedString',
Copy link
Member

Choose a reason for hiding this comment

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

These are not documented and therefore not properly public, why should they be added to __all__?

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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy