-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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-69093: Support basic incremental I/O to blobs in sqlite3
#30680
gh-69093: Support basic incremental I/O to blobs in sqlite3
#30680
Conversation
Some tests need to be updated with new error messages |
FYI, I'll prepare PRs for adding mapping protocol and context manager support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two small comments; other than that, the docs look good to me! (With the caveat that I know very little about SQLite 😄)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs LGTM!
Thanks for reviewing, both of you :) |
BTW, I went over the review comments on the original PR; it seems that the following two comments by Berker are not addressed yet:
I think we should heed those suggestions. If you are ok with that, I'll fix those right away. proposed patchcommit 69a5a1e2453710a34bfaf7863f94ea9dacefbedf (HEAD -> sqlite-blob-reduced)
Author: Erlend E. Aasland <erlend.aasland@innova.no>
Date: Fri Apr 15 00:53:09 2022 +0200
Address Berker's comments from gh-271: move __len__ doc to class description
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 992256c134..d0274fb797 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -1115 +1115,2 @@ Blob Objects
- data in an SQLite :abbr:`BLOB (Binary Large OBject)`.
+ data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call ``len(blob)`` to
+ get the size (number of bytes) of the blob.
@@ -1125,4 +1125,0 @@ Blob Objects
- .. method:: __len__()
-
- Return the blob size in bytes.
-
commit 2590112aff8ec625aa5d1debb8fdc10f36fa3017
Author: Erlend E. Aasland <erlend.aasland@innova.no>
Date: Fri Apr 15 00:52:47 2022 +0200
Address Berker's comments from gh-271: remove unneeded class prefix
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 0d4dbdf64d..992256c134 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -1117 +1117 @@ Blob Objects
- .. method:: Blob.close()
+ .. method:: close()
@@ -1125 +1125 @@ Blob Objects
- .. method:: Blob.__len__()
+ .. method:: __len__()
@@ -1129 +1129 @@ Blob Objects
- .. method:: Blob.read(length=-1, /)
+ .. method:: read(length=-1, /)
@@ -1137 +1137 @@ Blob Objects
- .. method:: Blob.write(data, /)
+ .. method:: write(data, /)
@@ -1143 +1143 @@ Blob Objects
- .. method:: Blob.tell()
+ .. method:: tell()
@@ -1147 +1147 @@ Blob Objects
- .. method:: Blob.seek(offset, origin=os.SEEK_SET, /)
+ .. method:: seek(offset, origin=os.SEEK_SET, /)
|
Sounds good, but I think your two patches conflict with each other. |
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged) - Aggregate window functions from python/cpython#20903 - Serialize/deserialize from python/cpython#26728 - Limit setting from python/cpython#28463
@erlend-aasland I wanted to say thank you for making this happen. Crazy it took more then 6 years to merge this... |
Thanks for paving the way, and thanks for having done so much for the sqlite3 module. Yeah, PRs can end up hanging for years before being merged. Better late than never, I guess :) (Also, I hope you're ok with the changes I've applied to your code.) |
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged) - Aggregate window functions from python/cpython#20903 - Serialize/deserialize from python/cpython#26728 - Limit setting from python/cpython#28463
Authored-by: Aviv Palivoda palaviv@gmail.com
Co-authored-by: Erlend E. Aasland erlend.aasland@innova.no
gh-69093