Closed michalhabera closed 1 week ago
Thanks for noticing this problem! It's a regression caused by the recent Windows compatibility changes. It should be fixed in PR #111, if you want to check it out.
@michalhabera are you able to verify that the fix in #111 corrects the issue you're seeing?
Assuming your test host has compilers/headers installed, you can install the PR merge target directly for testing with (your python interpreter here) -m pip install cffi@git+https://github.com/python-cffi/cffi.git@refs/pull/111/merge -v
:
(tmp-71ffbd6e6119430) mdavis@mdavis-p1:/tmp$ python3.12 -m pip install cffi@git+https://github.com/python-cffi/cffi.git@refs/pull/111/merge -v
Using pip 24.2 from /home/mdavis/.virtualenvs/tmp-71ffbd6e6119430/lib/python3.12/site-packages/pip (python 3.12)
Collecting cffi@ git+https://github.com/python-cffi/cffi.git@refs/pull/111/merge
(...)
Building wheels for collected packages: cffi
(...)
Successfully built cffi
Installing collected packages: pycparser, cffi
Successfully installed cffi-1.18.0.dev0 pycparser-2.22
(tmp-71ffbd6e6119430) mdavis@mdavis-p1:/tmp$ python3.12 -m pip show cffi
Name: cffi
Version: 1.18.0.dev0
(...)
If you can install the proposed fix branch that way and verify locally that the fix works for you, we can get that merged for 1.18.0, and possibly backport for a future 1.17.2. Thanks!
Thanks @arigo, @nitzmahone ! I can confirm #111 fixes the issue.
(also created a 1.17 backport at #127)
As of version 1.17.0
python3 -c "import cffi; ffi = cffi.FFI(); print(ffi.typeof('double _Complex'))"
gives mewhile for 1.16.0 this worked. I've also noticed that CompiledFFI that has complex types declared does recognize complex types. Did complex types cache go missing with recent changes or is this behaviour on purpose (for Win platform compatibility)?