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

PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented #78327

Open
mr-nfamous mannequin opened this issue Jul 18, 2018 · 1 comment
Open

PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented #78327

mr-nfamous mannequin opened this issue Jul 18, 2018 · 1 comment
Labels
3.8 only security fixes topic-ctypes

Comments

@mr-nfamous
Copy link
Mannequin

mr-nfamous mannequin commented Jul 18, 2018

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']

@mr-nfamous
Copy link
Mannequin Author

mr-nfamous mannequin commented Jul 18, 2018

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.

@mr-nfamous mr-nfamous mannequin added 3.8 only security fixes topic-ctypes labels Jul 18, 2018
@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
3.8 only security fixes topic-ctypes
Projects
None yet
Development

No branches or pull requests

0 participants