gh-126259: Fix warning in doctest of sqlite3#126260
gh-126259: Fix warning in doctest of sqlite3#126260erlend-aasland merged 1 commit intopython:mainfrom
sqlite3#126260Conversation
|
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 <mail@sobolevn.me>
…ythonGH-126260) (cherry picked from commit 295262c) Co-authored-by: sobolevn <mail@sobolevn.me>
|
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. |
After:

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