[issue43254] Fix *snprintf() man page links

2021-02-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24563 ___ Python tracker <https://bugs.python.org/issu

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Both snprintf and vsnprintf belong to man section 3 (library functions), not section 2 (system calls). Affected doc page: https://docs.python.org/3.10/c-api/conversion.html -- assignee: docs@python components: Documentation messages

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23343 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24562 ___ Python tracker <https://bugs.python.org/issu

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Sounds good to me but I'd say designing APIs relying on call order is bad too > :) Yes, it's too easy to mess up things with this part of the SQLite API :) I'll throw up a PR. BTW (small digression): I re

[issue43251] sqlite3_column_name() failures should call PyErr_NoMemory()

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : AFAICS, the docs for sqlite3_column_name() says that if it returns NULL, we are out of memory, thus we should call PyErr_NoMemory() and bail. FYI, there are the calls to sqlite3_column_name() in Modules/_sqlite//cursor.c Ref: - http://sqlite.org

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : sqlite3_column_bytes() should be called _after_ sqlite3_column_blob(). There two calls to sqlite3_column_blob() are both preceeded by calls to sqlite3_column_bytes(). Currently it does not do any harm, but it is bad API usage. I suggest to fix

[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Should we still fix sqlite3, or wait for an agreement on GH-24510? -- ___ Python tracker <https://bugs.python.org/issue15

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-17 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23341 pull_request: https://github.com/python/cpython/pull/24555 ___ Python tracker <https://bugs.python.org/issue40

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-17 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > This can introduce a performance slowdown and so should wait until the PEP > 620 is accepted. Noted. -- ___ Python tracker <https://bugs.python.org/i

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, Victor. For PySequence_ITEM, I guess adding a private C version (for example _PySequence_Item) and redirecting the macro to the C version would be acceptable. Ditto for PyHeapType_GET_MEMBERS and PyType_SUPPORTS_WEAKREFS

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-16 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23335 pull_request: https://github.com/python/cpython/pull/24553 ___ Python tracker <https://bugs.python.org/issue40

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: For PyExceptionClass_Name: Is it ok to just remove the macro version (like with GH-24548)? -- ___ Python tracker <https://bugs.python.org/issue40

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-16 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23331 pull_request: https://github.com/python/cpython/pull/24548 ___ Python tracker <https://bugs.python.org/issue40

[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue15108> ___ ___ Python-bugs-list mailing list Unsub

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: After GH-24533 and GH-24535, there's (AFAICS) only a handful of cases left. $ grep -r "\->tp_" Include/: Include/internal/pycore_abstract.h:PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; Include/internal/pycore_

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland nosy_count: 7.0 -> 8.0 pull_requests: +23322 pull_request: https://github.com/python/cpython/pull/24535 ___ Python tracker <https://bugs.python.org/issu

[issue43181] Python macros don’t shield arguments

2021-02-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I don't think that PR 24533 should be backported to Python 3.8 and Python > 3.9. I prefer to avoid any risk of regression, and so only change Python 3.10. That sounds reasonable. -- ___ Pyt

[issue43181] Python macros don’t shield arguments

2021-02-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23320 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24533 ___ Python tracker <https://bugs.python.org/issu

[issue43181] Python macros don’t shield arguments

2021-02-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Silence implies consent? I'll throw up a PR, then :) -- ___ Python tracker <https://bugs.python.org/is

[issue43204] Fix LibTom URL's in hashlib comments

2021-02-14 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43210] Fix inaccurate byteswap comment in sha512module.c

2021-02-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Introduced by 1ae035b7e847064d09df01ca62b8a761e9b5aae3 -- ___ Python tracker <https://bugs.python.org/issue43

[issue43210] Fix inaccurate byteswap comment in sha512module.c

2021-02-12 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: Fix inaccurate byteswap comment in sha512.module.c -> Fix inaccurate byteswap comment in sha512module.c ___ Python tracker <https://bugs.python.org/issu

[issue43210] Fix inaccurate byteswap comment in sha512.module.c

2021-02-12 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23305 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24518 ___ Python tracker <https://bugs.python.org/issu

[issue43210] Fix inaccurate byteswap comment in sha512.module.c

2021-02-12 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Include/internal/pycore_bitutils.h is included bco. _Py_bswap64(), not _Py_bswap32(). -- components: Library (Lib) messages: 386873 nosy: christian.heimes, erlendaasland priority: normal severity: normal status: open title: Fix inaccurate

[issue42624] sqlite3 package document mistake

2021-02-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: *error handling => exception emitted -- ___ Python tracker <https://bugs.python.org/issue42624> ___ ___ Python-

[issue42624] sqlite3 package document mistake

2021-02-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: ... and also bpo-16379 -- ___ Python tracker <https://bugs.python.org/issue42624> ___ ___ Python-bugs-list mailin

[issue42624] sqlite3 package document mistake

2021-02-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ref. bpo-24139 -- ___ Python tracker <https://bugs.python.org/issue42624> ___ ___ Python-bugs-list mailing list Unsub

[issue42624] sqlite3 package document mistake

2021-02-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Exception originates from _pysqlite_seterror() in Modules/_sqlite/util.c, line 64: https://github.com/python/cpython/blob/master/Modules/_sqlite/util.c#L64 Error code 1 (SQLITE_ERROR, https://sqlite.org/rescode.html#error) is a generic sqlite3 error

[issue43204] Fix LibTom URL's in hashlib comments

2021-02-12 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23301 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24507 ___ Python tracker <https://bugs.python.org/issu

[issue43204] Fix LibTom URL's in hashlib comments

2021-02-12 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : The comments in Modules/md5module.c, Modules/sha1module.c, Modules/sha256module.c, and Modules/sha512module.c all point to http://libtom.org. However the LibTom website has in fairly recent years been relaunched at https://libtom.net. The old URL

[issue43200] link to copy module in shutil document, not to shutil.copy

2021-02-11 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch nosy: +erlendaasland nosy_count: 2.0 -> 3.0 pull_requests: +23294 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24504 ___ Python tracker <https://bugs.p

[issue43181] Python macros don’t shield arguments

2021-02-11 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Are you interested to convert the PyObject_TypeCheck() macro to a static > inline function? I'd like to give it a shot if it's ok for you all. -- ___ Python tracker <https://bugs.py

[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-02-11 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > If we are going to change public sqlite3 APIs in to be positional-only, I'd > prefer writing a PEP and fix all modules once and for all. Right. I assume you mean that such a PEP would contain a set of guidelines for how to handle the

[issue43181] Python macros don’t shield arguments

2021-02-11 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue43181> ___ ___ Python-bugs-list mailing list Unsub

[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-02-10 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: sqlite3.Connection.set_progress_handler() docs: set_progress_handler(handler, n) impl: set_progress_handler(progress_handler, n) Apart from that, the rest of sqlite3.Connection seems to be ok. There's an ongoing discussion at python-dev abou

[issue40956] Use Argument Clinic in sqlite3

2021-02-10 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23293 pull_request: https://github.com/python/cpython/pull/24503 ___ Python tracker <https://bugs.python.org/issue40

[issue43094] Update sqlite3 docs and docstrings to reflect implementation

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Module level function discrepancies: register_converter(), register_adapter(), and enable_callback_tracebacks() docstrings were unintentionally altered in recent AC updates. Docstrings should be restored. Docs are ok. adapt() is not documented, but

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23282 pull_request: https://github.com/python/cpython/pull/24492 ___ Python tracker <https://bugs.python.org/issue36

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, Charles. I'll give it a shot and see if get can provoke a response :) -- ___ Python tracker <https://bugs.python.org/is

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I believe GH-13216 would be an improvement. I see that your original branch is unavailable, Charles; would you mind if I cherry-picked it and rebased it onto master? The sqlite3 module now requires SQLite >= 3.7.15 which simplifies the change a

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2021-02-09 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- components: +Library (Lib), Windows nosy: +paul.moore, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue42

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-09 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23280 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24489 ___ Python tracker <https://bugs.python.org/issu

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Quoting from Victor Stinner's reply on python-dev (https://mail.python.org/archives/list/python-...@python.org/message/X6SZIVOZ233TLLJV43UQEHMV3ELGP34S/): If there are applications relying on the parameter name, it's better to trust

[issue5846] Deprecate obsolete functions in unittest

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I'm sure Gerhard wouldn't say no to changing the sqlite3 test prefix to "test_"... FYI, the sqlite3 tests have now been cleaned up (GH-20538). Remaining occurrences in Lib/test: Lib/test/test_pdb.py:unittest.makeSuite

[issue43060] Convert _decimal C API from pointer array to struct

2021-02-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: In my opinion, an array of pointers is a bad API; using a struct (like most of the other API's) is an improvement. Ref. discussions on GH-24186 (https://github.com/python/cpython/pull/24186#discussion_r560834060) and bpo-

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2021-02-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Steve, I've put up a PR that prepares the Windows build for this. Would you mind taking a look at it? -- nosy: +steve.dower ___ Python tracker <https://bugs.python.org/is

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-02-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23273 pull_request: https://github.com/python/cpython/pull/24481 ___ Python tracker <https://bugs.python.org/issue40

[issue40956] Use Argument Clinic in sqlite3

2021-02-02 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23236 pull_request: https://github.com/python/cpython/pull/24421 ___ Python tracker <https://bugs.python.org/issue40

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-02 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue43094> ___ ___ Python-bugs-list mailing list Unsub

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue43094> ___ ___ Python-bugs-list mailing list Unsub

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: There's also a discrepancy between the docs and the signature for create_aggregate(): https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_aggregate create_aggregate(name, num_params, aggregate_class) The second paramet

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-02-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23226 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23428 ___ Python tracker <https://bugs.python.org/issu

[issue43009] Port curses capi pointer array to a struct

2021-01-29 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI: I've opened bpo-43060 for the decimal module. -- ___ Python tracker <https://bugs.python.org/issue43009> ___ ___

[issue43060] Convert _decimal C API from pointer array to struct

2021-01-29 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue43060> ___ ___ Python-bugs-list mailing list Un

[issue43060] Convert _decimal C API from pointer array to struct

2021-01-29 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Ref. discussions on bpo-43009 and bpo-41798. -- components: Library (Lib) messages: 385901 nosy: erlendaasland, shihai1991, vstinner priority: normal severity: normal status: open title: Convert _decimal C API from pointer array to struct

[issue43009] Port curses capi pointer array to a struct

2021-01-29 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > +1. IMHO, structure is more directly than pointer array. And there haven't > exposing this pointer array to users(no backward compatibility). Good. I'll open a separate issue and give

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Before removing public documented attribute it should be deprecated. Of course. > […], I have a large patch for removing obsolete version attributes in process. Great! -- ___ Python tracker

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Perhaps we should remove the (pysqlite) version attributes while we're there? Ref. https://mail.python.org/archives/list/python-...@python.org/message/NS6YVA3QCAXELK7KROOLULKXOF3KFFJA/ >>> import sqlite3 >>> sqlite3.vers

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Should we proceed with fixing GC for all heap types before continuing work with bpo-40077? -- ___ Python tracker <https://bugs.python.org/issue42

[issue43009] Port curses capi pointer array to a struct

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: The _decimal API is also just an array of pointers. Should we change that to a struct as well? -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue43

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-21 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Or is it ok to call gc.collect() in the test suite? Seems like it's ok: $ grep -r gc.collect Lib/test | wc -l 366 -- ___ Python tracker <https://bugs.python.org

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-21 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: This works: 1) fully implement GC in connection (bpo-42972) 2) also visit statement_cache 3) explicitly close connections _and_ call GC in problematic tests The first point might not be needed for this particular fix. The last point is a workaround

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-20 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Tried applying bpo-42972 to sqlite and functools, but the error persists. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-01-20 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsub

[issue42048] Document Argument Clinic's defining_class converter

2021-01-20 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I need some help debugging the Windows issues. There are a handful of tests that fail because the sqlite3 is clinging on to objects or file descriptors. AFAICT, a GC bug. For example, test_open_uri fails with: PermissionError: [WinError 32] The

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23041 pull_request: https://github.com/python/cpython/pull/24214 ___ Python tracker <https://bugs.python.org/issue40

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, but I prefer the following: size as maxrows: int(c_default='self->arraysize', py_default='') = 1 -- ___ Python tracker <https://

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I don't see how to easily solve this in AC: we want the arraysize of the cursor instance, but I don't see how I'm going to get this via the AC namespace/context. Using a "bogus" default value works: size as maxrows: int(c

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Looks like this is the culprit: https://github.com/python/cpython/blob/2396614b8958ad202378fd71a598eb4106ac5896/Modules/_sqlite/cursor.c#L825 -- ___ Python tracker <https://bugs.python.org/issue40

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: GH-24007 introduced a regression: >>> import sqlite3 >>> help(sqlite3) Traceback (most recent call last): File "Lib/inspect.py", line 2049, in wrap_value value = eval(s, module_dict) File "", line 1, in N

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-12 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23028 pull_request: https://github.com/python/cpython/pull/24203 ___ Python tracker <https://bugs.python.org/issue42

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I do not like using _functools._lru_cache_wrapper. It is a deep > implementation detail, private function of private module. Use > functools.lru_cache. All right, thanks. -- ___ Python tracke

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: True that :) I'll close GH-24135 for now and open a PR for this later today. -- ___ Python tracker <https://bugs.python.org/is

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I don't see any reason to merge GH-24135 if we are going to remove cache.[ch] > in this issue. Yes, I've thought about that myself. A small argument pro merging GH-24135 would be that if we for some reason decide to revert this cha

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I can throw up the PoC branch as a draft PR after GH-24135 is merged. We can just close the PR if this is uninteresting or something we want to postpone. -- ___ Python tracker <https://bugs.python.

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-11 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23021 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24135 ___ Python tracker <https://bugs.python.org/issu

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2021-01-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23002 pull_request: https://github.com/python/cpython/pull/24175 ___ Python tracker <https://bugs.python.org/issue1635

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: $ python3.10 -m timeit -s 'import sqlite3; con = sqlite3.connect(":memory:"); query="select * from sqlite_master"' 'con.execute(query); con.execute(query)' 10 loops, best of 5: 2.95 usec per loop $ ./pyth

[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2021-01-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22997 pull_request: https://github.com/python/cpython/pull/24170 ___ Python tracker <https://bugs.python.org/issue24

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ah, thanks! I also found that info in the docs: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_free -- ___ Python tracker <https://bugs.python.org/issue42

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ref. https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_HAVE_GC -- ___ Python tracker <https://bugs.python.org/issue42

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Don't you need to free memory using PyObject_GC_Del when you allocate using PyObject_GC_New? -- ___ Python tracker <https://bugs.python.org/is

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thank you so much for taking the time to write these blog posts, Victor, and for explaining your fixes is such great detail. It is very helpful! -- ___ Python tracker <https://bugs.python.org/issue42

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Short diffstat: 8 files changed, 85 insertions(+), 406 deletions(-) -- ___ Python tracker <https://bugs.python.org/issue42

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-07 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Pro: less code, less complexity, improved maintainability Con: minor performance hit PoC here: https://github.com/erlend-aasland/cpython/commits/sqlite-cache $ ./python.exe >>> import sqlite3 >>> con = sqlite3.connect(":me

[issue42846] Using _multibytecodec module on Windows, test_threading/embed get failure

2021-01-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: It should be sufficient to convert cjkcodecs.h to multi-phase init then? From what I can see, the support modules are state less, right? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42846] Using _multibytecodec module on Windows, test_threading/embed get failure

2021-01-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I'm unable to reproduce this on Windows 10 (amd64). What's your exact locale setting? Are you compiling with HEAD at 0b858cdd5d114f0890b11b6c4d6559d0ceb468ab? -- ___ Python track

[issue10572] Move test sub-packages to Lib/test

2021-01-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22976 pull_request: https://github.com/python/cpython/pull/24148 ___ Python tracker <https://bugs.python.org/issue10

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +22975 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24147 ___ Python tracker <https://bugs.python.org/issu

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Indeed it is. I'll create a PR as soon as GH-20538 is merged. -- ___ Python tracker <https://bugs.python.org/is

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : GitHub does not play well with other file encodings than UTF-8. For example, when the "suggestion" in https://github.com/python/cpython/pull/20538#discussion_r552926126 was applied, GitHub silently converted Lib/sqlite3/test/types.py fro

[issue40956] Use Argument Clinic in sqlite3

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22965 pull_request: https://github.com/python/cpython/pull/24135 ___ Python tracker <https://bugs.python.org/issue40

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Sorry, I've been doing it. They're just slow because I'm getting OpenSSL done > at the same time and they both keep causing merge conflicts. No problem. I noticed that, so I abo

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Steve Dower, do you mind if I create backports for the Windows build as well? -- resolution: -> fixed status: open -> pending ___ Python tracker <https://bugs.python.org/i

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22960 pull_request: https://github.com/python/cpython/pull/24130 ___ Python tracker <https://bugs.python.org/issue42

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22959 pull_request: https://github.com/python/cpython/pull/24129 ___ Python tracker <https://bugs.python.org/issue42

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22958 pull_request: https://github.com/python/cpython/pull/24128 ___ Python tracker <https://bugs.python.org/issue41

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ned Deily, can you fix the macOS backports? -- ___ Python tracker <https://bugs.python.org/issue42584> ___ ___ Pytho

<    1   2   3   4   5   6   7   >