This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erlendaasland
Recipients berker.peksag, erlendaasland, ghaering, rhettinger, serhiy.storchaka, terry.reedy, vlad
Date 2021-04-08.08:55:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617872102.32.0.86107782914.issue35889@roundup.psfhosted.org>
In-reply-to
Content
AFAICS, this is fixed by the attached one-liner, based on Serhiy's suggestion (based on Raymond's suggestion).


$ python3.10 test.py
<sqlite3.Row object at 0x102b91330>
$ ./python.exe test.py  # patch applied
<sqlite3.Row object at 0x10c06b600 {'number': 1, 'string': 'two', 'blob': b'\x1f'}>
$ cat test.py
import sqlite3
cx = sqlite3.connect(":memory:")
cx.row_factory = sqlite3.Row
query = """
  select
    1 as number,
    'two' as string,
    x'1f' as blob
"""
for row in cx.execute(query):
    print(repr(row))


If Berker & Serhiy approves, I'll create a PR for it.
History
Date User Action Args
2021-04-08 08:55:02erlendaaslandsetrecipients: + erlendaasland, rhettinger, terry.reedy, ghaering, berker.peksag, serhiy.storchaka, vlad
2021-04-08 08:55:02erlendaaslandsetmessageid: <1617872102.32.0.86107782914.issue35889@roundup.psfhosted.org>
2021-04-08 08:55:02erlendaaslandlinkissue35889 messages
2021-04-08 08:55:01erlendaaslandcreate