-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
gh-126259: Fix warning in doctest of sqlite3
#126260
Conversation
Is it possible to use a |
But why? I would need to import this lib and use a different syntax from other examples. |
Ah I see there's a lot of other manual closing in the other doctests. This is not the recommended way to use this module, but it is consistent with the other tests. Perhaps this should be fixed in another ticket |
This comment does not make sense to me, given what we're discussing. The doctests are all example code either in the reference or in the tutorial; showing the user how to set up and close a connection for each example would be contra-productive. Also, adding unneeded |
This comment was marked as outdated.
This comment was marked as outdated.
…ythonGH-126260) (cherry picked from commit 295262c) Co-authored-by: sobolevn <[email protected]>
…ythonGH-126260) (cherry picked from commit 295262c) Co-authored-by: sobolevn <[email protected]>
GH-126265 is a backport of this pull request to the 3.13 branch. |
GH-126266 is a backport of this pull request to the 3.12 branch. |
…H-126260) (#126265) (cherry picked from commit 295262c) Co-authored-by: sobolevn <[email protected]>
…H-126260) (#126266) (cherry picked from commit 295262c) Co-authored-by: sobolevn <[email protected]>
After:

sqlite3.rst
: "unclosed database in sqlite3.Connection" #126259📚 Documentation preview 📚: https://cpython-previews--126260.org.readthedocs.build/