classification
Title: Supporting native backup facility of SQLite
Type: enhancement Stage: patch review
Components: Extension Modules Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: anish.shah, berker.peksag, ced, ebarry, ghaering, lelit, palaviv, r.david.murray
Priority: normal Keywords: patch

Created on 2016-07-28 17:48 by lelit, last changed 2017-10-05 23:28 by r.david.murray.

Files
File name Uploaded Description Edit
issue27645.patch lelit, 2016-07-28 18:37 Preliminar patch review
issue27645-doc.patch lelit, 2016-07-28 20:18 Documentation review
Pull Requests
URL Status Linked Edit
PR 377 open python-dev, 2017-03-01 09:26
Messages (17)
msg271574 - (view) Author: Lele Gaifax (lelit) * Date: 2016-07-28 17:48
It would be nice if the sqlite3 stdlib module could expose the SQLite Online Backup API.

I'm willing to implement it, as encouraged by Paul Moore.

See also: https://mail.python.org/pipermail/python-dev/2016-July/145570.html
msg271575 - (view) Author: Lele Gaifax (lelit) * Date: 2016-07-28 17:56
Here is a preliminary implementation: https://github.com/lelit/cpython/commit/b7456eb6a55568639a41efb5d88ab4d9b3c20337
msg271576 - (view) Author: Emanuel Barry (ebarry) * Date: 2016-07-28 18:12
That's really nice, thank you for doing this! To get your code reviewed, though, you should upload a patch here. With git, you can do 'git diff > my_patch_file_name.patch' in your local repo, then you can upload the resulting file here. If you haven't done so yet, you'll need to sign a contributor agreement as well: https://www.python.org/psf/contrib/contrib-form/ :)

(Also, you might want to remove the 'index ...' lines in the patch file that git generates for each modified file; since there are three files, there should be three lines to remove. I'm not sure if you really have to, but I always do it just to be sure :)
msg271578 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-28 18:44
Thanks for the patch! I haven't had a chance to review the patch yet, but we also need documentation updates to Doc/library/sqlite3.rst.
msg271580 - (view) Author: Lele Gaifax (lelit) * Date: 2016-07-28 20:18
For the documentation see https://github.com/lelit/cpython/commit/bd82f8de9800ae40b33ddf1e4b7d72f10bc9c10e or the attached patch.
msg271582 - (view) Author: Lele Gaifax (lelit) * Date: 2016-07-28 20:24
WRT to the agreement form, I guess I'll have to compile it even if I already contributed to Python decades ago (ObjC, readline, NeXT support...), right?

Will try to do whatever is needed in the next days...
msg271584 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-07-28 20:26
If you have a copy of your original agreement you could fax it to the PSF, but it is probably easier to just to sign the electronic one.
msg271676 - (view) Author: Lele Gaifax (lelit) * Date: 2016-07-30 10:14
Ok, the agreement is fullfilled.
msg272848 - (view) Author: Lele Gaifax (lelit) * Date: 2016-08-16 08:57
I guess the chance of getting this merged before the 3.6 betas is very low, but if there is *anything* I could do to raise it, please tell :-)
msg288632 - (view) Author: Lele Gaifax (lelit) * Date: 2017-02-27 10:40
Now that we are is officially on GH, would you welcome a PR rebasing this patch on top of the master branch?
msg288723 - (view) Author: Aviv Palivoda (palaviv) * Date: 2017-02-28 19:57
I actually looked at the patch and have a few comments:
1. You need to put Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS before the sqlite3 calls (especially the sleep).
2. I think that the `pysqlite_connection_backup` function will look a lot better if you will have a cleanup/error label.

I am not a core developer but I think you should open the PR as it will be easier for the CR.
msg288750 - (view) Author: Lele Gaifax (lelit) * Date: 2017-03-01 09:35
Thank you Aviv, I applied your suggestions and opened a PR.
msg295455 - (view) Author: Lele Gaifax (lelit) * Date: 2017-06-08 16:36
Is there any chance this could be accepted for Python 3.7?
msg295472 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-06-09 00:48
There's a good chance, yes.  You'll have to keep periodically pinging the issue (say once a month :), and if you can specifically talk someone into doing a review your chances go up :)   For it to go in we need a review from a core-dev, but one or more reviews from non-core-devs will help it move along as well (less for the core-dev to do when they find the time to do the review).
msg298868 - (view) Author: Lele Gaifax (lelit) * Date: 2017-07-22 19:39
Monthly offer to do whatever is needed to easy the path to adoption :-)
msg303782 - (view) Author: Lele Gaifax (lelit) * Date: 2017-10-05 19:52
I rebased my v2 set of changesets into a new branch: https://github.com/lelit/cpython/tree/sqlite-backup-api-v3

I really don't know if anybody is interested beyond me, I did everything has been suggested/requested, and honestly I feel a bit discouraged: in the good'n'old days even potentially disrupting and invasive patches of mine have been accepted by the one&only core developer, now for an harmless, tested and documented single new feature an year and half has passed with almost no progress....

Anyway, I guess that this is my last attempt, let's hope... Let me know if I should close the PR#377 and reopen a new one, or whatever.
msg303789 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-10-05 23:28
If you are talking about Gerhard, if he was still around you'd probably get a similar response, but he hasn't been around much.  So this is somewhat of an orphaned module currently and it takes longer for an issue to get traction.  One of the drawbacks of the open-source-volunteer model :(
History
Date User Action Args
2017-10-05 23:28:27r.david.murraysetmessages: + msg303789
2017-10-05 19:52:02lelitsetmessages: + msg303782
2017-07-22 19:39:57lelitsetmessages: + msg298868
2017-06-09 00:48:06r.david.murraysetmessages: + msg295472
versions: + Python 3.7, - Python 3.6
2017-06-08 16:36:00lelitsetmessages: + msg295455
2017-03-03 07:44:59anish.shahsetnosy: + anish.shah
2017-03-01 09:35:09lelitsetmessages: + msg288750
2017-03-01 09:26:52python-devsetpull_requests: + pull_request315
2017-02-28 19:57:30palavivsetnosy: + palaviv
messages: + msg288723
2017-02-27 10:40:38lelitsetmessages: + msg288632
2016-08-17 20:26:43cedsetnosy: + ced
2016-08-16 21:02:18ned.deilysetnosy: + ghaering
2016-08-16 08:57:47lelitsetmessages: + msg272848
2016-07-30 10:14:10lelitsetmessages: + msg271676
2016-07-28 20:26:54r.david.murraysetnosy: + r.david.murray
messages: + msg271584
2016-07-28 20:24:12lelitsetmessages: + msg271582
2016-07-28 20:18:55lelitsetfiles: + issue27645-doc.patch

messages: + msg271580
2016-07-28 18:44:10berker.peksagsetnosy: + berker.peksag

messages: + msg271578
stage: patch review
2016-07-28 18:37:30lelitsetfiles: + issue27645.patch
keywords: + patch
2016-07-28 18:12:29ebarrysetnosy: + ebarry
messages: + msg271576
2016-07-28 17:56:36lelitsetmessages: + msg271575
2016-07-28 17:48:18lelitcreate