bpo-32843: Additional changes to test.support docs#5774
bpo-32843: Additional changes to test.support docs#5774csabella wants to merge 1 commit intopython:mainfrom
Conversation
vstinner
left a comment
There was a problem hiding this comment.
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.
Well, no. The purpose of this context manager is to disable temporarily faulthandler.
|
@csabella Could you update your PR? Thanks |
| .. 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.
"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.
I think the extra text is unnecessary here; we don't need to explain how the object is derived, only what it's for.
| .. 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.
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.
: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 :-( |
JelleZijlstra
left a comment
There was a problem hiding this comment.
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
| The :mod:`test.support` module defines the following constants: | ||
|
|
||
|
|
||
| .. data:: HOST |
There was a problem hiding this comment.
This no longer exists on main
| .. 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.
I think the extra text is unnecessary here; we don't need to explain how the object is derived, only what it's for.
| Set to :data:`sys.maxsize` for big memory tests. | ||
|
|
||
|
|
||
| .. data:: max_memuse |
There was a problem hiding this comment.
I think it's better to keep this documented for symmetry with real_max_memuse.
|
|
||
|
|
||
| .. function:: strip_python_strerr(stderr) | ||
| .. function:: strip_python_stderr(stderr) |
There was a problem hiding this comment.
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 <cheryl.sabella@gmail.com>
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 <cheryl.sabella@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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 <cheryl.sabella@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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 <cheryl.sabella@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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 <cheryl.sabella@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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 <cheryl.sabella@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
https://bugs.python.org/issue32843