[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23366 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24586 ___ Python tracker _

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I'm not sure about 1) because if target == source it means a user error. > OperationalError is usually used for non-user errors. Yes, my bad. ProgrammingError would be better. target == source results in SQLITE_ERROR, BTW. I'll throw up a PR for 3.

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Андрей Воропаев
Change by Андрей Воропаев : Added file: https://bugs.python.org/file49823/DOC-20200420-WA ___ Python tracker ___ ___ Python-bugs-list mai

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Berker Peksag
Berker Peksag added the comment: I'm not sure about 1) because if target == source it means a user error. OperationalError is usually used for non-user errors. 3) sounds good to me if that part is already covered by tests and they passed. -- ___ P

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : There are some issues with the error handling in pysqlite_connection_backup_impl(): 1. ValueError is returned if the target connection equals source connection. Should be OperationalError, IMHO. 2. The aforementioned check is already performed by