Erlend Egeberg Aasland added the comment:
BTW, slightly related, AFAICT:
-
https://github.com/python/cpython/blob/e047239eafefe8b19725efffe7756443495cf78b/Objects/typeobject.c#L4620-L4668
- bpo-24912
--
___
Python tracker
<https://bugs.python.
Erlend Egeberg Aasland added the comment:
Guido, I’ll prepare a separate PR for all converted built-in types, and you can
decide what to do with it when consensus is reached :) There are approx. ~90 of
these types. Not all of them are added to their respective module dicts though,
but I
Erlend Egeberg Aasland added the comment:
Victor, I've updated PR 25520 so PyType_Ready always sets Py_TPFLAGS_IMMUTABLE
for static types.
--
___
Python tracker
<https://bugs.python.org/is
Change by Erlend Egeberg Aasland :
--
pull_requests: +24238
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25520
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
> Erland, could you turn your patch into PR?
Certainly, but despite the issue title, this issue mentions all types that have
been converted to heap types. Should we apply the new immutable flag to _all_
heap types in the stdlib?
Guido:
> I
Erlend Egeberg Aasland added the comment:
FWIW, I was the one who converted arraymodule to use heap types in
75bf107c62fbdc00af51ee4f6ab69df4bd201104 (GH-23124) in January. Sorry 'bout the
accidental change of behaviour.
> I think we may need a new flag bit meaning "built-in ty
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43908>
___
___
Python-bugs-list mailing list
Unsub
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsub
Erlend Egeberg Aasland added the comment:
Should we mention PEP 652 in Include/README.rst, now that the PEP is accepted?
--
___
Python tracker
<https://bugs.python.org/issue43
Erlend Egeberg Aasland added the comment:
SQLite 3.35.5 is out today. Let's wait until next weekend and see if fossil and
forum is quiet. If they are, I'll open PRs for the installers.
https://www.sqlite.org/releaselog/3_35_5.html
--
title: Upgrade to SQLite 3.35.4 in
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
nosy_count: 3.0 -> 4.0
pull_requests: +24168
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25438
___
Python tracker
<https://bugs.python.org/i
Erlend Egeberg Aasland added the comment:
> This issue is about C extension modules which don't use the Python memory
> allocator.
Yes, I know. Your proposal in msg328533 is to continue the implementation of
bpo-18227:
> _sqlite: call sqlite3_config(SQLITE_CONFIG_MALLOC
Change by Erlend Egeberg Aasland :
Added file: https://bugs.python.org/file49963/patch-with-simple-msize.diff
___
Python tracker
<https://bugs.python.org/issue35
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
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:
I've updated my PR to use PyTuple_Pack. Nice reduction in code size. Thanks,
Mark!
--
___
Python tracker
<https://bugs.python.org/is
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:
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
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
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
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: +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 :
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 :
--
nosy: +berker.peksag
___
Python tracker
<https://bugs.python.org/issue43851>
___
___
Python-bugs-list mailing list
Unsub
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 :
--
keywords: +patch
pull_requests: +24145
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25413
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
BTW, is SQLITE_WITHOUT_ZONEMALLOC still needed for macOS?
--
___
Python tracker
<https://bugs.python.org/issue43
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:
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
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
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:
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
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:
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:
I agree, Steve.
--
___
Python tracker
<https://bugs.python.org/issue43492>
___
___
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
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43800>
___
___
Python-bugs-list mailing list
Unsub
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
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
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:
+1
--
___
Python tracker
<https://bugs.python.org/issue43779>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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:
Yes, I'll do that.
--
___
Python tracker
<https://bugs.python.org/issue43779>
___
___
Python-bugs-list m
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
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
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
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
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:
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:
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:
> 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:
> 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
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
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 :
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
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.
--
__
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:
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
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
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
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
&
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
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:
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
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:
Adding Serhiy, who added the code in question in commit
e9b51c0ad81da1da11ae65840ac8b50a8521373c (GH-10320, bpo-26660, bpo-35144).
--
nosy: +erlendaasland, serhiy.storchaka
___
Python tracker
<ht
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
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
Erlend Egeberg Aasland added the comment:
Can this be closed, Serhiy?
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue41638>
___
___
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:
> 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:
> 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:
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:
Terry, I've created GH-25003 based on your suggested changes.
--
___
Python tracker
<https://bugs.python.org/is
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:
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.
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:
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
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: '
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43447>
___
___
Python-bugs-list mailing list
Unsub
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
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:
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:
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
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:
> _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
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:
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:
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
Change by Erlend Egeberg Aasland :
Added file: https://bugs.python.org/file49877/macros-that-reuse-args.txt
___
Python tracker
<https://bugs.python.org/issue43
Change by Erlend Egeberg Aasland :
Removed file: https://bugs.python.org/file49876/macros-that-reuse-args.txt
___
Python tracker
<https://bugs.python.org/issue43
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.
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:
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
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
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 :
--
keywords: +patch
pull_requests: +23637
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24875
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
Should we try to split all macros like that, if possible?
--
___
Python tracker
<https://bugs.python.org/issue43
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
101 - 200 of 656 matches
Mail list logo