
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-09-16 10:00 byserhiy.storchaka, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 16190 | merged | serhiy.storchaka,2019-09-16 16:32 | |
| PR 16216 | merged | miss-islington,2019-09-17 06:21 | |
| PR 16217 | merged | miss-islington,2019-09-17 06:21 | |
| Messages (4) | |||
|---|---|---|---|
| msg352533 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2019-09-16 10:00 | |
sqlite3.Row can be indexed by integers and by strings. In the latter case string matching is case insensitive. But the code that implements this is too simple-minded. It compares UTF-8 representation of two strings ignoring some bit. It works for ASCII letters, but has weird behavior for digits, '_' and non-ASCII characters.For example:>>> import sqlite3>>> con = sqlite3.connect(":memory:")>>> con.row_factory = sqlite3.Row>>> row = con.execute("select 1 as a_1").fetchone()>>> row['a_1']1>>> row['A_1']1>>> row['A_\x11']1>>> row['A\x7f1']1>>> row = con.execute("select 1 as ÿ").fetchone()>>> row["ÿ"]1>>> row["Ÿ"]Traceback (most recent call last): File "<stdin>", line 1, in <module>IndexError: No item with that key>>> row["ß"]1 | |||
| msg352604 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2019-09-17 06:20 | |
New changesetf669581a9527afb0d2325f9845a86715c0ba365d by Serhiy Storchaka in branch 'master':bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190)https://github.com/python/cpython/commit/f669581a9527afb0d2325f9845a86715c0ba365d | |||
| msg352611 -(view) | Author: miss-islington (miss-islington) | Date: 2019-09-17 06:39 | |
New changesetd8d653c2d0d267eb1e44f6cdb916945029fec3b1 by Miss Islington (bot) in branch '3.8':bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190)https://github.com/python/cpython/commit/d8d653c2d0d267eb1e44f6cdb916945029fec3b1 | |||
| msg352612 -(view) | Author: miss-islington (miss-islington) | Date: 2019-09-17 06:39 | |
New changeset80cb055aa45f37951b8e3097fe4367d443d455ae by Miss Islington (bot) in branch '3.7':bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190)https://github.com/python/cpython/commit/80cb055aa45f37951b8e3097fe4367d443d455ae | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:20 | admin | set | github: 82366 |
| 2019-09-17 09:37:40 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-09-17 06:39:52 | miss-islington | set | messages: +msg352612 |
| 2019-09-17 06:39:14 | miss-islington | set | nosy: +miss-islington messages: +msg352611 |
| 2019-09-17 06:21:18 | miss-islington | set | pull_requests: +pull_request15818 |
| 2019-09-17 06:21:10 | miss-islington | set | pull_requests: +pull_request15817 |
| 2019-09-17 06:20:59 | serhiy.storchaka | set | messages: +msg352604 |
| 2019-09-16 16:32:34 | serhiy.storchaka | set | keywords: +patch stage: patch review pull_requests: +pull_request15796 |
| 2019-09-16 10:00:11 | serhiy.storchaka | create | |