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
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
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
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
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
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
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
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
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
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
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
Erlend Egeberg Aasland added the comment:
Fixed by GH-2.
--
nosy: +erlendaasland, vstinner
___
Python tracker
<https://bugs.python.org/issue15698>
___
___
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
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
Erlend Egeberg Aasland added the comment:
Should we try to split all macros like that, if possible?
--
___
Python tracker
<https://bugs.python.org/issue43
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
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
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
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
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
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.
Change by Erlend Egeberg Aasland :
Removed file: https://bugs.python.org/file49876/macros-that-reuse-args.txt
___
Python tracker
<https://bugs.python.org/issue43
Change by Erlend Egeberg Aasland :
Added file: https://bugs.python.org/file49877/macros-that-reuse-args.txt
___
Python tracker
<https://bugs.python.org/issue43
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
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
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
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
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
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
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
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
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
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43447>
___
___
Python-bugs-list mailing list
Unsub
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: '
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
Erlend Egeberg Aasland added the comment:
Thanks, Pablo!
--
___
Python tracker
<https://bugs.python.org/issue43591>
___
___
Python-bugs-list mailing list
Unsub
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.
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
Erlend Egeberg Aasland added the comment:
Terry, I've created GH-25003 based on your suggested changes.
--
___
Python tracker
<https://bugs.python.org/is
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
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
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
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
Erlend Egeberg Aasland added the comment:
Can this be closed, Serhiy?
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue41638>
___
___
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
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
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
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
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
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
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
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
&
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
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
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
Erlend Egeberg Aasland added the comment:
BTW, you might be interested in this bpo, Mariusz: bpo-43553
--
___
Python tracker
<https://bugs.python.org/issue43
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.
--
__
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
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
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
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
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
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
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
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
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
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
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
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
Erlend Egeberg Aasland added the comment:
Yes, I'll do that.
--
___
Python tracker
<https://bugs.python.org/issue43779>
___
___
Python-bugs-list m
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
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
Erlend Egeberg Aasland added the comment:
+1
--
___
Python tracker
<https://bugs.python.org/issue43779>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Erlend Egeberg Aasland :
--
pull_requests: +24030
pull_request: https://github.com/python/cpython/pull/25294
___
Python tracker
<https://bugs.python.org/issue43
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
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
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43800>
___
___
Python-bugs-list mailing list
Unsub
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43795>
___
___
Python-bugs-list mailing list
Unsub
Erlend Egeberg Aasland added the comment:
I agree, Steve.
--
___
Python tracker
<https://bugs.python.org/issue43492>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
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
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
Erlend Egeberg Aasland added the comment:
BTW, is SQLITE_WITHOUT_ZONEMALLOC still needed for macOS?
--
___
Python tracker
<https://bugs.python.org/issue43
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
Change by Erlend Egeberg Aasland :
--
pull_requests: +24146
pull_request: https://github.com/python/cpython/pull/25414
___
Python tracker
<https://bugs.python.org/issue43
Change by Erlend Egeberg Aasland :
--
nosy: +berker.peksag
___
Python tracker
<https://bugs.python.org/issue43851>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
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
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
&
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
Change by Erlend Egeberg Aasland :
--
title: [sqlite3] Harden tuple creation -> [sqlite3] Improve tuple creation
___
Python tracker
<https://bugs.python.org/issu
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 - 100 of 656 matches
Mail list logo