[issue24139] Use sqlite3 extended error codes

2021-11-03 Thread Ken Jin


Ken Jin  added the comment:


New changeset 0dfb8c4afee65f9e185882efd57f7012120da74c by Erlend Egeberg 
Aasland in branch 'main':
bpo-24139: Fix test_sqlite3 `test_extended_error_code_on_exception()` on s390x 
RHEL buildbots (GH-29382)
https://github.com/python/cpython/commit/0dfb8c4afee65f9e185882efd57f7012120da74c


--
nosy: +kj

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2021-11-03 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27640
pull_request: https://github.com/python/cpython/pull/29382

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2021-11-02 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2021-11-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 456e27ac0ac6bc1cfd6da0191bd7802d8667457b by Erlend Egeberg 
Aasland in branch 'main':
bpo-24139: Add support for SQLite extended result codes (GH-28076)
https://github.com/python/cpython/commit/456e27ac0ac6bc1cfd6da0191bd7802d8667457b


--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2021-08-30 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26520
pull_request: https://github.com/python/cpython/pull/28076

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2020-12-18 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2019-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -13749

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2019-06-06 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +13749
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13869

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2017-04-13 Thread Aviv Palivoda

Changes by Aviv Palivoda :


--
pull_requests: +1249

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Aviv Palivoda

Aviv Palivoda added the comment:

> Are the changes in the other ticket needed to implement new tests?
> Or is it possible to include tests here?

It is not possible to add any tests to this issue before exposing the error 
code. I will implement new tests when issue 16379 will be resolved.

> Aviv the patch makes in itself.

I think that this issue should be dependent on issue 16379 as the behavior of 
the sqlite module will no be changed after this patch until issue 16379 is 
resolved. In addition there will be some "rebase" issues that will need to be 
solved.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Dima Tisnek

Dima Tisnek added the comment:

I meant "the patch makes sense in itself".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Dima Tisnek

Dima Tisnek added the comment:

Aviv the patch makes in itself.

Are the changes in the other ticket needed to implement new tests?
Or is it possible to include tests here?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2016-08-30 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Attached is a patch to enable the extended error codes. This patch should be 
dependent on issue 16379.
Without returning the sqlite error code in the exception the extended error 
code does not reveal any information not currently available. As you can see in 
https://github.com/mackyle/sqlite/blob/ebb27fe5bd5045d924d99cdd7dec9b7064c24768/src/main.c#L1318
 there are messages only for the non-extended error codes and that is what is 
exposed now.

--
keywords: +patch
nosy: +palaviv
Added file: http://bugs.python.org/file44280/24139.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2015-05-07 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ghaering

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2015-05-07 Thread R. David Murray

R. David Murray added the comment:

It seems reasonable to provide as much error information as is available, one 
way or another.  Would you like to work on a patch?

--
nosy: +r.david.murray
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24139] Use sqlite3 extended error codes

2015-05-07 Thread Dima Tisnek

New submission from Dima Tisnek:

Let's fetch extended error codes from SQLite, information contained is not 
particularly interesting to the user, but may be invaluable in debugging!

http://www.sqlite.org/rescode.html
https://sqlite.org/c3ref/extended_result_codes.html
http://www.sqlite.org/c3ref/errcode.html

Current behaviour:

For example, consider that extended error was SQLITE_READONLY_DBMOVED, it would 
be set in 
https://github.com/mackyle/sqlite/blob/1caed0ecc62583c4f8a509ff66ae99b6939fe727/src/pager.c#L4836
 without explicit detail string.

Python will call sqlite3_errcode() which will strip extended information via `& 
errMask` in 
https://github.com/mackyle/sqlite/blob/ebb27fe5bd5045d924d99cdd7dec9b7064c24768/src/main.c#L2176

Python will then call sqlite3_errmsg(), and the error message will be according 
to truncated (simple) error per:
https://github.com/mackyle/sqlite/blob/ebb27fe5bd5045d924d99cdd7dec9b7064c24768/src/main.c#L1318

P.S. there are a few cases where sqlite3 internally sets both error code and 
message, in those cases, current Python module (presumably) reads out the error 
message correctly. For example 
https://github.com/mackyle/sqlite/blob/ebb27fe5bd5045d924d99cdd7dec9b7064c24768/src/main.c#L1584

--
components: Extension Modules
messages: 242710
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: Use sqlite3 extended error codes
type: enhancement
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com