Description of problem: Installing lmdb in Rawhide produces an un-importable package. Version-Release number of selected component (if applicable): $ rpm -q python3-lmdb python3-lmdb-1.0.0-2.fc35.x86_64 Steps to Reproduce: 1. mock -r fedora-rawhide-x86_64 --install python3-lmdb (may need --enablerepo=local right now) 2. mock -r fedora-rawhide-x86_64 --shell 3. python3 -c 'import lmdb' Actual results: Traceback (most recent call last): File "/usr/lib64/python3.10/site-packages/lmdb/__init__.py", line 42, in <module> from lmdb.cpython import * ImportError: /usr/lib64/python3.10/site-packages/lmdb/cpython.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyObject_AsReadBuffer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python3.10/site-packages/lmdb/__init__.py", line 48, in <module> from lmdb.cffi import * File "/usr/lib64/python3.10/site-packages/lmdb/cffi.py", line 353, in <module> import cffi ModuleNotFoundError: No module named 'cffi' Expected results: The CPython extension uses API that was removed in Python 3.10. It should be updated to not use it. If this cannot be done, the fallback to cffi should be fixed by adding a dependency on cffi.
PyObject_AsReadBuffer: bpo-41103: PyObject_AsCharBuffer(), PyObject_AsReadBuffer(), PyObject_CheckReadBuffer(), and PyObject_AsWriteBuffer() are removed. Please migrate to new buffer protocol; PyObject_GetBuffer() and PyBuffer_Release(). https://docs.python.org/3.10/whatsnew/3.10.html#id4
I added a patch to the upstream commit that should make py-lmdb compile and work as it did on 3.9. I do hope upstream comes up with a better fix, though.
With Python 3.10.0rc1, this works again. https://bugs.python.org/issue41103 https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-zict/
FEDORA-2021-47a24beeaa has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.