Skip to content
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

Update multiprocessing docs re: freeze_support #49751

Closed
bcorfman mannequin opened this issue Mar 17, 2009 · 12 comments
Closed

Update multiprocessing docs re: freeze_support #49751

bcorfman mannequin opened this issue Mar 17, 2009 · 12 comments
Assignees
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@bcorfman
Copy link
Mannequin

bcorfman mannequin commented Mar 17, 2009

BPO 5501
Nosy @birkenfeld, @rhettinger, @terryjreedy, @merwok, @sandrotosi, @berkerpeksag, @applio
Files
  • issue5501-v1.patch
  • issue_5501_explicit_freeze_support_nonWin_v27.patch: doc change for freeze_support, 2.7 branch
  • issue_5501_explicit_freeze_support_nonWin_v3x.patch: doc change for freeze_support, 3.x branches
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/applio'
    closed_at = <Date 2016-01-07.16:54:59.497>
    created_at = <Date 2009-03-17.18:01:43.315>
    labels = ['type-feature', 'docs']
    title = 'Update multiprocessing docs re: freeze_support'
    updated_at = <Date 2016-01-07.16:54:59.447>
    user = 'https://bugs.python.org/bcorfman'

    bugs.python.org fields:

    activity = <Date 2016-01-07.16:54:59.447>
    actor = 'berker.peksag'
    assignee = 'davin'
    closed = True
    closed_date = <Date 2016-01-07.16:54:59.497>
    closer = 'berker.peksag'
    components = ['Documentation']
    creation = <Date 2009-03-17.18:01:43.315>
    creator = 'bcorfman'
    dependencies = []
    files = ['41278', '41330', '41331']
    hgrepos = []
    issue_num = 5501
    keywords = ['patch']
    message_count = 12.0
    messages = ['83690', '113203', '117823', '117837', '117974', '117975', '256163', '256570', '257126', '257700', '257701', '257702']
    nosy_count = 13.0
    nosy_names = ['georg.brandl', 'rhettinger', 'terry.reedy', 'bcorfman', 'jnoller', 'eric.araujo', 'asksol', 'sandro.tosi', 'docs@python', 'python-dev', 'berker.peksag', 'davin', 'Winterflower']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue5501'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

    @bcorfman
    Copy link
    Mannequin Author

    bcorfman mannequin commented Mar 17, 2009

    Indicate in docs whether freeze_support() can be called without issues
    on Unix or OS X, so the user knows whether they can have a single code
    base that works correctly on all platforms.

    @bcorfman bcorfman mannequin assigned birkenfeld Mar 17, 2009
    @bcorfman bcorfman mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Mar 17, 2009
    @jnoller jnoller mannequin assigned jnoller and unassigned birkenfeld Mar 17, 2009
    @terryjreedy
    Copy link
    Member

    I think that question is covered by "If the module is being run normally by the Python interpreter then freeze_support() has no effect."

    Jesse, do you think anything more is needed, like '(on any platform)' after 'interpreter', or should be close this?

    @sandrotosi
    Copy link
    Contributor

    Hello,
    well it's just 3 words that can clarify the situation, so maybe just add them would be nice

    Regards,
    Sandro

    @merwok
    Copy link
    Member

    merwok commented Oct 1, 2010

    I’m assuming this is a feature new in 2.7 and 3.2, please add 3.1 if this is wrong.

    @sandrotosi
    Copy link
    Contributor

    Sorry Éric, I don't get it: do you mean that the fact that "freeze_support() can be called without issues on Unix or OS X" is a new feature? or I misread it completely?

    @merwok
    Copy link
    Member

    merwok commented Oct 4, 2010

    Rephrased: Is this relevant for 3.1?

    (Bug and doc fixes go into 3.2, 3.1 and 2.7, but here only 3.2 and 2.7 are selected, so I asked if the bugfix/new feature/behavior in question was something new in 3.2 and thus not in 3.1.)

    @Winterflower
    Copy link
    Mannequin

    Winterflower mannequin commented Dec 9, 2015

    Hi everyone!
    It has been a while since this issue has been updated.
    The addition requested by Brandon Corfman is a simple clarification of what happens when the freeze_support function from multiprocessing is called on non-Windows platforms (if I understand correctly, the primary purpose of freeze_support is to help in creating Windows executables).
    Although there is already some documentation which suggests that no adverse effects will occur when running code that calls freeze_support on OS X and Unix, I added a sentence in the docs that will hopefully clarify this.

    Patch attached.

    @applio
    Copy link
    Member

    applio commented Dec 17, 2015

    Thank you, Winterflower, for the nudge to see this set right.

    In truth, invoking multiprocessing.freeze_support() has zero effect on platforms other than Windows.

    This should be reflected in the 2.7 docs as well as the 3.x docs that are still actively being updated.

    Attached are 2 patches -- they should be cleanly applied to the 2.7, 3.5, and default (3.6) branches. This change clarifies the last line of existing documentation around freeze_support() as well as clearly states what I mentioned above.

    @applio applio assigned applio and unassigned jnoller Dec 17, 2015
    @Winterflower
    Copy link
    Mannequin

    Winterflower mannequin commented Dec 28, 2015

    Patch review:

    3.X patch:
    Applied to docs locally in the default branch(3.6). Docs build passes, doc layout has not been broken.

    Applied to branch 3.5. Docs build passes, doc layout has not been broken.

    2.X patch:
    Applied to docs locally in the 2.7 branch. Docs build passes, doc layout has not been broken.

    Comments on the contents of the patch:

    if the module is being run normally by the Python interpreter on Windows (the program has not been frozen)

    For a newbie Python user it might not be entirely clear what 'run normally by the Python interpreter' means. Perhaps it would be nice to add a clarifying clause

    if the module is being run normally by the Python interpreter ( for example, by running python <filename.py> from the command prompt) on Windows (the program has not been frozen)

    or something similar.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 7, 2016

    New changeset f08d4712a055 by Berker Peksag in branch '3.5':
    Issue bpo-5501: Clarify that invoking freeze_support() on non-Windows platforms has no effect
    https://hg.python.org/cpython/rev/f08d4712a055

    New changeset 2902f32d1ae9 by Berker Peksag in branch 'default':
    Issue bpo-5501: Clarify that invoking freeze_support() on non-Windows platforms has no effect
    https://hg.python.org/cpython/rev/2902f32d1ae9

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 7, 2016

    New changeset 8b20a606ecde by Berker Peksag in branch '2.7':
    Issue bpo-5501: Clarify that invoking freeze_support() on non-Windows platforms has no effect
    https://hg.python.org/cpython/rev/8b20a606ecde

    @berkerpeksag
    Copy link
    Member

    Thanks Davin and Camilla.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    6 participants