This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients lawrence-danna-apple, lazymio, ned.deily, ronaldoussoren
Date 2021-01-11.16:10:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610381447.62.0.178180174006.issue42880@roundup.psfhosted.org>
In-reply-to
Content
> Seems that we are getting the same libffi.dylib.

I suppose it is still possible that another libffi is being found first. To be absolutely sure, you could ask dyld to print the loaded libraries:

$ DYLD_PRINT_LIBRARIES=1 python3.9 test_main.py
[...]
dyld: loaded: <003A027D-9CE3-3794-A319-88495844662D> /usr/lib/system/libxpc.dylib
dyld: loaded: <7FBC5290-B2B3-3312-B69A-77378C539520> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_ctypes.cpython-39-darwin.so
dyld: loaded: <943473A5-A82B-3E21-8EB3-0BBDF5E605AA> /usr/lib/libffi.dylib
dyld: loaded: <58910956-4F2F-363A-80E5-D5E1C71DD83E> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_struct.cpython-39-darwin.so
dyld: loaded: <3444F392-DB43-3AEF-8596-2BFFBBD8EC0C> ./main.dylib
34

But, more importantly, the uname -a output for my M1 is:

Darwin ankl.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 x86_64

Perhaps you have not updated to macOS 11.1 yet?
 
By the way, in your original message's last example, is the output really "3"?
History
Date User Action Args
2021-01-11 16:10:47ned.deilysetrecipients: + ned.deily, ronaldoussoren, lawrence-danna-apple, lazymio
2021-01-11 16:10:47ned.deilysetmessageid: <1610381447.62.0.178180174006.issue42880@roundup.psfhosted.org>
2021-01-11 16:10:47ned.deilylinkissue42880 messages
2021-01-11 16:10:47ned.deilycreate