-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-32843: Additional changes to test.support docs #5774
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.
LGTM. Just the disable_faulthandler() doc is wrong.
A context manager that uses ``sys.__stderr__`` instead of | ||
:data:`sys.stderr`, since :mod:`test.regrtest` replaces :data:`sys.stderr` | ||
with a :class:`io.StringIO` which has no file descriptor when a test is run | ||
with ``-W/--verbose3``. |
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.
Well, no. The purpose of this context manager is to disable temporarily faulthandler.
@csabella Could you update your PR? Thanks |
@@ -249,7 +265,11 @@ The :mod:`test.support` module defines the following constants: | |||
|
|||
.. data:: FS_NONASCII | |||
|
|||
A non-ASCII character encodable by :func:`os.fsencode`. | |||
A non-ASCII character encodable by :func:`os.fsencode`. The function |
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.
"The function" may be a bit opaque here. Maybe replace The function
by Choosen at import time
(which breaks the rest of the sentence)?
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 think the extra text is unnecessary here; we don't need to explain how the object is derived, only what it's for.
@@ -260,7 +280,7 @@ The :mod:`test.support` module defines the following constants: | |||
|
|||
.. data:: TESTFN_UNICODE | |||
|
|||
Set to a non-ASCII name for a temporary file. | |||
Set to a non-ASCII filename containing several unicode characters. |
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.
Looks redundent to me (non-ASCII and several unicode). Also an "unicode character" may be one in the ASCII table.
Maybe "Set to a non-ASCII filename." is enough? In contrast this one is not tested against being fsencodable.
|
||
This makes a copy of :data:`sys.path`, appends any directories given | ||
as positional arguments, then reverts :data:`sys.path` to the copied | ||
This makes a copy of ``sys.path``, appends any directories given |
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.
:data:`sys.path`
was creating a link to it, ``sys.path``
won't, why changing it? (multiple occurrences following)
When you're done making the requested changes, leave the comment: |
@csabella Hi Cheryl, long time no see, what about this PR? It accumulated a few conflicts :-( |
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 unfortunately has a lot of conflicts now, enough that it's easier to start from scratch. I'll close this and open a new
@@ -225,6 +225,22 @@ This module defines the following exceptions: | |||
|
|||
The :mod:`test.support` module defines the following constants: | |||
|
|||
|
|||
.. data:: HOST |
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 no longer exists on main
@@ -249,7 +265,11 @@ The :mod:`test.support` module defines the following constants: | |||
|
|||
.. data:: FS_NONASCII | |||
|
|||
A non-ASCII character encodable by :func:`os.fsencode`. | |||
A non-ASCII character encodable by :func:`os.fsencode`. The function |
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 think the extra text is unnecessary here; we don't need to explain how the object is derived, only what it's for.
@@ -334,12 +351,6 @@ The :mod:`test.support` module defines the following constants: | |||
Set to :data:`sys.maxsize` for big memory tests. | |||
|
|||
|
|||
.. data:: max_memuse |
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 think it's better to keep this documented for symmetry with real_max_memuse
.
|
||
Return the original stdout set by :func:`record_original_stdout` or | ||
``sys.stdout`` if it's not set. | ||
|
||
|
||
.. function:: strip_python_strerr(stderr) | ||
.. function:: strip_python_stderr(stderr) |
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 was removed in 3.9.0a2
This is a rework of python#5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue python#77024 and the discussion on python#5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]>
This is a rework of #5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue #77024 and the discussion on #5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
This is a rework of pythonGH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue pythonGH-77024 and the discussion on pythonGH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
This is a rework of pythonGH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue pythonGH-77024 and the discussion on pythonGH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
This is a rework of GH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue GH-77024 and the discussion on GH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
This is a rework of GH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue GH-77024 and the discussion on GH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
https://bugs.python.org/issue32843