Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23344
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24563
___
Python tracker
<https://bugs.python.org/issu
New submission from Erlend Egeberg Aasland :
Both snprintf and vsnprintf belong to man section 3 (library functions), not
section 2 (system calls).
Affected doc page: https://docs.python.org/3.10/c-api/conversion.html
--
assignee: docs@python
components: Documentation
messages
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23343
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24562
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
> Sounds good to me but I'd say designing APIs relying on call order is bad too
> :)
Yes, it's too easy to mess up things with this part of the SQLite API :) I'll
throw up a PR.
BTW (small digression):
I re
New submission from Erlend Egeberg Aasland :
AFAICS, the docs for sqlite3_column_name() says that if it returns NULL, we are
out of memory, thus we should call PyErr_NoMemory() and bail.
FYI, there are the calls to sqlite3_column_name() in Modules/_sqlite//cursor.c
Ref:
- http://sqlite.org
New submission from Erlend Egeberg Aasland :
sqlite3_column_bytes() should be called _after_ sqlite3_column_blob(). There
two calls to sqlite3_column_blob() are both preceeded by calls to
sqlite3_column_bytes(). Currently it does not do any harm, but it is bad API
usage.
I suggest to fix
Erlend Egeberg Aasland added the comment:
Should we still fix sqlite3, or wait for an agreement on GH-24510?
--
___
Python tracker
<https://bugs.python.org/issue15
Change by Erlend Egeberg Aasland :
--
pull_requests: +23341
pull_request: https://github.com/python/cpython/pull/24555
___
Python tracker
<https://bugs.python.org/issue40
Erlend Egeberg Aasland added the comment:
> This can introduce a performance slowdown and so should wait until the PEP
> 620 is accepted.
Noted.
--
___
Python tracker
<https://bugs.python.org/i
Erlend Egeberg Aasland added the comment:
Thanks, Victor.
For PySequence_ITEM, I guess adding a private C version (for example
_PySequence_Item) and redirecting the macro to the C version would be
acceptable.
Ditto for PyHeapType_GET_MEMBERS and PyType_SUPPORTS_WEAKREFS
Change by Erlend Egeberg Aasland :
--
pull_requests: +23335
pull_request: https://github.com/python/cpython/pull/24553
___
Python tracker
<https://bugs.python.org/issue40
Erlend Egeberg Aasland added the comment:
For PyExceptionClass_Name: Is it ok to just remove the macro version (like with
GH-24548)?
--
___
Python tracker
<https://bugs.python.org/issue40
Change by Erlend Egeberg Aasland :
--
pull_requests: +23331
pull_request: https://github.com/python/cpython/pull/24548
___
Python tracker
<https://bugs.python.org/issue40
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue15108>
___
___
Python-bugs-list mailing list
Unsub
Erlend Egeberg Aasland added the comment:
After GH-24533 and GH-24535, there's (AFAICS) only a handful of cases left.
$ grep -r "\->tp_" Include/:
Include/internal/pycore_abstract.h:PyNumberMethods *tp_as_number =
Py_TYPE(obj)->tp_as_number;
Include/internal/pycore_
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
nosy_count: 7.0 -> 8.0
pull_requests: +23322
pull_request: https://github.com/python/cpython/pull/24535
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
> I don't think that PR 24533 should be backported to Python 3.8 and Python
> 3.9. I prefer to avoid any risk of regression, and so only change Python 3.10.
That sounds reasonable.
--
___
Pyt
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23320
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24533
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
Silence implies consent? I'll throw up a PR, then :)
--
___
Python tracker
<https://bugs.python.org/is
Change by Erlend Egeberg Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Erlend Egeberg Aasland added the comment:
Introduced by 1ae035b7e847064d09df01ca62b8a761e9b5aae3
--
___
Python tracker
<https://bugs.python.org/issue43
Change by Erlend Egeberg Aasland :
--
title: Fix inaccurate byteswap comment in sha512.module.c -> Fix inaccurate
byteswap comment in sha512module.c
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23305
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24518
___
Python tracker
<https://bugs.python.org/issu
New submission from Erlend Egeberg Aasland :
Include/internal/pycore_bitutils.h is included bco. _Py_bswap64(), not
_Py_bswap32().
--
components: Library (Lib)
messages: 386873
nosy: christian.heimes, erlendaasland
priority: normal
severity: normal
status: open
title: Fix inaccurate
Erlend Egeberg Aasland added the comment:
*error handling => exception emitted
--
___
Python tracker
<https://bugs.python.org/issue42624>
___
___
Python-
Erlend Egeberg Aasland added the comment:
... and also bpo-16379
--
___
Python tracker
<https://bugs.python.org/issue42624>
___
___
Python-bugs-list mailin
Erlend Egeberg Aasland added the comment:
Ref. bpo-24139
--
___
Python tracker
<https://bugs.python.org/issue42624>
___
___
Python-bugs-list mailing list
Unsub
Erlend Egeberg Aasland added the comment:
Exception originates from _pysqlite_seterror() in Modules/_sqlite/util.c, line
64:
https://github.com/python/cpython/blob/master/Modules/_sqlite/util.c#L64
Error code 1 (SQLITE_ERROR, https://sqlite.org/rescode.html#error) is a generic
sqlite3 error
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23301
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24507
___
Python tracker
<https://bugs.python.org/issu
New submission from Erlend Egeberg Aasland :
The comments in Modules/md5module.c, Modules/sha1module.c,
Modules/sha256module.c, and Modules/sha512module.c all point to
http://libtom.org. However the LibTom website has in fairly recent years been
relaunched at https://libtom.net. The old URL
Change by Erlend Egeberg Aasland :
--
keywords: +patch
nosy: +erlendaasland
nosy_count: 2.0 -> 3.0
pull_requests: +23294
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24504
___
Python tracker
<https://bugs.p
Erlend Egeberg Aasland added the comment:
> Are you interested to convert the PyObject_TypeCheck() macro to a static
> inline function?
I'd like to give it a shot if it's ok for you all.
--
___
Python tracker
<https://bugs.py
Erlend Egeberg Aasland added the comment:
> If we are going to change public sqlite3 APIs in to be positional-only, I'd
> prefer writing a PEP and fix all modules once and for all.
Right. I assume you mean that such a PEP would contain a set of guidelines for
how to handle the
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43181>
___
___
Python-bugs-list mailing list
Unsub
Erlend Egeberg Aasland added the comment:
sqlite3.Connection.set_progress_handler()
docs: set_progress_handler(handler, n)
impl: set_progress_handler(progress_handler, n)
Apart from that, the rest of sqlite3.Connection seems to be ok.
There's an ongoing discussion at python-dev abou
Change by Erlend Egeberg Aasland :
--
pull_requests: +23293
pull_request: https://github.com/python/cpython/pull/24503
___
Python tracker
<https://bugs.python.org/issue40
Erlend Egeberg Aasland added the comment:
Module level function discrepancies:
register_converter(), register_adapter(), and enable_callback_tracebacks()
docstrings were unintentionally altered in recent AC updates. Docstrings should
be restored. Docs are ok.
adapt() is not documented, but
Change by Erlend Egeberg Aasland :
--
pull_requests: +23282
pull_request: https://github.com/python/cpython/pull/24492
___
Python tracker
<https://bugs.python.org/issue36
Erlend Egeberg Aasland added the comment:
Thanks, Charles. I'll give it a shot and see if get can provoke a response :)
--
___
Python tracker
<https://bugs.python.org/is
Erlend Egeberg Aasland added the comment:
I believe GH-13216 would be an improvement. I see that your original branch is
unavailable, Charles; would you mind if I cherry-picked it and rebased it onto
master? The sqlite3 module now requires SQLite >= 3.7.15 which simplifies the
change a
Change by Erlend Egeberg Aasland :
--
components: +Library (Lib), Windows
nosy: +paul.moore, tim.golden, zach.ware
___
Python tracker
<https://bugs.python.org/issue42
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23280
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24489
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
Quoting from Victor Stinner's reply on python-dev
(https://mail.python.org/archives/list/python-...@python.org/message/X6SZIVOZ233TLLJV43UQEHMV3ELGP34S/):
If there are applications relying on the parameter name, it's better
to trust
Erlend Egeberg Aasland added the comment:
> I'm sure Gerhard wouldn't say no to changing the sqlite3 test prefix to
"test_"...
FYI, the sqlite3 tests have now been cleaned up (GH-20538).
Remaining occurrences in Lib/test:
Lib/test/test_pdb.py:unittest.makeSuite
Erlend Egeberg Aasland added the comment:
In my opinion, an array of pointers is a bad API; using a struct (like most of
the other API's) is an improvement.
Ref. discussions on GH-24186
(https://github.com/python/cpython/pull/24186#discussion_r560834060) and
bpo-
Erlend Egeberg Aasland added the comment:
Steve, I've put up a PR that prepares the Windows build for this. Would you
mind taking a look at it?
--
nosy: +steve.dower
___
Python tracker
<https://bugs.python.org/is
Change by Erlend Egeberg Aasland :
--
pull_requests: +23273
pull_request: https://github.com/python/cpython/pull/24481
___
Python tracker
<https://bugs.python.org/issue40
Change by Erlend Egeberg Aasland :
--
pull_requests: +23236
pull_request: https://github.com/python/cpython/pull/24421
___
Python tracker
<https://bugs.python.org/issue40
Change by Erlend Egeberg Aasland :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue43094>
___
___
Python-bugs-list mailing list
Unsub
Change by Erlend Egeberg Aasland :
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue43094>
___
___
Python-bugs-list mailing list
Unsub
Erlend Egeberg Aasland added the comment:
There's also a discrepancy between the docs and the signature for
create_aggregate():
https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_aggregate
create_aggregate(name, num_params, aggregate_class)
The second paramet
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23226
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23428
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
FYI: I've opened bpo-43060 for the decimal module.
--
___
Python tracker
<https://bugs.python.org/issue43009>
___
___
Change by Erlend Egeberg Aasland :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue43060>
___
___
Python-bugs-list mailing list
Un
New submission from Erlend Egeberg Aasland :
Ref. discussions on bpo-43009 and bpo-41798.
--
components: Library (Lib)
messages: 385901
nosy: erlendaasland, shihai1991, vstinner
priority: normal
severity: normal
status: open
title: Convert _decimal C API from pointer array to struct
Erlend Egeberg Aasland added the comment:
> +1. IMHO, structure is more directly than pointer array. And there haven't
> exposing this pointer array to users(no backward compatibility).
Good. I'll open a separate issue and give
Erlend Egeberg Aasland added the comment:
> Before removing public documented attribute it should be deprecated.
Of course.
> […], I have a large patch for removing obsolete version attributes in process.
Great!
--
___
Python tracker
Erlend Egeberg Aasland added the comment:
Perhaps we should remove the (pysqlite) version attributes while we're there?
Ref.
https://mail.python.org/archives/list/python-...@python.org/message/NS6YVA3QCAXELK7KROOLULKXOF3KFFJA/
>>> import sqlite3
>>> sqlite3.vers
Erlend Egeberg Aasland added the comment:
Should we proceed with fixing GC for all heap types before continuing work with
bpo-40077?
--
___
Python tracker
<https://bugs.python.org/issue42
Erlend Egeberg Aasland added the comment:
The _decimal API is also just an array of pointers. Should we change that to a
struct as well?
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43
Erlend Egeberg Aasland added the comment:
> Or is it ok to call gc.collect() in the test suite?
Seems like it's ok:
$ grep -r gc.collect Lib/test | wc -l
366
--
___
Python tracker
<https://bugs.python.org
Erlend Egeberg Aasland added the comment:
This works:
1) fully implement GC in connection (bpo-42972)
2) also visit statement_cache
3) explicitly close connections _and_ call GC in problematic tests
The first point might not be needed for this particular fix.
The last point is a workaround
Erlend Egeberg Aasland added the comment:
Tried applying bpo-42972 to sqlite and functools, but the error persists.
--
___
Python tracker
<https://bugs.python.org/issue42
Change by Erlend Egeberg Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue42972>
___
___
Python-bugs-list mailing list
Unsub
Change by Erlend Egeberg Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Erlend Egeberg Aasland added the comment:
I need some help debugging the Windows issues. There are a handful of tests
that fail because the sqlite3 is clinging on to objects or file descriptors.
AFAICT, a GC bug. For example, test_open_uri fails with:
PermissionError: [WinError 32] The
Change by Erlend Egeberg Aasland :
--
pull_requests: +23041
pull_request: https://github.com/python/cpython/pull/24214
___
Python tracker
<https://bugs.python.org/issue40
Erlend Egeberg Aasland added the comment:
Thanks, but I prefer the following:
size as maxrows: int(c_default='self->arraysize',
py_default='') = 1
--
___
Python tracker
<https://
Erlend Egeberg Aasland added the comment:
I don't see how to easily solve this in AC: we want the arraysize of the cursor
instance, but I don't see how I'm going to get this via the AC
namespace/context. Using a "bogus" default value works:
size as maxrows: int(c
Erlend Egeberg Aasland added the comment:
Looks like this is the culprit:
https://github.com/python/cpython/blob/2396614b8958ad202378fd71a598eb4106ac5896/Modules/_sqlite/cursor.c#L825
--
___
Python tracker
<https://bugs.python.org/issue40
Erlend Egeberg Aasland added the comment:
GH-24007 introduced a regression:
>>> import sqlite3
>>> help(sqlite3)
Traceback (most recent call last):
File "Lib/inspect.py", line 2049, in wrap_value
value = eval(s, module_dict)
File "", line 1, in
N
Change by Erlend Egeberg Aasland :
--
pull_requests: +23028
pull_request: https://github.com/python/cpython/pull/24203
___
Python tracker
<https://bugs.python.org/issue42
Erlend Egeberg Aasland added the comment:
> I do not like using _functools._lru_cache_wrapper. It is a deep
> implementation detail, private function of private module. Use
> functools.lru_cache.
All right, thanks.
--
___
Python tracke
Erlend Egeberg Aasland added the comment:
True that :) I'll close GH-24135 for now and open a PR for this later today.
--
___
Python tracker
<https://bugs.python.org/is
Erlend Egeberg Aasland added the comment:
> I don't see any reason to merge GH-24135 if we are going to remove cache.[ch]
> in this issue.
Yes, I've thought about that myself. A small argument pro merging GH-24135
would be that if we for some reason decide to revert this cha
Erlend Egeberg Aasland added the comment:
I can throw up the PoC branch as a draft PR after GH-24135 is merged. We can
just close the PR if this is uninteresting or something we want to postpone.
--
___
Python tracker
<https://bugs.python.
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +23021
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24135
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend Egeberg Aasland :
--
pull_requests: +23002
pull_request: https://github.com/python/cpython/pull/24175
___
Python tracker
<https://bugs.python.org/issue1635
Erlend Egeberg Aasland added the comment:
$ python3.10 -m timeit -s 'import sqlite3; con = sqlite3.connect(":memory:");
query="select * from sqlite_master"' 'con.execute(query); con.execute(query)'
10 loops, best of 5: 2.95 usec per loop
$ ./pyth
Change by Erlend Egeberg Aasland :
--
pull_requests: +22997
pull_request: https://github.com/python/cpython/pull/24170
___
Python tracker
<https://bugs.python.org/issue24
Erlend Egeberg Aasland added the comment:
Ah, thanks! I also found that info in the docs:
https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_free
--
___
Python tracker
<https://bugs.python.org/issue42
Erlend Egeberg Aasland added the comment:
Ref. https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_HAVE_GC
--
___
Python tracker
<https://bugs.python.org/issue42
Erlend Egeberg Aasland added the comment:
Don't you need to free memory using PyObject_GC_Del when you allocate using
PyObject_GC_New?
--
___
Python tracker
<https://bugs.python.org/is
Erlend Egeberg Aasland added the comment:
Thank you so much for taking the time to write these blog posts, Victor, and
for explaining your fixes is such great detail. It is very helpful!
--
___
Python tracker
<https://bugs.python.org/issue42
Erlend Egeberg Aasland added the comment:
Short diffstat: 8 files changed, 85 insertions(+), 406 deletions(-)
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Erlend Egeberg Aasland :
Pro: less code, less complexity, improved maintainability
Con: minor performance hit
PoC here: https://github.com/erlend-aasland/cpython/commits/sqlite-cache
$ ./python.exe
>>> import sqlite3
>>> con = sqlite3.connect(":me
Erlend Egeberg Aasland added the comment:
It should be sufficient to convert cjkcodecs.h to multi-phase init then? From
what I can see, the support modules are state less, right?
--
___
Python tracker
<https://bugs.python.org/issue42
Erlend Egeberg Aasland added the comment:
I'm unable to reproduce this on Windows 10 (amd64). What's your exact locale
setting? Are you compiling with HEAD at
0b858cdd5d114f0890b11b6c4d6559d0ceb468ab?
--
___
Python track
Change by Erlend Egeberg Aasland :
--
pull_requests: +22976
pull_request: https://github.com/python/cpython/pull/24148
___
Python tracker
<https://bugs.python.org/issue10
Change by Erlend Egeberg Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend Egeberg Aasland :
--
keywords: +patch
pull_requests: +22975
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24147
___
Python tracker
<https://bugs.python.org/issu
Erlend Egeberg Aasland added the comment:
Indeed it is. I'll create a PR as soon as GH-20538 is merged.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Erlend Egeberg Aasland :
GitHub does not play well with other file encodings than UTF-8. For example,
when the "suggestion" in
https://github.com/python/cpython/pull/20538#discussion_r552926126 was applied,
GitHub silently converted Lib/sqlite3/test/types.py fro
Change by Erlend Egeberg Aasland :
--
pull_requests: +22965
pull_request: https://github.com/python/cpython/pull/24135
___
Python tracker
<https://bugs.python.org/issue40
Erlend Egeberg Aasland added the comment:
> Sorry, I've been doing it. They're just slow because I'm getting OpenSSL done
> at the same time and they both keep causing merge conflicts.
No problem. I noticed that, so I abo
Erlend Egeberg Aasland added the comment:
Steve Dower, do you mind if I create backports for the Windows build as well?
--
resolution: -> fixed
status: open -> pending
___
Python tracker
<https://bugs.python.org/i
Change by Erlend Egeberg Aasland :
--
pull_requests: +22960
pull_request: https://github.com/python/cpython/pull/24130
___
Python tracker
<https://bugs.python.org/issue42
Change by Erlend Egeberg Aasland :
--
pull_requests: +22959
pull_request: https://github.com/python/cpython/pull/24129
___
Python tracker
<https://bugs.python.org/issue42
Change by Erlend Egeberg Aasland :
--
pull_requests: +22958
pull_request: https://github.com/python/cpython/pull/24128
___
Python tracker
<https://bugs.python.org/issue41
Erlend Egeberg Aasland added the comment:
Ned Deily, can you fix the macOS backports?
--
___
Python tracker
<https://bugs.python.org/issue42584>
___
___
Pytho
301 - 400 of 656 matches
Mail list logo