[issue44229] test_get_server_certificate fails intermittently on macOS
Erlend E. Aasland added the comment: I feared that ;) -- ___ Python tracker <https://bugs.python.org/issue44229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44229] test_get_server_certificate fails intermittently on macOS
Erlend E. Aasland added the comment: I’ll see if I can provoke it on my Mac. What’s the preferred solution? 1. Catch the connection failure and skip the test? 2. Retry connection? 3. Find the root cause and make sure it never ever happens :) Maybe 2. is acceptable :) -- ___ Python tracker <https://bugs.python.org/issue44229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44231] Remove _PyTuple_FromArray from the public API
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24942 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26352 ___ Python tracker <https://bugs.python.org/issue44231> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44231] Remove _PyTuple_FromArray from the public API
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg394328 ___ Python tracker <https://bugs.python.org/issue44231> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44231] Remove _PyTuple_FromArray from the public API
New submission from Erlend E. Aasland : I propose to remove the undocumented function _PyTuple_FromArray from the public API, by using the extern keyword iso. PyAPI_FUNC. _PyTuple_FromArray was introduced by bpo-36030 in GH-11954 during the Python 3.8 alpha phase. In the stdlib, it is used by the itertools module only. It "lives" in Include/internal/pycore_tuple.h. -- ___ Python tracker <https://bugs.python.org/issue44231> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44231] Remove _PyTuple_FromArray from the public API
New submission from Erlend E. Aasland : I propose to remove the undocumented function _PyTuple_FromArray from the public API, by using the extern keyword iso. PyAPI_FUNC. _PyTuple_FromArray was introduced by bpo-36030 in GH-11954 during the Python 3.8 alpha phase. In the stdlib, it is used by the itertools module only. It "lives" in Include/internal/pycore_tupleobject.h. -- components: C API messages: 394328 nosy: erlendaasland, petr.viktorin, vstinner priority: normal severity: normal status: open title: Remove _PyTuple_FromArray from the public API type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue44231> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag
Change by Erlend E. Aasland : -- pull_requests: +24941 pull_request: https://github.com/python/cpython/pull/26351 ___ Python tracker <https://bugs.python.org/issue43908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44229] test_get_server_certificate fails intermittently on macOS
Change by Erlend E. Aasland : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue44229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44229] test_get_server_certificate fails intermittently on macOS
Change by Erlend E. Aasland : -- title: test_get_server_certificate fails on macOS -> test_get_server_certificate fails intermittently on macOS ___ Python tracker <https://bugs.python.org/issue44229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44229] test_get_server_certificate fails on macOS
New submission from Erlend E. Aasland : See https://github.com/python/cpython/pull/26104/checks?check_run_id=2662511684 == ERROR: test_get_server_certificate (test.test_ssl.SimpleBackgroundTests) -- Traceback (most recent call last): File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2132, in test_get_server_certificate _test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA) File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2329, in _test_get_server_certificate pem = ssl.get_server_certificate((host, port), ca_certs=cert) File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1520, in get_server_certificate with create_connection(addr, timeout=timeout) as sock: File "/Users/runner/work/cpython/cpython/Lib/socket.py", line 844, in create_connection raise err File "/Users/runner/work/cpython/cpython/Lib/socket.py", line 832, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused -- components: Tests messages: 394299 nosy: christian.heimes, erlendaasland priority: normal severity: normal status: open title: test_get_server_certificate fails on macOS versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue44229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object
Erlend E. Aasland added the comment: > I'm not fully sure that the both use cases can be combined. I'm fully sure they can :) Did I miss anything in msg393942? AFAICS, there is no need for the weak ref list anymore. -- ___ Python tracker <https://bugs.python.org/issue44079> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue40092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43853] [sqlite3] Improve sqlite3_value_text() error handling
Erlend E. Aasland added the comment: The affected branch is exercised by the following tests: - test_aggr_check_param_blob - test_aggr_check_param_float - test_aggr_check_param_int - test_aggr_check_param_none - test_aggr_check_param_str - test_aggr_check_params_int - test_aggr_exception_in_finalize - test_aggr_exception_in_step - test_aggr_no_finalize - test_param_string I've expanded test_aggr_check_param_str and test_param_string to also check empty strings. -- ___ Python tracker <https://bugs.python.org/issue43853> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11486] Add option to not install into /Applications
Erlend E. Aasland added the comment: Ronald, do you still wish to apply this? It should be easy to rebase this patch onto main. If not, we should perhaps close this issue. -- nosy: +erlendaasland versions: +Python 3.11 -Python 3.4 ___ Python tracker <https://bugs.python.org/issue11486> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44207] Add a version number to Python functions
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44207> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44206] Add a version number to dict keys.
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44206> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44217] Tkinter/IDLE: literal astral char discombobulates text editing
Erlend E. Aasland added the comment: STM like the most reasonable thing to do is to enhance the docs, as Terry suggested. -- ___ Python tracker <https://bugs.python.org/issue44217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44217] [IDLE] Weird behaviour in IDLE when printing non-BMP unicode characters
Erlend E. Aasland added the comment: > What about closing this as third party? (Tcl/Tk is a dependency but still > it's a third party right?) Sure. I'll leave that for Terry or any of the other IDLE devs. We can adjust the resolution after close if needed. > Also what's up with this open-pending issue? It seems like a bpo bug, but I've got a feeling that fixing bpo bugs will not be prioritised (see PEP 581 and PEP 588). -- status: pending -> open ___ Python tracker <https://bugs.python.org/issue44217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44217] [IDLE] Weird behaviour in IDLE when printing non-BMP unicode characters
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue44217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44217] [IDLE] Weird behaviour in IDLE when printing non-BMP unicode characters
Change by Erlend E. Aasland : -- status: pending -> open title: [IDLE] Weird behaviour in IDLE while dealing with non-ASCII characters -> [IDLE] Weird behaviour in IDLE when printing non-BMP unicode characters ___ Python tracker <https://bugs.python.org/issue44217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44217] [IDLE] Weird behaviour in IDLE while dealing with non-ASCII characters
Erlend E. Aasland added the comment: > The smiley emoji is U+1F600 which is outside of the Unicode Basic > Multilingual Plane (BMP). Correct, and this is documented: https://docs.python.org/3/library/idle.html#user-output-in-shell Suggesting to close this as not-a-bug. -- nosy: +erlendaasland status: open -> pending ___ Python tracker <https://bugs.python.org/issue44217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40068] test_threading: ThreadJoinOnShutdown.test_reinit_tls_after_fork() crash with Python 3.8 on AIX
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue40068> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44147] [WinError 193] %1 is not a valid Win32 application
Erlend E. Aasland added the comment: Closing as not-a-bug. Feel free to reopen if we've missed anything. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30757] pyinstaller can be added to docs, py2exe ref can be updated
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue30757> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44112> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30757] pyinstaller can be added to docs, py2exe ref can be updated
Change by Erlend E. Aasland : -- nosy: +berker.peksag versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue30757> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30757] pyinstaller can be added to docs, py2exe ref can be updated
Change by Erlend E. Aasland : -- keywords: +patch nosy: +erlendaasland nosy_count: 9.0 -> 10.0 pull_requests: +24908 pull_request: https://github.com/python/cpython/pull/26309 ___ Python tracker <https://bugs.python.org/issue30757> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41930] Wrap sqlite3_serialize API in sqlite3 module
Erlend E. Aasland added the comment: FYI, the pending release log of the upcoming SQLite 3.36.0 now mentions that these API's are enabled by default: https://sqlite.org/releaselog/3_36_0.html -- ___ Python tracker <https://bugs.python.org/issue41930> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44203] test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44203> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack
Erlend E. Aasland added the comment: cc. Pablo, Victor -- nosy: +pablogsal, vstinner ___ Python tracker <https://bugs.python.org/issue44032> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack
Erlend E. Aasland added the comment: Using Pablo's (or Victor's) reproducer from bpo-44184, I'm getting a crash, apparently because _PyThreadState_PushLocals() is called after PyThreadState_Clear(). In Python/pystate.c interpreter_clear(), we're first calling PyThreadState_Clear() (line 295), and a few lines later (line 326) we're running _PyGC_CollectNoFail(). Clearing tstate _after_ the last GC collect resolves the issue (see attached patch), but it might introduce other problems; I'm not at all familiar with this part of the codebase. FYI, git HEAD is at b11a951f16f0603d98de24fee5c023df83ea552c on main. = ==22475==ERROR: AddressSanitizer: heap-use-after-free on address 0x62900220 at pc 0x00010c985aa8 bp 0x7ffee3bab620 sp 0x7ffee3bab618 WRITE of size 8 at 0x62900220 thread T0 #0 0x10c985aa7 in _PyThreadState_PushLocals pystate.c:2030 #1 0x10c7fc8b6 in _PyEval_Vector ceval.c:5164 #2 0x10c397ebe in _PyFunction_Vectorcall call.c:342 #3 0x10c5591b2 in _PyObject_VectorcallTstate abstract.h:114 #4 0x10c558f6b in PyObject_CallOneArg abstract.h:184 #5 0x10c5586c9 in call_unbound_noarg typeobject.c:1625 #6 0x10c57d578 in slot_tp_finalize typeobject.c:7762 #7 0x10ca2ea0b in finalize_garbage gcmodule.c:982 #8 0x10ca2694d in gc_collect_main gcmodule.c:1287 #9 0x10ca25f9c in _PyGC_CollectNoFail gcmodule.c:2123 #10 0x10c97abed in interpreter_clear pystate.c:326 #11 0x10c97ae81 in _PyInterpreterState_Clear pystate.c:358 #12 0x10c9697d9 in finalize_interp_clear pylifecycle.c:1634 #13 0x10c96925b in Py_FinalizeEx pylifecycle.c:1812 #14 0x10ca1f143 in Py_RunMain main.c:668 #15 0x10ca203e4 in pymain_main main.c:696 #16 0x10ca20694 in Py_BytesMain main.c:720 #17 0x10c055a91 in main python.c:15 #18 0x7fff20582f3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c) 0x62900220 is located 32 bytes inside of 16384-byte region [0x62900200,0x62904200) freed by thread T0 here: #0 0x10d518609 in wrap_free+0xa9 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x48609) #1 0x10c50a7fc in _PyObject_ArenaFree obmalloc.c:174 #2 0x10c5098e7 in _PyObject_VirtualFree obmalloc.c:564 #3 0x10c9808cf in PyThreadState_Clear pystate.c:904 #4 0x10c97a178 in interpreter_clear pystate.c:295 #5 0x10c97ae81 in _PyInterpreterState_Clear pystate.c:358 #6 0x10c9697d9 in finalize_interp_clear pylifecycle.c:1634 #7 0x10c96925b in Py_FinalizeEx pylifecycle.c:1812 #8 0x10ca1f143 in Py_RunMain main.c:668 #9 0x10ca203e4 in pymain_main main.c:696 #10 0x10ca20694 in Py_BytesMain main.c:720 #11 0x10c055a91 in main python.c:15 #12 0x7fff20582f3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c) previously allocated by thread T0 here: #0 0x10d5184c0 in wrap_malloc+0xa0 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x484c0) #1 0x10c50a7d8 in _PyObject_ArenaMalloc obmalloc.c:168 #2 0x10c5098af in _PyObject_VirtualAlloc obmalloc.c:558 #3 0x10c985bb7 in allocate_chunk pystate.c:617 #4 0x10c97d6ee in new_threadstate pystate.c:678 #5 0x10c97cb49 in PyThreadState_New pystate.c:706 #6 0x10c96e26b in pycore_create_interpreter pylifecycle.c:614 #7 0x10c96ca7c in pyinit_config pylifecycle.c:834 #8 0x10c967c3a in pyinit_core pylifecycle.c:1003 #9 0x10c967429 in Py_InitializeFromConfig pylifecycle.c:1188 #10 0x10ca2409f in pymain_init main.c:66 #11 0x10ca201ee in pymain_main main.c:687 #12 0x10ca20694 in Py_BytesMain main.c:720 #13 0x10c055a91 in main python.c:15 #14 0x7fff20582f3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c) SUMMARY: AddressSanitizer: heap-use-after-free pystate.c:2030 in _PyThreadState_PushLocals Shadow bytes around the buggy address: 0x1c51fff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1c52: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c520010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c520020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c520030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x1c520040: fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd 0x1c520050: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x1c520060: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x1c520070: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x1c520080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x1c520090: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user:
[issue44184] crash on windows invoking flake8
Erlend E. Aasland added the comment: > Crash related to AST in interpreter_clear() remains me bpo-41796. Well remembered, Victor! Bisecting using Pablo's reproducer: fd957c124c1d9c5eaf61f7af8cf266bafcb1 is the first bad commit commit fd957c124c1d9c5eaf61f7af8cf266bafcb1 Author: Victor Stinner Date: Tue Nov 3 18:07:15 2020 +0100 bpo-41796: Call _PyAST_Fini() earlier to fix a leak (GH-23131) -- ___ Python tracker <https://bugs.python.org/issue44184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44184] crash on windows invoking flake8
Erlend E. Aasland added the comment: FWIW, I'm also unable to reproduce on macOS (so far). -- ___ Python tracker <https://bugs.python.org/issue44184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44184] crash on windows invoking flake8
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44099] [C API] Introduce a new slot in PyModuleDef to hold the classes
Erlend E. Aasland added the comment: How will you differentiate which types should be added to the module dict and which not to add. How will you map the instantiated type objects to the respective module state members? -- ___ Python tracker <https://bugs.python.org/issue44099> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44099] [C API] Introduce a new slot in PyModuleDef to hold the classes
Erlend E. Aasland added the comment: See also bpo-42376 -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44099> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
Erlend E. Aasland added the comment: SQLITE_TOOBIG is currently mapped to sqlite3.DataError. In order to keep the current behaviour, DataError must be raised. -- ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg393977 ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
Erlend E. Aasland added the comment: Regarding the maximum length of an SQL string, quoting from https://sqlite.org/limits.html: "The current implementation will only support a string or BLOB length up to 2^31-1 or 2147483647. And some built-in functions such as hex() might fail well before that point. In security-sensitive applications it is best not to try to increase the maximum string and blob length. In fact, you might do well to lower the maximum string and blob length to something more in the range of a few million if that is possible." The size returned from functions such as PyUnicode_AsUTF8AndSize is Py_ssize_t. I suggest checking the passed SQL string size and raising OverflowError if the SQL string is larger than SQLITE_MAX_LENGTH. -- ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
Erlend E. Aasland added the comment: Regarding the maximum length of an SQL string, quoting from https://sqlite.org/limits.html: "The current implementation will only support a string or BLOB length up to 2^31-1 or 2147483647. And some built-in functions such as hex() might fail well before that point. In security-sensitive applications it is best not to try to increase the maximum string and blob length. In fact, you might do well to lower the maximum string and blob length to something more in the range of a few million if that is possible." The size returned from functions such as PyUnicode_AsUTF8AndSize is Py_ssize_t. I suggest checking the passed SQL string size and raising OverflowError if the SQL string is larger than 2^31-1. -- ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue9924> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20587] sqlite3 converter not being called
Erlend E. Aasland added the comment: I'm unable to reproduce this on 3.8 though 3.11a0. It's unclear to me if this even was an issue. (I have no ancient Python versions to test with.) Closing as out-of-date in a day or two, unless someone disagrees. -- nosy: +erlendaasland status: open -> pending ___ Python tracker <https://bugs.python.org/issue20587> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Erlend E. Aasland added the comment: I've crafted a number of rollback tests, but it occurred to me that they are simply just testing SQLite behaviour; not sqlite3 behaviour. I had to adjust the tests according to which version of SQLite was used (for example 3.8.7.2 introduced new behaviour). Such tests are bound to break as SQLite evolves. I'm not sure we want such tests in our test suite; it can make the CI fail for completely unrelated PRs. Suggesting to leave detailed rollback testing to SQLite and just keep a couple of basic tests in our suite. -- ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Erlend E. Aasland added the comment: The effect of PR 26026 is that InterfaceError is no longer raised for fetch across rollback; instead it is up to SQLite how to handle this: - for some cases, SQLITE_ABORT or SQLITE_ABORT_ROLLBACK may be returned, which will result in an OperationalError (accompanied by a nice error message provided by SQLite) - for other cases, no error is returned; the operation is allowed and succeeds as expected - for yet other cases, no error is returned, and the operation was rolled back A NEWS entry should mention the change in behaviour, but I can't see how it would break existing projects; the current code disallows fetch across rollback (InterfaceError), so any problematic code would have been found, handled and fixed during debugging. -- ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg393339 ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg393367 ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Change by Erlend E. Aasland : Removed file: https://bugs.python.org/file50029/patch.diff ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object
Erlend E. Aasland added the comment: Yes, that seems to be the intention. But, I don't think there is a need to maintain the second list: 1. Resetting statements was historically needed both for commit and rollback; pending statements would block such operations. That's no longer the case for recent SQLite versions (commits fixed in SQLite 3.6.5, rollbacks in SQLite 3.7.11). The sqlite3 module no longer reset commit statements (6ed442c48dd7f8d3097e688a36bc027df3271621), and there should be no need to reset rollbacks either (see bpo-44092). 2. A statement with ref count zero will be garbage collected. Thus, of a statement is dropped from the LRU cache, it will be sqlite3_finalize'd. No statement, no problem. It's the same effect as if _pysqlite_drop_unused_statement_references() used the same limit as the LRU cache. If we want to explicit reset statements (for some reason), we'd be better off to use sqlite3_stmt_next(). It's faster, and it covers _all_ statements for a given connection. -- ___ Python tracker <https://bugs.python.org/issue44079> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44106] [sqlite3] don't use politicians in examples/docs
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44106> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21465] sqlite3 Row can return duplicate keys when using adapters
Erlend E. Aasland added the comment: AFAICS, this has nothing to do with adapters; you'll get duplicate keys just by executing 'select 1 as "token", 2 as "token"'. If you want the columns to have unique names, you should assign them unique names. At most, there could be a sentence about this in the docs ("best practices"), but IMO this should be obvious. I would leave the docs as they are. Suggesting to close this as not a bug. -- assignee: ghaering -> nosy: +berker.peksag, erlendaasland -ghaering status: open -> pending ___ Python tracker <https://bugs.python.org/issue21465> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44106] [sqlite3] don't use politicians in examples/docs
Change by Erlend E. Aasland : -- pull_requests: +24851 pull_request: https://github.com/python/cpython/pull/26234 ___ Python tracker <https://bugs.python.org/issue44106> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27334] [sqlite3] context manager leaves db locked if commit fails in __exit__
Erlend E. Aasland added the comment: > I believe the reason for this problem is that the exception happened in the > implicit `commit` that is run on exiting the context manager, rather than > inside it. In fact the exception is in the `pass` line rather than in the > `execute` line. This exception did not trigger a `rollback` because the it > happened after `pysqlite_connection_exit` checks for exceptions. FYI, here's the SQLite API interaction from the context manager, chronologically (using the test from the PR). (I only show the relevant arguments passed to the API, for readability.) sqlite3_prepare_v2("insert into t values('test')", insert_stmt) => SQLITE_OK sqlite3_get_autocommit() # Note, the insert statement is now prepared, but not executed yet. # Transaction control now begins sqlite3_prepare_v2("BEGIN ", begin_stmt) => SQLITE_OK sqlite3_step(begin_stmt) => SQLITE_DONE sqlite3_finalize(begin_stmt) # Here, the insert statement is executed sqlite3_bind_blob_parameter_count(insert_stmt) sqlite3_step(insert_stmt) => SQLITE_DONE sqlite3_changes() sqlite3_last_insert_rowid() sqlite3_reset(insert_stmt) => SQLITE_OK sqlite3_get_autocommit() # Enter __exit__: no exception has been raised, so it tries to commit sqlite3_prepare_v2("commit", commit_stmt) => SQLITE_OK sqlite3_step(commit_stmt) => SQLITE_BUSY (database is locked) sqlite3_finalize(commit_stmt) # After the fix, rollback is now executed sqlite3_prepare_v2("rollback", rollback_stmt) sqlite3_step(rollback_stmt) => SQLITE_DONE sqlite3_finalize(rollback_Stmt) As you can see, it does not fail (and raise an exception) until commit is issued inside __exit__. -- ___ Python tracker <https://bugs.python.org/issue27334> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] Document that sqlite3.Cursor.executescript disregards isolation_level
Change by Erlend E. Aasland : -- title: sqlite3 executescript does not respect isolation_level? -> Document that sqlite3.Cursor.executescript disregards isolation_level ___ Python tracker <https://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] sqlite3 executescript does not respect isolation_level?
Change by Erlend E. Aasland : -- pull_requests: +24837 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26220 ___ Python tracker <https://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] sqlite3 executescript does not respect isolation_level?
Erlend E. Aasland added the comment: Mentioning this behaviour in the documentation should be sufficient. -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +berker.peksag, docs@python, erlendaasland versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35889] sqlite3.Row doesn't have useful repr
Erlend E. Aasland added the comment: See: - https://www.sqlite.org/c3ref/column_database_name.html - https://www.sqlite.org/c3ref/table_column_metadata.html Notice that the former is only available if SQLITE_ENABLE_COLUMN_METADATA was defined at compile time. -- ___ Python tracker <https://bugs.python.org/issue35889> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35889] sqlite3.Row doesn't have useful repr
Erlend E. Aasland added the comment: > What about a __repr__ that includes the primary key value(s) (for tables > where that is defined)? I’d rather have that as a Row method, or read-only property. It should be straight-forward to implement. SQLite provides an API for such purposes. -- ___ Python tracker <https://bugs.python.org/issue35889> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44147] [WinError 193] %1 is not a valid Win32 application
Erlend E. Aasland added the comment: Eryk, Steve, can we close this? AFAICT, this belongs to a user forum. Shreyan: it seems like a bpo bug to me. I have a feeling closing the issue will help. -- ___ Python tracker <https://bugs.python.org/issue44147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44147] [WinError 193] %1 is not a valid Win32 application
Erlend E. Aasland added the comment: Setting status to pending again. (Seems like bpo likes this dance) -- nosy: +erlendaasland status: open -> pending ___ Python tracker <https://bugs.python.org/issue44147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
Erlend E. Aasland added the comment: Note, PR 26206 does not include statement creation in _pysqlite_connection_begin (Modules/_sqlite/connection.c). That needs further refactoring, so I'll add that in a separate PR if PR 26206 is accepted. -- ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24823 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26206 ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size
New submission from Erlend E. Aasland : The signature of sqlite3_prepare_v2 is as follows: int sqlite3_prepare_v2( sqlite3 *db,/* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); Quoting from the SQLite docs[1]: "If the caller knows that the supplied string is nul-terminated, then there is a small performance advantage to passing an nByte parameter that is the number of bytes in the input string including the nul-terminator." sqlite3_prepare_v2 is used five places in the sqlite3 module. We can easily provide the string size in those places. [1] https://sqlite.org/c3ref/prepare.html -- components: Extension Modules messages: 393856 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: low severity: normal status: open title: [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size type: performance versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue44165> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27334] [sqlite3] context manager leaves db locked if commit fails in __exit__
Erlend E. Aasland added the comment: > In fact the exception is in the `pass` line rather than in the `execute` line. I can reproduce this without the `pass` line. I've taken the liberty to create a PR based on your patch, Luca. Berker's comments have been addressed in the PR. -- title: pysqlite3 context manager not performing rollback when a database is locked elsewhere for non-DML statements -> [sqlite3] context manager leaves db locked if commit fails in __exit__ versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue27334> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27334] pysqlite3 context manager not performing rollback when a database is locked elsewhere for non-DML statements
Change by Erlend E. Aasland : -- nosy: +erlendaasland nosy_count: 3.0 -> 4.0 pull_requests: +24819 pull_request: https://github.com/python/cpython/pull/26202 ___ Python tracker <https://bugs.python.org/issue27334> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10513] sqlite3.InterfaceError after commit
Erlend E. Aasland added the comment: Closing as fixed. If someone disagrees; please re-open. -- resolution: -> fixed status: pending -> closed ___ Python tracker <https://bugs.python.org/issue10513> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38768] [feature request] Add lldb equivalent to Tools/gdb
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue38768> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module
Change by Erlend E. Aasland : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue42862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
Erlend E. Aasland added the comment: Is there a deterministic way to test these changes? Will something a la this be sufficient: import gc import sys gc.collect() before = sys.gettotalrefcount() import somemod del sys.modules['somemod'] del somemod gc.collect() after = sys.gettotalrefcount() assert after == before -- ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite
Change by Erlend E. Aasland : -- pull_requests: +24767 pull_request: https://github.com/python/cpython/pull/26128 ___ Python tracker <https://bugs.python.org/issue44108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
Change by Erlend E. Aasland : -- pull_requests: -23226 ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
Change by Erlend E. Aasland : -- pull_requests: +24759 pull_request: https://github.com/python/cpython/pull/26114 ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
Erlend E. Aasland added the comment: I've added a checkbox for types that fully implement the GC protocol to https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403/1. Heap types that fully implement the GC protocol: * _abc._abc_data * _bz2.BZ2Compressor * _bz2.BZ2Decompressor * _csv.Dialect * _csv.reader * _csv.writer * _json.Encoder * _json.Scanner * _lzma.LZMACompressor * _lzma.LZMADecompressor * _multibytecodec.MultibyteCodec * _struct.unpack_iterator * _thread._local * _thread.lock * ast.AST Heap types that do not fully implement the GC protocol: * _curses_panel.panel * _dbm.dbm * _gdbm.gdbm * _hashlib.HASH * _hashlib.HASHXOF * _lsprof.Profiler * _md5.md5 * _multibytecodec.MultibyteIncrementalDecoder * _multibytecodec.MultibyteIncrementalEncoder * _multibytecodec.MultibyteStreamReader * _multibytecodec.MultibyteStreamWriter * _overlapped.Overlapped * _queue.SimpleQueue * _random.Random * _sha1.sha1 * _sha256.sha224 * _sha256.sha256 * _sha512.sha384 * _sha512.sha512 * _sre.SRE_Scanner * _ssl.MemoryBIO * _ssl.SSLSession * _ssl._SSLContext * _ssl._SSLSocket * _struct.Struct * _thread.RLock * _thread._localdummy * _tkinter.Tcl_Obj * _tkinter.tkapp * _tkinter.tktimertoken * array.array * array.arrayiterator * functools.KeyWrapper * functools._lru_cache_wrapper * functools._lru_list_elem * functools.partial * mmap.mmap * operator.attrgetter * operator.itemgetter * operator.methodcaller * posix.DirEntry * posix.ScandirIterator * pyexpat.xmlparser * re.Match * re.Pattern * select.devpoll * select.epoll * select.kevent * select.kqueue * select.poll * sqlite3.Cache * sqlite3.Connection * sqlite3.Cursor * sqlite3.Node * sqlite3.PrepareProtocol * sqlite3.Row * sqlite3.Statement * ssl.SSLError * unicodedata.UCD * winapi__overlapped.Overlapped * zlib.Compress * zlib.Decompress -- ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
Change by Erlend E. Aasland : -- pull_requests: +24746 pull_request: https://github.com/python/cpython/pull/26104 ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: Pablo, as mentioned in bpo-42972, this is an issue with all heap allocated types; it is not _csv specific. I know that work with heap types have been halted by the SC, as you've pointed out a couple of times already, but shouldn't this heap type issue be fixed before 3.10 is released? There's plenty of time in the beta phase to do this. -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40645] Use OpenSSL's HMAC API
Change by Erlend E. Aasland : -- nosy: +erlendaasland nosy_count: 6.0 -> 7.0 pull_requests: +24718 pull_request: https://github.com/python/cpython/pull/26079 ___ Python tracker <https://bugs.python.org/issue40645> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: Yeah, that helped a lot: test_csv leaked [487, 487, 487, 487] memory blocks, sum=1948 Thanks! :) -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: > Changes to _csv.Error should not be necessary, there everything is handled by > the superclass. Got it; thanks. -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: Also, for some reason two first iterations of the reproducer prints 2 less ref counts. -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: I don't understand this. After applying PR-26074, test_csv now leaks memory/refs: $ ./python.exe -m test -R : test_csv 0:00:00 load avg: 1.18 Run tests sequentially 0:00:00 load avg: 1.18 [1/1] test_csv beginning 9 repetitions 123456789 . test_csv leaked [3928, 3924, 3924, 3924] references, sum=15700 test_csv leaked [1666, 1664, 1664, 1664] memory blocks, sum=6658 test_csv failed == Tests result: FAILURE == 1 test failed: test_csv Total duration: 4.9 sec Tests result: FAILURE Any ideas? -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Change by Erlend E. Aasland : -- pull_requests: +24714 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26074 ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: Sure, I’ll do it after dinner :) -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: I created a quick-and-dirty patch. I can clean it up and make it into a PR if you want. -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: Adding GC to _csv types: $ cat import sys import gc for i in range(10): import csv del sys.modules['_csv'] del sys.modules['csv'] del csv gc.collect() print(sys.gettotalrefcount()) $ ./python.exe bug.py 73164 73164 73166 73166 73166 73166 73166 73166 73166 73166 -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Change by Erlend E. Aasland : Added file: https://bugs.python.org/file50038/gc.diff ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland added the comment: Could it be that the _csv heap types are not garbage collected? Ref. bpo-42972. -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28528] Pdb.checkline() attribute error when 'curframe' is None
Erlend E. Aasland added the comment: Yes, test.os_helper was introduced in 3.10. I've manually cherry-picked 8563a7052ccd98e6a381d361664ce567afd5eb6e to 3.9 (GH-26053). -- ___ Python tracker <https://bugs.python.org/issue28528> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28528] Pdb.checkline() attribute error when 'curframe' is None
Change by Erlend E. Aasland : -- pull_requests: +24693 pull_request: https://github.com/python/cpython/pull/26053 ___ Python tracker <https://bugs.python.org/issue28528> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite
Erlend E. Aasland added the comment: Digression: test_unicode_content should be named test_trace_unicode_content, in order to express the purpose of the test more clearly, should it fail. -- ___ Python tracker <https://bugs.python.org/issue44108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24680 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26032 ___ Python tracker <https://bugs.python.org/issue44108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite
New submission from Erlend E. Aasland : Most of the SQL statements in the sqlite3 test suite correctly uses single quote literals, except test_unicode_content in Lib/sqlite3/test/hooks.py, which uses double quote literals (not ANSI SQL compatible, IIRC). Adapting this test to also use single quote literals makes the sqlite3 test suite compatible with SQLite libraries compiled with SQLITE_DQS=0. See also: - https://sqlite.org/compile.html - https://sqlite.org/quirks.html#dblquote -- components: Tests keywords: easy messages: 393452 nosy: berker.peksag, erlendaasland priority: low severity: normal status: open title: [sqlite3] normalise SQL quoted literals in sqlite3 test suite type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue44108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44106] [sqlite3] don't use politicians in examples/docs
Erlend E. Aasland added the comment: Ditto for Doc/includes/sqlite3/insert_more_people.py -- ___ Python tracker <https://bugs.python.org/issue44106> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44106] [sqlite3] don't use politicians in examples/docs
Erlend E. Aasland added the comment: Berker, the following files are not included by Doc/library/sqlite3.rst: - Doc/includes/sqlite3/countcursors.py - Doc/includes/sqlite3/createdb.py # never referenced by docs - Doc/includes/sqlite3/execsql_fetchonerow.py - Doc/includes/sqlite3/execsql_printall_1.py - Doc/includes/sqlite3/parse_colnames.py - Doc/includes/sqlite3/shared_cache.py - Doc/includes/sqlite3/simple_tableprinter.py All but createdb.py were referenced by doc/usage-guide.txt (pysqlite repo), which was deleted by pysqlite commit 64c9600 (2008-03-24) when pysqlite switched to Sphinx documentation. Can I purge these in PR 26027, or do you want a separate issue/PR for this? -- ___ Python tracker <https://bugs.python.org/issue44106> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44106] [sqlite3] don't use politicians in examples/docs
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24677 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26027 ___ Python tracker <https://bugs.python.org/issue44106> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44106] [sqlite3] don't use politicians in examples/docs
New submission from Erlend E. Aasland : In GH-25003, we rewrote one of the database examples to use programming languages iso. political persons. However, there are still some politicians lurking in the sqlite3 docs. Suggesting to get rid of those as well. See also Berker's comment: https://github.com/python/cpython/pull/25003#discussion_r613135200 -- assignee: docs@python components: Documentation messages: 393439 nosy: berker.peksag, docs@python, erlendaasland, kj priority: normal severity: normal status: open title: [sqlite3] don't use politicians in examples/docs type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44106> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Change by Erlend E. Aasland : -- pull_requests: +24676 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26026 ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction
Erlend E. Aasland added the comment: I believe the former proposed solution is the correct solution. I'm digging though the pysqlite git history (both in the original repo and in CPython), the SQLite changelogs, and different test suites to prove me wrong :) I'm using bpo-44092 to track my findings. -- ___ Python tracker <https://bugs.python.org/issue33376> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44092] [sqlite3] consider removing special rollback handling
Erlend E. Aasland added the comment: Quoting pysqlite commit 5a009ed message (https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722): "Implemented a function that resets all statements in the connection's statement cache. After calling this function it is always possible to rollback a transaction or close a connection." The commit is from 2005-12-09. SQLite 3.7.11 wasn't released until 2012, so in 2005 any pending statements would block a rollback. I'm guessing commit 5a009ed addressed that issue. -- ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()
Erlend E. Aasland added the comment: Grep for SECONDRESET in log.txt to get the complete "API context". As far as I can see, there is no harm in removing the redundant reset statement. -- ___ Python tracker <https://bugs.python.org/issue43350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()
Erlend E. Aasland added the comment: Complete fprintf log added, for reference. -- Added file: https://bugs.python.org/file50033/log.txt ___ Python tracker <https://bugs.python.org/issue43350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()
Erlend E. Aasland added the comment: fprintf debugging patch added, for reference -- Added file: https://bugs.python.org/file50032/fprintf.diff ___ Python tracker <https://bugs.python.org/issue43350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com