Change by Erlend E. Aasland :
--
pull_requests: +28692
pull_request: https://github.com/python/cpython/pull/30489
___
Python tracker
<https://bugs.python.org/issue46
Change by Erlend E. Aasland :
--
title: [sqlite3] move set lastrowid out of the query loop and enable it for
executemany() -> [sqlite3] lastrowid improvements
___
Python tracker
<https://bugs.python.org/issu
New submission from Erlend E. Aasland :
Providing some more background, based on the changes proposed by Kumar in
GH-30486:
asyncio.get_event_loop() was marked as deprecated in Python 3.10. Quoting from
the asyncio documentation ,
https://docs.python.org/3/library/asyncio-eventloop.html (as
Erlend E. Aasland added the comment:
Kumar, did you consider using get_running_loop() to retrieve the event loop in
the current thread, instead of creating a new one?
--
___
Python tracker
<https://bugs.python.org/issue46
Erlend E. Aasland added the comment:
FTR, a rough grep for other users of get_event_loop in Lib/test (some false
positives):
```
$ grep -rE "\" Lib/test
Lib/test/test_contextlib_async.py:loop =
asyncio.get_event_loop_policy().get_event_loop()
Lib/test/te
Erlend E. Aasland added the comment:
> I think there is no reason to replace all occurrences where get_event_loop()
> works fine.
+1
I provided the grep for information only, hence FTR (for the record).
--
___
Python tracker
Erlend E. Aasland added the comment:
> get_event_loop() is deprecated when there is no running event loop.
Yes, I see that now. So using asyncio.new_event_loop instead makes sense.
--
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
I recon this can be closed now?
--
nosy: +erlendaasland
status: open -> pending
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
> Is 0 a valid row ID in SQLite ? If not, then I guess this would be
> an alternative to None as suggested by the DB-API.
Yes. Any 64 bit signed integer value is a valid row id in SQLite.
> If it is a valid row ID, I'd suggest to go back t
Erlend E. Aasland added the comment:
> OTOH, the SQLite API is tied to the _connection_ object, so it may not make
> sense to align it with lastrowid which is a _cursor_ attribute.
That came out weird; let's try again:
The SQLite API is tied to the _connection_ object, so it m
Erlend E. Aasland added the comment:
> You don't know on which cursor the last row was inserted [...]
SQLite has no concept of cursors :)
> It also seems that the function really only works for INSERTs and
> not for UPDATEs.
Yes, hence it's name: sqlite3_last_insert_rowid
Change by Erlend E. Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Erlend E. Aasland added the comment:
> This fixes the problems I was seeing, thanks.
Good; removing release blocker status. Keeping this open until Mark has added a
NEWS item.
--
nosy: +erlendaasland
priority: release blocker ->
___
Erlend E. Aasland added the comment:
FYI, you can already do this using the URI option:
cx = sqlite3.connect("file:test.db?mode=rw", uri=True)
--
___
Python tracker
<https://bugs.python.o
Erlend E. Aasland added the comment:
See also bpo-24887.
--
___
Python tracker
<https://bugs.python.org/issue46402>
___
___
Python-bugs-list mailing list
Unsub
Erlend E. Aasland added the comment:
IMO, the URI "API" is not very pythonic; I have to look up the format every
time I'm using it.
OTOH, introducing flags, or keywords, for every option will add a lot of code.
--
___
Python
Erlend E. Aasland added the comment:
OTOH, implementing an API similar to apsw (adding a flags keyword) would make
it easier for users to switch between that and the stdlib sqlite3.
--
___
Python tracker
<https://bugs.python.org/issue46
Erlend E. Aasland added the comment:
I guess we could do more to promote that trick in the docs. It’s quite useful.
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue46417>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Erlend E. Aasland :
--
keywords: +patch
pull_requests: +28861
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30660
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
I created GH-30660 in order to try to enhance the docs. Ned and Eric, would you
mind taking a look at the PR?
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Erlend E. Aasland :
--
pull_requests: +28871
pull_request: https://github.com/python/cpython/pull/30671
___
Python tracker
<https://bugs.python.org/issue46
Change by Erlend E. Aasland :
--
pull_requests: +28872
pull_request: https://github.com/python/cpython/pull/30672
___
Python tracker
<https://bugs.python.org/issue46
Erlend E. Aasland added the comment:
> BTW, I'm fine with this being closed, since the functionality I wanted is
> available and documented.
Great. I was considering closing it as soon as the backports have landed (I had
to manually fix them bco. make suspicio
Change by Erlend E. Aasland :
--
nosy: +iritkatriel
___
Python tracker
<https://bugs.python.org/issue46428>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
Closing this. Thanks, Ned and Eric!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend E. Aasland :
--
pull_requests: +28878
pull_request: https://github.com/python/cpython/pull/30680
___
Python tracker
<https://bugs.python.org/issue24
Erlend E. Aasland added the comment:
PR without mapping protocol and context manager submitted: GH-30680. I've also
changed the open API to reflect that of apsw.
--
___
Python tracker
<https://bugs.python.org/is
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue46433>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
If you are ok with the proposed API in GH-30680, I'll mark it as ready for
review.
--
___
Python tracker
<https://bugs.python.org/is
Erlend E. Aasland added the comment:
> AFAIK we have committed _PyArg_UnpackKeywordsWithVararg on 3.11 alpha, so I
> think it should be fine.
I see, so no ABI worries then.
--
___
Python tracker
<https://bugs.python.org/i
Erlend E. Aasland added the comment:
Previously, this failure was more sporadic; now it happens almost every single
run on the Azure CI. Has there been updates on the Azure CI lately?
--
___
Python tracker
<https://bugs.python.org/issue41
Erlend E. Aasland added the comment:
Can we close this, or are you expecting more changes?
--
nosy: +erlendaasland
status: open -> pending
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
> Can we close this issue? Or is there a remaining task?
3.9 is still affected; we should fix those types first.
--
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
versions: +Python 3.9 -Python 3.10
___
Python tracker
<https://bugs.python.org/issue43916>
___
___
Python-bugs-list mailin
Change by Erlend E. Aasland :
--
title: Mark static types newly converted to heap types as immutable: add
Py_TPFLAGS_DISALLOW_INSTANTIATION type flag -> Check that new heap types cannot
be created uninitialised: add Py_TPFLAGS_DISALLOW_INSTANTIATION type f
Erlend E. Aasland added the comment:
FYI: There are only two bug-fix releases left for 3.9.
--
___
Python tracker
<https://bugs.python.org/issue43916>
___
___
Change by Erlend E. Aasland :
--
pull_requests: +29211
pull_request: https://github.com/python/cpython/pull/31030
___
Python tracker
<https://bugs.python.org/issue43
Erlend E. Aasland added the comment:
Did GH-30633 fix this? Is there further work to be done?
--
nosy: +erlendaasland
status: open -> pending
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
It looks like this can be closed. Petr?
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
Right, this of course affects 3.10 and 3.9. Let me know if you want me to do
the backports :)
(Updating version field for this ticket)
--
versions: +Python 3.10, Python 3.9
___
Python tracker
<ht
Change by Erlend E. Aasland :
--
nosy: -erlendaasland
___
Python tracker
<https://bugs.python.org/issue46200>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Erlend E. Aasland :
`pysqlite_connection_execute_impl()` and friends (executemany, executescript)
goes all the way through the Call API just to call
`pysqlite_connection_cursor_impl`. We can same a lot of calls by calling the
cursor _impl function directly; after all, it
Change by Erlend E. Aasland :
--
keywords: +patch
pull_requests: +29306
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31127
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue46657>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
The sqlite3 timestamp converter is buggy, as already noted in the docs[^1].
Adding timezone support is out of the question[^2][^3][^4][^5], but fixing it
to be able to discard any attached timezone info _may_ be ok; at first sight, I
don't see how
Change by Erlend E. Aasland :
--
nosy: +lemburg
___
Python tracker
<https://bugs.python.org/issue46662>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
I made a list of macros that reuse their argument some time around
February/March 2021. (Each macro is squashed into a single line for some reason
I can't remember.) See attachment, or check out the gist version:
https://gist.github.com/erlend-aa
Erlend E. Aasland added the comment:
> Any update on this?
I was unable to reproduce this last time we visited this issue, but I'll give
it another try.
> If there is no immediate plan to make this change you may close the issue :)
I do not want to close it until I can a) either
Erlend E. Aasland added the comment:
> There will be huge changes for this issue as this keyword has been used in a
> lot of places.
It should be sufficient to change only the exposed headers; that is Include/*.h
and Include/cpython/*.h. We should also change the AC tool, since that
Change by Erlend E. Aasland :
--
Removed message: https://bugs.python.org/msg413055
___
Python tracker
<https://bugs.python.org/issue39355>
___
___
Python-bug
Erlend E. Aasland added the comment:
> There will be huge changes for this issue as this keyword has been used in a
> lot of places.
For external extension modules, it should be sufficient to change only the
exposed headers; that is Include/*.h and Include/cpython/*.h. We shoul
Erlend E. Aasland added the comment:
> Do you plan to make the function public? It would be nice!
See https://github.com/python/cpython/pull/31081
--
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
+1 (what Jelle said)
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue46725>
___
___
Python-bug
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
nosy_count: 4.0 -> 5.0
pull_requests: +29448
pull_request: https://github.com/python/cpython/pull/31288
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
nosy_count: 5.0 -> 6.0
pull_requests: +29500
pull_request: https://github.com/python/cpython/pull/31351
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
Quoting the docs:
> This is a nonstandard shortcut that creates a cursor object by calling the
> cursor() method, calls the cursor’s execute() method with the parameters
> given, and returns the cursor.
There is already a backlink (or back refe
Erlend E. Aasland added the comment:
The change proposed in GH-31127 was included in GH-31351. Closing this.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend E. Aasland :
--
pull_requests: +29709
pull_request: https://github.com/python/cpython/pull/31586
___
Python tracker
<https://bugs.python.org/issue43
New submission from Erlend E. Aasland :
Currently, the `step` method of user-defined functions is looked up using
`PyObject_GetAttrString`. Using an interned string and `PyObject_GetAttr`, we
can speed up this a little bit.
--
components: Library (Lib)
messages: 414151
nosy
Change by Erlend E. Aasland :
--
assignee: -> erlendaasland
___
Python tracker
<https://bugs.python.org/issue46874>
___
___
Python-bugs-list mailing list
Un
Change by Erlend E. Aasland :
--
keywords: +patch
pull_requests: +29727
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31604
___
Python tracker
<https://bugs.python.org/issu
Erlend E. Aasland added the comment:
Can we close this?
--
nosy: +erlendaasland
status: open -> pending
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
pull_requests: +29732
pull_request: https://github.com/python/cpython/pull/31609
___
Python tracker
<https://bugs.python.org/issue46
New submission from Erlend E. Aasland :
Several sqlite3 methods are "marked" as non-standard in their docstrings. This
is an historic artefact which (I assume) implies that a method is not a part of
the DB-API defined by PEP 249. Questions regarding the "non-standard" stri
Change by Erlend E. Aasland :
--
keywords: +patch
pull_requests: +29735
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31612
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Erlend E. Aasland added the comment:
This is not needed. Quoting
https://sqlite.org/compile.html#enable_math_functions:
This option is automatically added to the Makefile by the configure script
on unix platforms, unless the --disable-math option is used.
--
nosy
Erlend E. Aasland added the comment:
Suggesting to close as "not a bug".
--
resolution: -> not a bug
status: open -> pending
___
Python tracker
<https://bugs.py
Erlend E. Aasland added the comment:
Duplicate of bpo-42686.
--
status: pending -> open
___
Python tracker
<https://bugs.python.org/issue46889>
___
___
Py
Erlend E. Aasland added the comment:
FTR, here's 3.10 and 3.11 on my Mac, using the official Python.org installers:
$ python3.10
Python 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0
(clang-1300.0.29.30)] on darwin
Type "help", "copyright&quo
Erlend E. Aasland added the comment:
+1 for SQLite 3.38.0.
--
___
Python tracker
<https://bugs.python.org/issue46907>
___
___
Python-bugs-list mailing list
Unsub
Erlend E. Aasland added the comment:
Steve, would you mind updating the cpython sources repo? (No hurry; let's see
if a patch release surfaces first.)
--
___
Python tracker
<https://bugs.python.org/is
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45373>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Erlend E. Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend E. Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend E. Aasland :
--
pull_requests: +29818
pull_request: https://github.com/python/cpython/pull/31698
___
Python tracker
<https://bugs.python.org/issue45
Erlend E. Aasland added the comment:
Regarding _tkinter (Tcl/Tk):
Based on discussion on Discourse
(https://discuss.python.org/t/simplifying-tcl-tk-detection/14066), my current
plan is to just use pkg-config, and drop the rest of the autodetect hackery.
GH-31698 sort'a works given tha
Erlend E. Aasland added the comment:
FYI, tested GH-31698 on Debian 10.3, and it works swell there.
--
___
Python tracker
<https://bugs.python.org/issue45
Erlend E. Aasland added the comment:
> GH-31698 sort'a works given that pkg-config provides us with correct info.
> Sadly it doesn't for Ubuntu [...]
Hm, looking more closely at Ubuntu (20.4), I see that the pkg-config files is
actually correct. I'll have to debug
Erlend E. Aasland added the comment:
FTR:
$ strings /lib/x86_64-linux-gnu/libtcl8.6.so | grep -E "\"
Tcl_Init
$ strings /lib/x86_64-linux-gnu/libtk8.6.so | grep -E "\"
Tk_Init
--
___
Python tracker
<https://bug
Erlend E. Aasland added the comment:
Solved: Ubuntu is fine, we just need to treat LIBS and LDFLAGS with care in
configure.ac. GH-31698 is updated with a fix.
--
___
Python tracker
<https://bugs.python.org/issue45
C. E. Ball added the comment:
Sorry, I don't have a Mac, and I don't have access to one that I could use to
make a patch.
At the time, I was trying to support OS X users of a piece of Python/Tkinter
software. Please do not keep this issue open on my account.
Tha
Changes by C. E. Ball <[EMAIL PROTECTED]>:
--
nosy: +ceball
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1676>
___
___
Python
New submission from C. E. Ball:
On OS X, I wanted to build my own copy of Python that used my own copy
of Tkinter (built for X11).
To do this, I passed "LDFLAGS=-rpath,/path/to/lib" to configure so that
Python could find my specific lib files, but I also had to edit Python's
s
C. E. Ball added the comment:
I apologize for the confusion: I put the modified file first and the
original second.
Sorry about that!
An option to do nothing special to find Tk and Tcl on darwin is what
would be useful.
__
Tracker <[EMAIL PROTECTED]>
New submission from k-e-n:
The code from section 4.4 of the tutorial follows.
This code does not produce the output shown.
Adding a final break statement will fix this.
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n,
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
nosy_count: 1.0 -> 2.0
pull_requests: +29854
pull_request: https://github.com/python/cpython/pull/31737
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
pull_requests: +29866
pull_request: https://github.com/python/cpython/pull/31753
___
Python tracker
<https://bugs.python.org/issue46
Change by Erlend E. Aasland :
--
pull_requests: +29867
pull_request: https://github.com/python/cpython/pull/31754
___
Python tracker
<https://bugs.python.org/issue46
Erlend E. Aasland added the comment:
Reopening bco. broken buildbots.
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue45138>
___
_
Erlend E. Aasland added the comment:
Ah, one of my very first contributions, bpo-40318, comes back to haunt me:
In bpo-40318, we migrated from the old SQLite trace API (sqlite3_trace) to
SQLite trace v2 API (sqlite3_trace_v2). GH-19581, which introduced this change,
introduced a bug: the
Change by Erlend E. Aasland :
--
pull_requests: +29888
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/31783
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
pull_requests: +29892
pull_request: https://github.com/python/cpython/pull/31788
___
Python tracker
<https://bugs.python.org/issue45
Erlend E. Aasland added the comment:
The change that introduced this regression was reverted in GH-31788
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
I'm removing 3.11 from the versions field:
$ python3.11 sqlite3_fatal_python_error.py
Exception ignored in:
Traceback (most recent call last):
File
"/Users/erlendaasland/src/cpython-build/sqlite3_fatal_python_error.py"
Erlend E. Aasland added the comment:
> A perfect repro has been attached, should be run on Linux.
FTR, the repo works on macOS 12.2.1 as well:
$ python3.10 ./sqlite3_fatal_python_error.py
Fatal Python error: PyThreadState_Get: the function must be called with the
GIL held, but
Erlend E. Aasland added the comment:
> My recommended fix is to call sqlite3_close() within
> Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS, and manually Py_DECREF all
> connection-related functions afterward.
3.11 already drops the GIL before sqlite3_close_v2(); backporting this c
Erlend E. Aasland added the comment:
Updating to SQLite 3.37 was backported because of a data corruption bug that
was fixed. AFAIK, there’s nothing like that in 3.38. I would prefer waiting to
see if more patch releases appear. (That was also my intent, given how many
patch releases we saw
401 - 500 of 1199 matches
Mail list logo