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-34061: Add missing docs for NotSupportedError sqlite module #8172

Merged

Conversation

n0npax
Copy link
Contributor

@n0npax n0npax commented Jul 7, 2018

Add missing docs for NotSupportedError in sqlite module

https://bugs.python.org/issue34061

Copy link
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! :) I think this looks pretty good, I just left some comments mostly on documentation style.

Exception raised in case a method or database API was used which is not
supported by the database, e.g. requesting a .rollback() on a connection
that does not support transaction or has transactions turned off.
It must be a subclass of :exc:`DatabaseError`.
Copy link
Member

Choose a reason for hiding this comment

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

It must be -> It is (PEP 249 is basically a specification, and it has already been implemented in the sqlite3 module, so we don't need use "must be".)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

.. exception:: NotSupportedError

Exception raised in case a method or database API was used which is not
supported by the database, e.g. requesting a .rollback() on a connection
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can replace "requesting a .rollback() on" with something like "calling the :meth:`Connection.rollback` method on" to make it sound more like stdlib documentation, not PEP 249?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Link works

Misc/ACKS Outdated
@@ -1784,6 +1784,7 @@ Gordon Worley
Darren Worrall
Thomas Wouters
Daniel Wozniak
Marcin Niemira
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for adding your name to the list, but I usually prefer adding a contributor's name for more complicated patches (or after a couple of trivial patches)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already merged by other PR.

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@n0npax
Copy link
Contributor Author

n0npax commented Jul 8, 2018

Hi, I've fixed requested changes. Thanks for Review.

.. exception:: NotSupportedError

Exception raised in case a method or database API was used which is not
supported by the database, e.g. calling the :meth:`Connection.rollback`
Copy link
Member

Choose a reason for hiding this comment

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

missing "method"

Copy link
Member

Choose a reason for hiding this comment

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

I think :meth:`~Connection.rollback` would be a better choice here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added missing "method" word & changed :meth:`Connection.rollback to the :meth:`~Connection.rollback

@berkerpeksag berkerpeksag merged commit bc9aa81 into python:master Jul 8, 2018
@miss-islington
Copy link
Contributor

Thanks @n0npax for the PR, and @berkerpeksag for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@berkerpeksag
Copy link
Member

Thanks!

@miss-islington
Copy link
Contributor

Sorry, @n0npax and @berkerpeksag, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker bc9aa813a34474e517af8999565ff6151559d42f 3.7

@miss-islington
Copy link
Contributor

Sorry, @n0npax and @berkerpeksag, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker bc9aa813a34474e517af8999565ff6151559d42f 3.6

@berkerpeksag
Copy link
Member

@n0npax would you like to submit backport PRs?

n0npax pushed a commit to n0npax/cpython that referenced this pull request Jul 8, 2018
(cherry picked from commit bc9aa81)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
@bedevere-bot
Copy link

GH-8185 is a backport of this pull request to the 3.6 branch.

n0npax pushed a commit to n0npax/cpython that referenced this pull request Jul 8, 2018
(cherry picked from commit bc9aa81)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
n0npax pushed a commit to n0npax/cpython that referenced this pull request Jul 8, 2018
(cherry picked from commit bc9aa81)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
@bedevere-bot
Copy link

GH-8186 is a backport of this pull request to the 3.7 branch.

@n0npax
Copy link
Contributor Author

n0npax commented Jul 8, 2018

PR prepared.
@berkerpeksag thanks for corrections.

berkerpeksag pushed a commit that referenced this pull request Jul 8, 2018
(cherry picked from commit bc9aa81)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
berkerpeksag pushed a commit that referenced this pull request Jul 8, 2018
(cherry picked from commit bc9aa81)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants