[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2019-10-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I've prepared a PR for https://github.com/python/cpython-source-deps at https://github.com/erlend-aasland/cpython-source-deps/tree/upgrade-sqlite. Patches for Windows and macOS installer builds on 3.9 prepared at https://github.com/erlend-aa

[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2019-10-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: bpo-38380: Update macOS installer to use SQLite 3.30.0 https://github.com/erlend-aasland/cpython/commit/aa7d7b1a3bed9a6a73f0611d0542a3442e85b0b6 -- keywords: +patch Added file: https://bugs.python.org/file48651/0001-bpo-38380-Update-macOS

[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2019-10-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: bpo-38380: Update Windows builds to use SQLite 3.30.0 https://github.com/erlend-aasland/cpython/commit/e25214e6fa7a64353d9c3e16b139c41f5d62eb31 -- Added file: https://bugs.python.org/file48652/0002-bpo-38380-Update-Windows-builds-to-use

[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2019-10-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI: Compiled cpython 3.9 with sqlite-3.30 on macOS 10.14.6. Make test completes without errors. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2019-10-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Update: Tested on macOS 10.14.6 with make test on 2.7.17rc1, 3.7.5rc1+, 3.8.0rc1+. -- ___ Python tracker <https://bugs.python.org/issue38

[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

2021-03-11 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: $ python -m pyperf compare_to -G main.json patched.json Faster (1): - bind: 63.6 us +- 1.2 us -> 61.8 us +- 0.9 us: 1.03x faster $ git diff --shortstat master 1 file changed, 41 insertions(+), 74 deletions(-) -- keywords: +patch Added f

[issue43492] Upgrade to SQLite 3.35.0 in macOS and Windows

2021-03-14 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : SQLite 3.35.0 was released a couple of days ago: https://www.sqlite.org/releaselog/3_35_0.html Suggesting to hold off for a week or two, to see if a bug-fix release happens. -- components: Windows, macOS messages: 388685 nosy

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

2021-03-14 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: See bpo-43492 for upgrading the macOS & Windows installers to SQLite 3.35.0. -- ___ Python tracker <https://bugs.python.org/iss

[issue43181] Python macros don’t shield arguments

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > As I wrote previously, I dislike macros. If someone is changed, I would > prefer to convert the function into a static inline function which doesn't > have macros pitfalls. Should we create a meta issue for this? Most macros are tr

[issue1103350] send/recv SEGMENT_SIZE should be used more in socketmodule

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI, the SEGMENT_SIZE define was removed by af01f668173d4061893148b54a0f01b91c7716c2 (bpo-16136). -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue1103

[issue12777] Inconsistent use of VOLUME_NAME_* with GetFinalPathNameByHandle

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: This seems to have been fixed in 2018 in bpo-33016 by GH-6010. -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue12

[issue15698] PEP 3121, 384 Refactoring applied to pyexpat module

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Fixed by GH-2. -- nosy: +erlendaasland, vstinner ___ Python tracker <https://bugs.python.org/issue15698> ___ ___

[issue43181] Python macros don’t shield arguments

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > If possible, I would prefer to only replace macros with static inline > functions if the changes avoids clear macro pitfalls. Yes, of course. Should I create a meta issue for this, or do you prefer raising one issue p

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-15 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Convert macros to static inline functions if...: - the macro contains a clear pitfall (for example "duplication of side effects") - the fix is trivial - the macro is not used as an l-value (for example Py_TYPE()) See also: - https://g

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Should we try to split all macros like that, if possible? -- ___ Python tracker <https://bugs.python.org/issue43

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

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

[issue43416] Add README files in Include/cpython and Include/internal

2021-03-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch nosy: +erlendaasland nosy_count: 3.0 -> 4.0 pull_requests: +23643 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24884 ___ Python tracker <https://bugs.p

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

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

[issue43492] Upgrade to SQLite 3.35.1 in macOS and Windows

2021-03-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Bug-fix release 3.35.1 is out bco. https://sqlite.org/src/info/1c24a659e6d7f3a1 -- title: Upgrade to SQLite 3.35.0 in macOS and Windows -> Upgrade to SQLite 3.35.1 in macOS and Windows ___ Python trac

[issue43505] [sqlite3] Explicitly initialise and shut down sqlite3

2021-03-15 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : We should explicitly initialise (and shut down) the SQLite library in the sqlite3 module. This may be required in future releases: Quoting from the SQLite docs: "For maximum portability, it is recommended that applications always i

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Under Include/, including subdirectories, there are 88 macros that reuse arguments. -- Added file: https://bugs.python.org/file49876/macros-that-reuse-args.txt ___ Python tracker <https://bugs.python.

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : Removed file: https://bugs.python.org/file49876/macros-that-reuse-args.txt ___ Python tracker <https://bugs.python.org/issue43

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : Added file: https://bugs.python.org/file49877/macros-that-reuse-args.txt ___ Python tracker <https://bugs.python.org/issue43

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: PyUnicode_WRITE, PyUnicode_READ, and PyUnicode_READ_CHAR all reuse their arguments, and there's a lot of occurrences (58 AFAICS) where they are called with the increment operator applied to the index argument. For example: Objects/unicodeobj

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-17 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Pablo: > I agree we should be careful here. There are several things to consider: Yes, and thanks for your thorough reply and insights. I do not suggest converting macros blindly, and I have no intention of doing so. Apart from the three PyUnico

[issue43492] Upgrade to SQLite 3.35.2 in macOS and Windows

2021-03-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Bug-fix release 3.35.2 is out: https://www.sqlite.org/releaselog/3_35_2.html Let's wait until end of March before updating the installers. -- title: Upgrade to SQLite 3.35.1 in macOS and Windows -> Upgrade to SQLite 3.35.2 in m

[issue35056] Test leaks of memory not managed by Python allocator

2021-03-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > _sqlite: call sqlite3_config(SQLITE_CONFIG_MALLOC, pMem) to use > PyMem_RawMalloc() SQLite requires the xSize member of sqlite3_mem_methods to be implemented for this to work, so we'd have to implement msize(). The msize() idea seems to

[issue43553] [sqlite3] Improve test coverage

2021-03-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Attached patch improves the code coverage of the sqlite3 module. I've used llvm-cov for coverage measurement. I'll create a PR for this, if you're fine with this, Berker/Serhiy. Filename RegionsMissed Re

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI, thread started on https://discuss.python.org/t/what-to-do-with-unsafe-macros/7771?u=erlendaasland -- ___ Python tracker <https://bugs.python.org/issue43

[issue43492] Upgrade to SQLite 3.35.2 in macOS and Windows

2021-03-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: SQLite 3.35.3 is upcoming: https://sqlite.org/forum/forumpost/6e2b05ad62?t=h Seems like we'll have to wait a little bit for 3.35 to stabilise. -- ___ Python tracker <https://bugs.python.org/is

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-20 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Based on the feedback, I'm closing this. The PyUnicode_* macros, or the callers, can be fixed in a separate issue. -- resolution: -> wont fix stage: patch review -> resolved status: ope

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

2021-03-21 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Closing, as the C API was removed in GH-24960. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43447] Generate vectorcall code to parse arguments using Argument Clinic

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

[issue43591] Parser aborts on incomplete/incorrect unicode literals in interactive mode

2021-03-22 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Incomplete unicode literals abort iso. generating SyntaxError: (lldb) target create "./python.exe" Current executable set to '/Users/erlendaasland/src/cpython.git/python.exe' (x86_64). (lldb) r Process 98955 launched: '

[issue43591] Parser aborts on incomplete/incorrect unicode literals in interactive mode

2021-03-22 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Correction, git bisect pointed to _this_ commit (not 08fb8ac99ab03d767aa0f1cfab3573eddf9df018): commit cd8dcbc851fcc312722cdb5544c2f25cf46b3f8a Author: Pablo Galindo Date: Sun Mar 14 04:38:40 2021 +0100 bpo-43410: Fix crash in the parser when

[issue43591] Parser aborts on incomplete/incorrect unicode literals in interactive mode

2021-03-22 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, Pablo! -- ___ Python tracker <https://bugs.python.org/issue43591> ___ ___ Python-bugs-list mailing list Unsub

[issue43492] Upgrade to SQLite 3.35.3 in macOS and Windows

2021-03-22 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI: https://www.sqlite.org/cgi/src/info/8de4cb984a4b019f: "We anticipate 3.35.3 in a few days. Hopefully there will never be a need for 3.35.4." -- title: Upgrade to SQLite 3.35.2 in macOS and Windows -> Upgrade to SQLite 3.

[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-03-23 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch nosy: +erlendaasland nosy_count: 6.0 -> 7.0 pull_requests: +23761 pull_request: https://github.com/python/cpython/pull/25003 ___ Python tracker <https://bugs.python.org/issu

[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-03-23 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Terry, I've created GH-25003 based on your suggested changes. -- ___ Python tracker <https://bugs.python.org/is

[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Attached is a patch that auto-detects R*Tree support. Tested on macOS only, but I'd guess it should work fine on any OS. -- Added file: https://bugs.python.org/file49914/patch.diff ___ Python tr

[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-03-26 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I'd prefer writing a PEP and fix all modules once and for all. Berker, I started drafting a PEP. Would you be interested in helping? -- ___ Python tracker <https://bugs.python.org

[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-03-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Of course! I may be not be able to respond to you quickly in the next few > weeks, though. Thank you! I'll send you a preliminary version sometime this week. -- ___ Python trac

[issue43492] Upgrade to SQLite 3.35.4 in macOS and Windows

2021-03-31 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Quoting Dr. R. Hipp: "There will be a fix called version 3.35.4" https://sqlite.org/forum/forumpost/7dbf046041519a07a0a083b8346a7d0ecb7d6fc4eca5ca23605eeb4452109d91 -- title: Upgrade to SQLite 3.35.3 in macOS and Windows -> Upgr

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2021-04-01 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Can this be closed, Serhiy? -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue41638> ___ ___

[issue43700] Replace Zulip badge with Discourse badge in README

2021-04-01 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Suggesting to follow the dev guide and replace the Zulip badge with a Discourse badge in README.rst. Quoting the dev guide, section 2.4. Zulip: "This is no longer actively monitored by core devs. Consider asking your questions on Discourse

[issue43700] Replace Zulip badge with Discourse badge in README

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

[issue43707] onerror in tempfile has an invalid raise expression

2021-04-02 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Adding Serhiy, who added the code in question in commit e9b51c0ad81da1da11ae65840ac8b50a8521373c (GH-10320, bpo-26660, bpo-35144). -- nosy: +erlendaasland, serhiy.storchaka ___ Python tracker <ht

[issue20626] Manager documentation unclear about lists and thread safeness

2021-04-04 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: 1. A link was added in commit 86a76684269f940a20366cb42668f1acb0982dca 2. The Programming Guidelines mentions thread safety of proxies: https://docs.python.org/3/library/multiprocessing.html#programming-guidelines Can this be closed

[issue43730] Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/" question?

2021-04-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Quoting https://docs.python.org/3.10/tutorial/controlflow.html#positional-only-parameters: "Positional-only parameters are placed before a / (forward-slash). The / is used to logically separate the positional-only parameters from the rest o

[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

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

[issue22538] turtledemo two_canvases reversion

2021-04-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI, the running the two_canvases example from turtledemo works fine with Python 3.10 on macOS. -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue22

[issue23470] OpenBSD buildbot uses wrong stdlib

2021-04-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Is the OpenBSD buildbot still active? If no, this issue can be closed. (I can't find the OpenBSD buildbot on https://buildbot.python.org/all/#/) -- nosy: +erlendaasland ___ Python tracker &

[issue43752] [sqlite3] Fetching an empty value from date column raises ValueError

2021-04-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: Fetching an empty value from date column crashes on SQLite. -> [sqlite3] Fetching an empty value from date column raises ValueError ___ Python tracker <https://bugs.python.org/issu

[issue43752] [sqlite3] Fetching an empty value from date column raises ValueError

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

[issue43752] [sqlite3] Fetching an empty value from date column raises ValueError

2021-04-06 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks for the report and the test case! :) Regression was introduced by e161ec5dd7ba9355eb06757b9304019ac53cdf69, where it was assumed that the handling of zero-sized blobs should be consistent. Unfortunately, the handling of zero-sized blobs is

[issue43752] [sqlite3] Fetching an empty value from date column raises ValueError

2021-04-06 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: BTW, you might be interested in this bpo, Mariusz: bpo-43553 -- ___ Python tracker <https://bugs.python.org/issue43

[issue43752] [sqlite3] Fetching an empty value from date column raises ValueError

2021-04-06 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Zero-sized blobs _with_ converters must return None; zero-sized blobs > _without_ converters must return b"". Maybe the docs should be updated to reflect this inconsistency. -- __

[issue43762] Add audit events for loading of sqlite3 extensions

2021-04-07 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : If Python is configured with --enable-loadable-sqlite-extensions, it is possible to load third party SQLite extensions (shared libraries/DLL’s) via the sqlite3 extension module. When enabled, the sqlite3.Connection.enable_load_extension() class

[issue43762] Add audit events for loading of sqlite3 extensions

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

[issue43763] [sqlite3] Use SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION iso. sqlite3_enable_load_extension()

2021-04-07 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Quoting from the SQLite docs: "It is recommended that extension loading be enabled using the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method rather than this interface, so the load_extension() SQL function remains disabled. This will preven

[issue43763] [sqlite3] Use SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION iso. sqlite3_enable_load_extension()

2021-04-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > We could add an optional argument for also enabling the SQL function. Actually, using sqlite3_db_config(SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, ...) can only enable the C API, not the SQL API, so adding an optional argument to sqli

[issue43763] [sqlite3] Use SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION iso. sqlite3_enable_load_extension()

2021-04-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Suggesting to make sqlite3.Connection.enable_load_extension a module level > function This actually needs to be a sqlite3.Connection method, thus altering the behaviour of the current fu

[issue43763] [sqlite3] Use SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION iso. sqlite3_enable_load_extension()

2021-04-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Attached patch alters the behaviour of sqlite3.Connection.enable_load_extension() to never enabling the SQL API. This may require a deprecation period and a warning since it's a change in behaviour, but since enable_load_extention() is not en

[issue35889] sqlite3.Row doesn't have useful repr

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: AFAICS, this is fixed by the attached one-liner, based on Serhiy's suggestion (based on Raymond's suggestion). $ python3.10 test.py $ ./python.exe test.py # patch applied $ cat test.py import sqlite3 cx = sqlite3.connec

[issue35889] sqlite3.Row doesn't have useful repr

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Even better, let's keep Row as it is and just add this as an example in the docs. If a verbose repr is needed, it's easy to override __repr__. -- ___ Python tracker <https://bugs.python.o

[issue35889] sqlite3.Row doesn't have useful repr

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Suggesting to either close this or add an example to the docs. Up to Berker / Serhiy. -- Added file: https://bugs.python.org/file49942/patch.diff ___ Python tracker <https://bugs.python.org/issue35

[issue43779] Fix possible _PyArena_AddPyObject ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : _PyArena_AddPyObject() only steals the object reference if successful. - In Parser/pegen.c, _PyPegen_fill_token(), the return value is not checked at all. - In Parser/asdl_c.py, none of the (two) calls to _PyArena_AddPyObject() decref on failure

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: Fix possible _PyArena_AddPyObject ref leaks -> Fix possible parser/AST ref leaks ___ Python tracker <https://bugs.python.org/issu

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ah, I see that the Parser/asdl_c.py case is handled by the callers. So that leaves only Parser/pegen.c. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Yes, I'll do that. -- ___ Python tracker <https://bugs.python.org/issue43779> ___ ___ Python-bugs-list m

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24024 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25289 ___ Python tracker <https://bugs.python.org/issu

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: We could also adjust Parser/asdl_c.py to decref right after a failed _PyArena_AddPyObject() call, instead of goto failure and Py_XDECREF. I'm not sure it's worth it though. -- Added file: https://bugs.python.org/file49944/p

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: +1 -- ___ Python tracker <https://bugs.python.org/issue43779> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24030 pull_request: https://github.com/python/cpython/pull/25294 ___ Python tracker <https://bugs.python.org/issue43

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I'd also prefer a Py_IsNotNone() because it's more explicit than !Py_IsNone(); the exclamation mark can be easily missed when reading/writing code, IMO. Just my 2 cents. -- nosy: +erlendaasland

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I would prefer keep the C API small. Yes, I see the value of that as well. I tried applying this API on an extension, and I found the code to be slightly less readable for the "is no

[issue43800] os.fwalk is not exposed on macOS

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

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

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

[issue43492] Upgrade to SQLite 3.35.4 in macOS and Windows

2021-04-12 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I agree, Steve. -- ___ Python tracker <https://bugs.python.org/issue43492> ___ ___ Python-bugs-list mailing list Unsub

[issue43831] sqlite: convert_timestamp raises ValueError for empty columns

2021-04-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Hi Lumír, thank you for your report. This is a duplicate of bpo-43752. The bugfix currently is awaiting review, and will be included in python3.10b1 (expected in approx. three weeks). -- nosy: +berker.peksag, erlendaasland

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-14 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Raymond: > 1) move the expensive get_functools_state_by_type() inside the code block > that creates new links, so that it won't affect a full cache. This should be as easy as adding a _functools_state pointer to struct lru_cache_object

[issue43492] Upgrade to SQLite 3.35.4 in macOS and Windows

2021-04-14 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Looks like there might be a 3.35.5 release in the near future: https://sqlite.org/forum/forumpost/d36426225c?t=h -- ___ Python tracker <https://bugs.python.org/issue43

[issue43505] [sqlite3] Explicitly initialise and shut down sqlite3

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

[issue43505] [sqlite3] Explicitly initialise and shut down sqlite3

2021-04-14 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Making SQLITE_OMIT_AUTOINIT the default behavior would pretty much break > every application that use SQLite [...] Yeah, I know, _but_ if some user decides use a SQLite library compiled with SQLITE_OMIT_AUTOINIT (because it is mentioned

[issue43296] [sqlite3] Fix sqlite3_value_blob() usage

2021-04-14 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, Berker! I'll add separate issues for sqlite3_value_text() and the missing PyTuple_SetItem() error checks. -- ___ Python tracker <https://bugs.python.org/is

[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-14 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : We should apply some of the recommended "optimisation" compile-time options[1] to the SQLite builds for the macOS and Windows installers. The following options should be safe to apply: - SQLITE_DEFAULT_MEMSTATUS=0 - SQLITE_LIKE_DOESNT_M

[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-14 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: BTW, is SQLITE_WITHOUT_ZONEMALLOC still needed for macOS? -- ___ Python tracker <https://bugs.python.org/issue43

[issue43851] Optimise SQLite builds on macOS and Windows

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

[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-14 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24146 pull_request: https://github.com/python/cpython/pull/25414 ___ Python tracker <https://bugs.python.org/issue43

[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-14 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +berker.peksag ___ Python tracker <https://bugs.python.org/issue43851> ___ ___ Python-bugs-list mailing list Unsub

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : All but one of the PyTuple_SetItem() calls are executed without checking the return value. Callers: $ grep -r PyTuple_SetItem Modules/_sqlite Modules/_sqlite/connection.c:PyTuple_SetItem(args, i, cur_py_value); Modules/_sqlite/cursor.c

[issue43852] [sqlite3] Harden tuple creation

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

[issue43853] [sqlite] Fix sqlite3_value_text() usage

2021-04-15 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Fix sqlite3_value_text() usage: - Raise MemoryError if sqlite3_value_text() sets SQLITE_NOMEM - Let PyUnicode_FromStringAndSize() errors propagate Quoting the SQLite docs: "As long as the input parameter is correct, these routines can only fa

[issue43853] [sqlite] Fix sqlite3_value_text() usage

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

[issue43853] [sqlite3] Fix sqlite3_value_text() usage

2021-04-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: [sqlite] Fix sqlite3_value_text() usage -> [sqlite3] Fix sqlite3_value_text() usage ___ Python tracker <https://bugs.python.org/issu

[issue35056] Test leaks of memory not managed by Python allocator

2021-04-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Victor, Serhiy: Would this issue be "large" or important enough to re-raise the debate about implementing an msize() function in the PyMem_ API, or is it not worth it? I guess no; it has been discussed numerous times before. Else, I ca

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Yes, the _pysqlite_query_execute() case might be cleaner. But I was under the impression that using PyTuple_Pack() was significantly slower. Correct me if I'm wrong. -- ___ Python tracker &

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I've updated my PR to use PyTuple_Pack. Nice reduction in code size. Thanks, Mark! -- ___ Python tracker <https://bugs.python.org/is

[issue43852] [sqlite3] Improve tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: [sqlite3] Harden tuple creation -> [sqlite3] Improve tuple creation ___ Python tracker <https://bugs.python.org/issu

[issue35056] Test leaks of memory not managed by Python allocator

2021-04-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: The msize() talk is referring to msg389039 and msg328533. If we are to use Python memory allocators for the sqlite3 extension module, we need some sort of msize() function; overriding SQLite's memory functions requires msize() su

  1   2   3   4   5   6   7   >