-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
GH-116218 Docs: Add availability information for the 'resource' module #116256
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
Conversation
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.
I've added some comments about the availability of a number of constants that have much wider availability than claimed by this PR.
I have not checked beyond macOS and FreeBSD, further resource is needed to update the availability statement. The constants I marked as being available on macOS and FreeBSD as well may well be available on all relevant unix-y platforms.
The symbols I marked as being part of the unix spec should IMHO not have availability information.
Doc/library/resource.rst
Outdated
@@ -123,6 +123,8 @@ platform. | |||
This may result in the creation of a partial core file if a larger core would be | |||
required to contain the entire process image. | |||
|
|||
.. availability:: Linux >= 1.3.0 |
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.
This constant is part of the unix standard and should be available on all platforms (given that this module is documented as available on unix platforms).
Doc/library/resource.rst
Outdated
@@ -131,37 +133,51 @@ platform. | |||
the :mod:`signal` module documentation for information about how to catch this | |||
signal and do something useful, e.g. flush open files to disk.) | |||
|
|||
.. availability:: Linux >= 1.3.0 |
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.
Likewise.
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_FSIZE | ||
|
||
The maximum size of a file which the process may create. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Likewise.
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_DATA | ||
|
||
The maximum size (in bytes) of the process's heap. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Likewise.
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_STACK | ||
|
||
The maximum size (in bytes) of the call stack for the current process. This only | ||
affects the stack of the main thread in a multi-threaded process. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Likewise
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_RSS | ||
|
||
The maximum resident set size that should be made available to the process. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Also available on (at least) macOS and FreeBSD, not mentioned in the unix spec.
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_NPROC | ||
|
||
The maximum number of processes the current process may create. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Also available on (at least) macOS and FreeBSD, not mentioned in the unix spec.
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_NOFILE | ||
|
||
The maximum number of open file descriptors for the current process. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Part of the unix spec, see above
Doc/library/resource.rst
Outdated
|
||
.. data:: RLIMIT_AS | ||
|
||
The maximum area (in bytes) of address space which may be taken by the process. | ||
|
||
.. availability:: Linux >= 1.3.0 |
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.
Part of the unix spec, see above.
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 P.S. Thanks for the review. |
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.
LGTM
Thanks @Privat33r-dev for the PR, and @ronaldoussoren for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
… module (pythonGH-116256) Add availability data to 'resource' module Docs (cherry picked from commit 03f86b1) Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
GH-116533 is a backport of this pull request to the 3.12 branch. |
… module (pythonGH-116256) Add availability data to 'resource' module Docs (cherry picked from commit 03f86b1) Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
GH-116534 is a backport of this pull request to the 3.11 branch. |
… module (python#116256) Add availability data to 'resource' module Docs
… module (python#116256) Add availability data to 'resource' module Docs
📚 Documentation preview 📚: https://cpython-previews--116256.org.readthedocs.build/