[issue34580] sqlite doc: clarify the scope of the context manager

2019-05-19 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___

[issue34580] sqlite doc: clarify the scope of the context manager

2019-05-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 205c1f0e36e00e6e7cb7fbabaab4f52732859f9e by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)

[issue34580] sqlite doc: clarify the scope of the context manager

2019-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +13339 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34580] sqlite doc: clarify the scope of the context manager

2019-05-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 287b84de939db47aa8c6f30734ceb8aba9d1db29 by Berker Peksag (Xtreak) in branch 'master': bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079) https://github.com/python/cpython/commit/287b84de939db47aa8c6f30734ceb8aba9d1db29

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-10 Thread Daniel Jakots
Daniel Jakots added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sounds good to me too since I copy paste from there time to time and also an unclosed connection doesn't seem to trigger a ResourceWarning it seems. I have pushed a commit to the same PR. I have changed it manually for all the include files. I

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Daniel Jakots
Daniel Jakots added the comment: Yes, I would totally support this move as it would show users that it's important to close it! -- ___ Python tracker ___

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Berker Peksag
Berker Peksag added the comment: PR 9079 looks good to me. I think we can use this as an opportunity to make the rest of the examples in the sqlite3 documentation more consistent and add missing "conn.close()" calls. -- ___ Python tracker

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks, I have pushed a change adding `con.close` at the end of the example and also verified that `./python.exe Doc/includes/sqlite3/ctx_manager.py` works as expected. Thanks -- ___ Python tracker

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Berker Peksag
Berker Peksag added the comment: > Should I remove or change this line as per Daniel's comment "Note that > this does not automatically call :meth:`close` on the connection object." I'd prefer to keep the current wording as-is. -- ___ Python

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the comments. I will add `con.close()` to the examples linked. Should I remove or change this line as per Daniel's comment "Note that this does not automatically call :meth:`close` on the connection object." Thanks -- Regards,

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Daniel Jakots
Daniel Jakots added the comment: Thanks, I lacked the greater picture. Yes, adding a "con.close()" line to the snippet would clarify for me! -- ___ Python tracker ___

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Berker Peksag
Berker Peksag added the comment: We always explicitly document what the context manager does even if it simply calls an object's close() method. See https://docs.python.org/3/library/fileinput.html#fileinput.input and https://docs.python.org/3/library/shelve.html#shelve.Shelf for example.

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Daniel Jakots
Daniel Jakots added the comment: Thanks for working on this bug! My message focussed on the closing aspect because that was my problem. :) Maybe the wording should be more general like: - "Note that this does not automatically call :meth:`close` on the connection object." + "Note that this

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: docs@python -> berker.peksag nosy: +berker.peksag, ghaering ___ Python tracker ___ ___

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems like an extra note is reasonable here. I have created a PR for this. Feedback welcome on the wording. Thanks. -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.8

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +8538 stage: -> patch review ___ Python tracker ___ ___

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-04 Thread Daniel Jakots
New submission from Daniel Jakots : In my experience, the first encounter for beginners with the context manager is with files. The highlighted feature is that you don't need to close the file, 'with' is going to do it for you. The sqlite3 documentation talks about the context manager in