Closed
Description
BPO | 33267 |
---|---|
Nosy | @amauryfa, @abalkin, @meadori, @eric-wieser, @MojoVampire |
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-04-12.08:45:09.451>
labels = ['ctypes']
title = 'ctypes array types create reference cycles'
updated_at = <Date 2018-04-12.22:23:40.243>
user = 'https://github.com/eric-wieser'
bugs.python.org fields:
activity = <Date 2018-04-12.22:23:40.243>
actor = 'josh.r'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['ctypes']
creation = <Date 2018-04-12.08:45:09.451>
creator = 'Eric.Wieser'
dependencies = []
files = []
hgrepos = []
issue_num = 33267
keywords = []
message_count = 3.0
messages = ['315216', '315217', '315236']
nosy_count = 5.0
nosy_names = ['amaury.forgeotdarc', 'belopolsky', 'meador.inge', 'Eric.Wieser', 'josh.r']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue33267'
versions = ['Python 3.5']
Activity
eric-wieser commentedon Apr 12, 2018
Discovered in https://github.com/numpy/pull/10882/files#r180813166
A reproduction:
Using the proposed function in numpy/numpy#10891, we get a few more details:
I suppose this isn't really a bug, but it's not clear to me why a cycle needs to be created here.
eric-wieser commentedon Apr 12, 2018
Apologies, I missed the important part of that snippet:
MojoVampire commentedon Apr 12, 2018
Pretty sure this is a problem with classes in general; classes are self-referencing, and using multiplication to create new ctypes array types is creating new classes.
encukou commentedon May 13, 2025
Indeed, most classes create reference cycles.