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.

classification
Title: make sqlite.Row hashable correctly
Type: behavior Stage:
Components: Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: ghaering Nosy List: georg.brandl, ghaering, theller
Priority: normal Keywords: patch

Created on 2008-02-21 10:48 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sqliterow.patch theller, 2008-02-21 10:48
sqliterow-richcmp.diff theller, 2008-03-31 18:21 Implementation with tp_richcompare
Messages (7)
msg62615 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-02-21 10:48
The attached patch implements hash and cmp for sqlite3.Row objects.
msg64694 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2008-03-29 13:48
Thomas, could you do me a favour and create a patch for Python 3.0, too?
It seems that only tp_richcompare is supported there.
msg64789 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-03-31 18:21
Here's a patch against trunk that implements tp_richcompare.  It does
apply to and work also in the py3k branch.

I have only implemented the '__eq__' and '__ne__' comparisons.
msg64796 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2008-03-31 23:08
Thanks a lot! I will review and apply this after the next releases.
Don't want to rush things in now that the next alphas are so close. Btw.
I don't find forward-porting to py3k particularly easy. The diffs
between the 2.6 version and th 3.0 version in the sqlite3 module are
quite large.
msg66206 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2008-05-04 13:15
I applied your second patch in r62701. Thanks again!
msg66332 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-06 20:18
Can this be closed?
msg66335 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2008-05-06 21:32
Yes, I was waiting till the merge to py3k was complete. It is now.
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46405
2008-05-06 21:32:15ghaeringsetstatus: open -> closed
messages: + msg66335
2008-05-06 20:18:03georg.brandlsetnosy: + georg.brandl
messages: + msg66332
2008-05-04 13:15:52ghaeringsetresolution: accepted
messages: + msg66206
2008-03-31 23:08:20ghaeringsetmessages: + msg64796
2008-03-31 18:21:42thellersetfiles: + sqliterow-richcmp.diff
messages: + msg64789
2008-03-29 13:48:39ghaeringsetmessages: + msg64694
2008-02-27 20:12:01ghaeringsetpriority: normal
assignee: ghaering
nosy: + ghaering
2008-02-21 10:48:05thellercreate