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-30419: DOC: Update missing information in bdb docs #1687

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

csabella
Copy link
Contributor

@csabella csabella commented May 20, 2017

Update missing information identified when creating docstrings.

#74604

@mention-bot
Copy link

@mention-bot mention-bot commented May 20, 2017

@csabella, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tiran, @benjaminp and @birkenfeld to be potential reviewers.

@vstinner
Copy link
Member

@vstinner vstinner commented May 21, 2017

I'm sorry but it seems that you mentionned the wrong bpo number.

@csabella csabella changed the title bpo-30409: DOC: Update missing information in bdb docs bpo-30419: DOC: Update missing information in bdb docs May 21, 2017
@csabella
Copy link
Contributor Author

@csabella csabella commented May 21, 2017

Sorry about that, it was 30419.

For real file names, the canonical form is an operating system dependent,
:func:`case-normalized <os.path.normcase>` :func:`absolute path
<os.path.abspath>`. A *filename* with angle brackets, such as `"<stdin>"`
generated in interactive mode, are returned unchanged.
Copy link
Member

@terryjreedy terryjreedy Jun 5, 2017

Choose a reason for hiding this comment

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

"A filename ... is" (not are) or "Filenames .... are"

Copy link
Contributor Author

@csabella csabella Jun 6, 2017

Choose a reason for hiding this comment

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

Thanks for catching that!

matching breakpoint.
Return a tuple of the breakpoint that was triggered and a boolean that
indicates if it is ok to delete a temporary breakpoint. Return
``(None, None)`` if there is no matching breakpoint.
Copy link
Member

@terryjreedy terryjreedy Jun 5, 2017

Choose a reason for hiding this comment

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

I want to put this in the standard format. My suggestion:
"""Return (active (file, line) breakpoint, delete temporary flag) or (None, None).

The breakpoint is the first entry in Breakpoint.bplist[file, line] (which must exist) that is enabled and has neither a false condition nor positive ignore count. The flag, meaning that a temporary breakpoint should be deleted, is False only when the condition cannot be evaluated (in which case, ignore count is ignored).
"""
What do you think? The docstring for effective() should also be replaced and the obsolete pair of comment lines above the def line deleted.

Copy link
Contributor Author

@csabella csabella Jun 6, 2017

Choose a reason for hiding this comment

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

I've made these changes. I also made other changes to add all the attributes for Breakpoint and then use those as links in this description of effective. Sorry to add so much to the second review, but I think it helps a lot in understanding the breakpoints. One thing that I didn't say is that ignore would be set by the caller. Not sure if I need to mention that it's a read/write attribute?

Copy link
Member

@vadmium vadmium left a comment

I’m not familiar with this particular module, but I found a couple places with apparently unfinished sentences (or at that least don’t make grammatical sense to me).

.. attribute:: line

Line number of the :class:`Breakpoint` within
:attr:`file <bdb.Breakpoint.file>`.
Copy link
Member

@vadmium vadmium Jun 6, 2017

Choose a reason for hiding this comment

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

Since this is all indented under class:: Breakpoint, I think you should be able to just link with :attr:`file`. (Failing that, there is another shortcut: :attr:`~bdb.Breakpoint.file`.)

Copy link
Contributor Author

@csabella csabella Jun 6, 2017

Choose a reason for hiding this comment

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

Thanks!


.. attribute:: temporary

True if :class:`Breakpoint` at the (file, line) is temporary.
Copy link
Member

@vadmium vadmium Jun 6, 2017

Choose a reason for hiding this comment

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

I’m not familiar with this particular module, but it seems like these would read better if you dropped the, so they are just at (file, line). Or do you need to move the before Breakpoint?

Copy link
Contributor Author

@csabella csabella Jun 6, 2017

Choose a reason for hiding this comment

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

Thanks, I added an 'a' before Breakpoint.

of surrounding angle brackets.
Return canonical form of *filename*.

For real file names, the canonical form is an operating system dependent,
Copy link
Member

@vadmium vadmium Jun 6, 2017

Choose a reason for hiding this comment

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

operating-system-dependent (dependent is an adjective, not a noun here)

Copy link
Contributor Author

@csabella csabella Jun 6, 2017

Choose a reason for hiding this comment

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

Thanks.

Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
@@ -311,16 +361,18 @@ The :mod:`bdb` module also defines two classes:

.. method:: get_stack(f, t)

Get a list of records for a frame and all higher (calling) and lower
frames, and the size of the higher part.
Return a list of (frame, lineno) tuples in a stack trace and a size.
Copy link
Member

@vadmium vadmium Jun 6, 2017

Choose a reason for hiding this comment

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

Does this need a comma before and a size? Are the tuples in the size or just in the stack trace?

Copy link
Contributor Author

@csabella csabella Jun 6, 2017

Choose a reason for hiding this comment

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

The output is ((stack trace), size). So, it's a tuple of the form (list of tuples, int). I've added the comma before "and a size".

@brettcannon
Copy link
Member

@brettcannon brettcannon commented Feb 2, 2018

To try and help move older pull requests forward, we are going through and backfilling 'awaiting' labels on pull requests that are lacking the label. Based on the current reviews, the best we can tell in an automated fashion is that a core developer requested changes to be made to this pull request.

If/when the requested changes have been made, please leave a comment that says, I have made the requested changes; please review again. That will trigger a bot to flag this pull request as ready for a follow-up review.

@aeros aeros added the stale label Sep 10, 2019
@AlexWaygood AlexWaygood added the docs label Apr 11, 2022
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

This PR has had quite the journey. I think it's mostly a good improvement, but I have a few comments.

Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
Doc/library/bdb.rst Outdated Show resolved Hide resolved
@JelleZijlstra JelleZijlstra self-assigned this May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes CLA signed docs skip news stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants