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

bpo-31884 subprocess set priority on windows #4150

Merged
merged 17 commits into from
Nov 8, 2017
Merged
Prev Previous commit
Next Next commit
Update subprocess.rst
  • Loading branch information
JamesGKent authored Nov 7, 2017
commit 680efd7bc970a813dd1491d4f5fe5eeb689821e2
75 changes: 44 additions & 31 deletions Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -851,87 +851,100 @@ The :mod:`subprocess` module exposes the following constants.
additional information.

.. data:: CREATE_NEW_CONSOLE

The new process has a new console, instead of inheriting its parent's
Copy link
Member

Choose a reason for hiding this comment

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

The title of the current section is " Constants". I checked: all constants documented here as specific to Windows. I propose to rename the section to "Windows Constants". Can you please do that?

console (the default).

.. data:: CREATE_NEW_PROCESS_GROUP

.. versionadded:: 3.7
Copy link
Member

Choose a reason for hiding this comment

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

This change seems wrong: this constant was already available on Python 3.6.

Copy link
Member

Choose a reason for hiding this comment

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

That's wrong: the flag already existed in Python 3.6.


.. data:: CREATE_NEW_PROCESS_GROUP

A :class:`Popen` ``creationflags`` parameter to specify that a new process
group will be created. This flag is necessary for using :func:`os.kill`
on the subprocess.

This flag is ignored if :data:`CREATE_NEW_CONSOLE` is specified.

.. data:: ABOVE_NORMAL_PRIORITY_CLASS


.. versionadded:: 3.7
Copy link
Member

Choose a reason for hiding this comment

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

The versionadded markup is usually added after the text, and surrounded by an empty line (above and after).

Copy link
Member

Choose a reason for hiding this comment

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

That's wrong: the flag already existed in Python 3.6.


.. data:: ABOVE_NORMAL_PRIORITY_CLASS

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will have an above average priority.
Copy link
Member

Choose a reason for hiding this comment

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

You have to add ".. versionadded:: 3.7" here: same for each added constant below.


.. data:: BELOW_NORMAL_PRIORITY_CLASS


.. versionadded:: 3.7

.. data:: BELOW_NORMAL_PRIORITY_CLASS

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will have a below average priority.

.. data:: HIGH_PRIORITY_CLASS


.. versionadded:: 3.7

.. data:: HIGH_PRIORITY_CLASS

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will have a high priority.

.. data:: IDLE_PRIORITY_CLASS


.. versionadded:: 3.7

.. data:: IDLE_PRIORITY_CLASS

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will have an idle (lowest) priority.

.. data:: NORMAL_PRIORITY_CLASS


.. versionadded:: 3.7

.. data:: NORMAL_PRIORITY_CLASS

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will have an normal priority. (default)

.. data:: REALTIME_PRIORITY_CLASS


.. versionadded:: 3.7

.. data:: REALTIME_PRIORITY_CLASS

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will have realtime priority.
You should almost never use REALTIME_PRIORITY_CLASS, because this interrupts
system threads that manage mouse input, keyboard input, and background disk
flushing. This class can be appropriate for applications that "talk" directly
to hardware or that perform brief tasks that should have limited interruptions.

.. versionadded:: 3.7

.. data:: CREATE_NO_WINDOW

.. versionadded:: 3.7

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will not create a window

.. versionadded:: 3.7

.. data:: DETACHED_PROCESS

.. versionadded:: 3.7

A :class:`Popen` ``creationflags`` parameter to specify that a new process
will not inherit its parent's console.
This value cannot be used with CREATE_NEW_CONSOLE.

.. data:: CREATE_DEFAULT_ERROR_MODE


.. versionadded:: 3.7

.. data:: CREATE_DEFAULT_ERROR_MODE

A :class:`Popen` ``creationflags`` parameter to specify that a new process
does not inherit the error mode of the calling process. Instead, the new
process gets the default error mode.
This feature is particularly useful for multithreaded shell applications
that run with hard errors disabled.

.. data:: CREATE_BREAKAWAY_FROM_JOB

.. versionadded:: 3.7

.. data:: CREATE_BREAKAWAY_FROM_JOB

A :class:`Popen` ``creationflags`` parameter to specify that a new process
is not associated with the job.


.. versionadded:: 3.7

.. _call-function-trio:

Older high-level API
Expand Down