Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-109070: Document thatmultiprocessing.get_context() sets the global context#109488

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rajveer43 wants to merge8 commits intopython:main
base:main
Choose a base branch
Loading
fromrajveer43:fix-issue-109070-main

Conversation

rajveer43
Copy link

@rajveer43rajveer43 commentedSep 16, 2023
edited by AA-Turner
Loading

gh-109070 The documentation for multiprocessing.get_start_method has been updated

📚 Documentation preview 📚:https://cpython-previews--109488.org.readthedocs.build/

@ghost
Copy link

ghost commentedSep 16, 2023
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-appbedevere-appbot added awaiting review docsDocumentation in the Doc dir skip news labelsSep 16, 2023
@rajveer43rajveer43 changed the titleDocumentation change of "multiprocessing.get_context()" is also setting the context globallygh-109070 Documentation change of "multiprocessing.get_context()" is also setting the context globallySep 16, 2023
@AA-TurnerAA-Turner changed the titlegh-109070 Documentation change of "multiprocessing.get_context()" is also setting the context globallygh-109070: Document thatmultiprocessing.get_context() sets the global contextSep 17, 2023
@AA-TurnerAA-Turner added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsSep 17, 2023
@rajveer43
Copy link
Author

@AA-Turner please review this PR

@rajveer43
Copy link
Author

@AA-Turner@alex@phsilva@scw anybody review the PR

@AA-Turner
Copy link
Member

Please do not ping people at random on PRs, it's bad form. See thedeveloper's guide; all reviewers are volunteers with limited time.

A

AlexWaygood reacted with thumbs up emoji

@@ -1049,27 +1049,25 @@ Miscellaneous

.. function:: get_context(method=None)

Return a context object which has the same attributes as the
:mod:`multiprocessing` module.
Return a context object with the same attributes as the :mod:`multiprocessing` module.
Copy link
Member

Choose a reason for hiding this comment

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

We tend to avoid unrelated changes, pleas revert the change to the summary line.

Otherwise *method* should be ``'fork'``, ``'spawn'``,
``'forkserver'``. :exc:`ValueError` is raised if the specified
start method is not available. See :ref:`multiprocessing-start-methods`.
If *method* is ``None``, the default context is returned. Be aware that calling this function with *method=None* sets the default context globally, potentially affecting future usage of :func:`set_start_method`. To change the method later, it is recommended to explicitly specify a method other than ``None`` when calling this function. Otherwise, it may lead to unexpected behavior.
Copy link
Member

Choose a reason for hiding this comment

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

This is now one incredibly long line. Please revert the change, and limit new lines to 79 characters long.


.. versionadded:: 3.4

.. function:: get_start_method(allow_none=False)

Return the name of start method used for starting processes.
Return the name of the start method used for initiating processes.
Copy link
Member

Choose a reason for hiding this comment

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

Again, please revert the change to this line

Comment on lines 1064 to 1070
If the start method has not been explicitly set (e.g., using :func:`set_start_method`) and *allow_none* is false, then the start method is fixed to the default, and the name of the default method is returned. If the start method has not been explicitly set and *allow_none* is true, then ``None`` is returned, indicating that the method has not been explicitly set.

The return value can be one of the following: ``'fork'``, ``'spawn'``, ``'forkserver'``, or ``None``.

If the start method has not been fixed and *allow_none* is false,
then the start method is fixed to the default and the name is
returned. If the start method has not been fixed and *allow_none*
is true then ``None`` is returned.
.. note:: Exercise caution when changing the start method using ``multiprocessing.set_start_method`` after using ``multiprocessing.get_start_method`` with *allow_none* set to ``False``, as it may raise a ``RuntimeError``.

The return value can be ``'fork'``, ``'spawn'``, ``'forkserver'``
or ``None``. See :ref:`multiprocessing-start-methods`.
See :ref:`multiprocessing-start-methods` for more information on multiprocessing start methods and their implications.
Copy link
Member

Choose a reason for hiding this comment

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

Please add your changes on new lines and limit unrelated changes.

@AA-Turner
Copy link
Member

Oh, seems the review summary comment got lost, sorry. In brief: It's much harder to review the actual changes to the text when there are many whitespace changes, moving content around, etc. You could open a new PR if you want to edit these words, but each individual PR should stay focussed.

You may find it useful to consult the Developer's Guide, especially theoverview to documentation and thelifecycle of a pull request.

A

@rajveer43
Copy link
Author

Oh, seems the review summary comment got lost, sorry. In brief: It's much harder to review the actual changes to the text when there are many whitespace changes, moving content around, etc. You could open a new PR if you want to edit these words, but each individual PR should stay focussed.

You may find it useful to consult the Developer's Guide, especially theoverview to documentation and thelifecycle of a pull request.

A

Okay I Have read it. can you tell which linting tool is used by cpython to check the linting of rst files locally

@AA-Turner
Copy link
Member

Okay I Have read it. can you tell which linting tool is used by cpython to check the linting of rst files locally

The page I linked notes this around halfway through:https://devguide.python.org/documentation/start-documenting/#build-using-make-make-bat

A

@serhiy-storchakaserhiy-storchaka added needs backport to 3.13bugs and security fixes and removed needs backport to 3.11only security fixes labelsMay 9, 2024
@python-cla-bot
Copy link

The following commit authors need to sign the Contributor License Agreement:

CLA signed

@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14bugs and security fixes labelMay 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AA-TurnerAA-TurnerAA-Turner requested changes

Assignees
No one assigned
Labels
awaiting changesdocsDocumentation in the Doc dirneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixesskip news
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@rajveer43@AA-Turner@hugovk@willingc@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp