Skip to content

PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented #78327

Closed

Description

@mr-nfamous
BPO 34146
Nosy @mr-nfamous

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 = None
created_at = <Date 2018-07-18.10:41:57.390>
labels = ['ctypes', '3.8']
title = "PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented"
updated_at = <Date 2018-07-18.10:41:57.390>
user = 'https://github.com/mr-nfamous'

bugs.python.org fields:

activity = <Date 2018-07-18.10:41:57.390>
actor = 'bup'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['ctypes']
creation = <Date 2018-07-18.10:41:57.390>
creator = 'bup'
dependencies = []
files = []
hgrepos = []
issue_num = 34146
keywords = []
message_count = 1.0
messages = ['321878']
nosy_count = 1.0
nosy_names = ['bup']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue34146'
versions = ['Python 3.8']

Linked PRs

Activity

  1. mr-nfamous commented on Jul 18, 2018

    mr-nfamousmannequin
    MannequinAuthor

    So not only does the function it does use (PyCData_nohash) prevent PyType_Ready from setting _ctypes._SimpleCData.dict["hash"] to None, (contrary to to every other unhashable type in the standard library) but the error message it returns is less detailed.

    It seems like a big deal if this were to be changed as it could break backwards compatibility so I won't open PR myself as I'm still not that familiar with the contribution process.

  2. transferred this issue fromon Apr 10, 2022
  3. added
    type-bugAn unexpected behavior, bug, or error
    3.16new features, bugs and security fixes
    and removed on Oct 19, 2026
  4. added a commit that references this issue on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.16new features, bugs and security fixestopic-ctypestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions