[issue38860] GenericPyCData_new does not invoke new or init

2020-02-18 Thread Kyle Stanley
Kyle Stanley added the comment: Justin Capella wrote: > Is there a better forum for discussion about design/behavior, maybe the more > generic issue of GenericPyCData_new using tp_alloc instead of tp_new Rebecca Morgan wrote: > I would still be interested in this, with some clarity on the >

[issue38860] GenericPyCData_new does not invoke new or init

2020-02-18 Thread Rebecca Morgan
Rebecca Morgan added the comment: I would still be interested in this, with some clarity on the testing/expected behavior. -- ___ Python tracker ___ _

[issue38860] GenericPyCData_new does not invoke new or init

2020-01-22 Thread Justin Capella
Justin Capella added the comment: Becca were you still interested in this issue? Anyone agree the unit test seems to have a bug if that is intended behavior? Is there a better forum for discussion about design/behavior, maybe the more generic issue of GenericPyCData_new using tp_alloc inste

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Justin Capella
Justin Capella added the comment: It might make sense that CSimpleData types do not call init, which makes sense for _fields_ but it doesn't make sense to offer subclassing (of Structure) and not use the subclass, instead creating a type of the same name. That test case is bugged, missing an

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Rebecca Morgan
Rebecca Morgan added the comment: Looking at the test case 'test_from_buffer_copy' here: https://github.com/python/cpython/blob/master/Lib/ctypes/test/test_frombuffer.py This suggests the failure to call init in this instance is expected behavior (similarly for from_buffer), unlike e.g. the c

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +LewisGaul, aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-10 Thread Rebecca Morgan
Rebecca Morgan added the comment: Hi there, I’m a newcomer would like to take a look at this. Planning to investigate over the next few days. -- nosy: +beccamorgan ___ Python tracker

[issue38860] GenericPyCData_new does not invoke new or init

2019-11-19 Thread Justin Capella
New submission from Justin Capella : When subclassing the ctypes.Structure class, __new__ and __init__ are not invoked when using the inherited classmethod from_buffer_copy to create the object. I think this is because tp_alloc is ultimately used by GenericPyCData_new when creating the objec