Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sqlite.Row hashable correctly #46405

Closed
theller opened this issue Feb 21, 2008 · 7 comments
Closed

make sqlite.Row hashable correctly #46405

theller opened this issue Feb 21, 2008 · 7 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@theller
Copy link

theller commented Feb 21, 2008

BPO 2152
Nosy @theller, @birkenfeld
Files
  • sqliterow.patch
  • sqliterow-richcmp.diff: Implementation with tp_richcompare
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-05-06.21:32:15.413>
    created_at = <Date 2008-02-21.10:48:05.531>
    labels = ['type-bug']
    title = 'make sqlite.Row hashable correctly'
    updated_at = <Date 2008-05-06.21:32:15.412>
    user = 'https://github.com/theller'

    bugs.python.org fields:

    activity = <Date 2008-05-06.21:32:15.412>
    actor = 'ghaering'
    assignee = 'ghaering'
    closed = True
    closed_date = <Date 2008-05-06.21:32:15.413>
    closer = 'ghaering'
    components = []
    creation = <Date 2008-02-21.10:48:05.531>
    creator = 'theller'
    dependencies = []
    files = ['9475', '9913']
    hgrepos = []
    issue_num = 2152
    keywords = ['patch']
    message_count = 7.0
    messages = ['62615', '64694', '64789', '64796', '66206', '66332', '66335']
    nosy_count = 3.0
    nosy_names = ['theller', 'georg.brandl', 'ghaering']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2152'
    versions = ['Python 2.6', 'Python 3.0']

    @theller
    Copy link
    Author

    theller commented Feb 21, 2008

    The attached patch implements hash and cmp for sqlite3.Row objects.

    @theller theller added the type-bug An unexpected behavior, bug, or error label Feb 21, 2008
    @ghaering ghaering mannequin self-assigned this Feb 27, 2008
    @ghaering
    Copy link
    Mannequin

    ghaering mannequin commented Mar 29, 2008

    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.

    @theller
    Copy link
    Author

    theller commented Mar 31, 2008

    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.

    @ghaering
    Copy link
    Mannequin

    ghaering mannequin commented Mar 31, 2008

    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.

    @ghaering
    Copy link
    Mannequin

    ghaering mannequin commented May 4, 2008

    I applied your second patch in r62701. Thanks again!

    @birkenfeld
    Copy link
    Member

    Can this be closed?

    @ghaering
    Copy link
    Mannequin

    ghaering mannequin commented May 6, 2008

    Yes, I was waiting till the merge to py3k was complete. It is now.

    @ghaering ghaering mannequin closed this as completed May 6, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants