GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — gh-61103: use PEP 3118 codes in the ctypes by skirpichev · Pull Request #149344 · python/cpython Conversation
|
|
@encukou, I think this should fix compatibility with NumPy (buffer protocol). We can decide later what to do with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm worried that this is a breaking change relative to Python 3.14. But, with #148676 this would be redundant. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Documentation build overview
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Done.
(I think merging that pr is a bad idea.) Though, you are right, my 3 PRs - only an alternative. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I merged my PR instead which changes ctypes |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vstinner, you already closed this door by #149368. Anyway, that's a kind of direction I would like to support, instead of #148676. No multiple type codes. I only worry, that in this way you also introduce incompatibility with the NumPy. That's why reversion of my changes in 3.15 and struct (deprecation) looks better for me. Lets wait decision on a PEP. Then extend the struct module in The Right Way. Then adapt other stuff. This PR does make sense only on this kind of road. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Converting an $ python3.15 >>> import array, numpy as np >>> a=array.array('Zd', [0]) >>> a.typecode 'Zd' >>> n=np.array(a) >>> n.dtype dtype('complex128') Converting a I suggest continuing this discussion at https://discuss.python.org/t/choice-of-complex-buffer-protocol-format-intentional-break-with-pep/106949. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.