PyImport_ImportModuleNoBlock was deprecated in Python 3.13:
PyModule.cc:374:21: warning: 'PyImport_ImportModuleNoBlock' is deprecated
[-Wdeprecated-declarations]
The "no block" variant was introduced to avoid deadlocking on Python 2's
single global import lock, but Python 3's per-module locking (since
3.3) made the distinction meaningless. PyImport_ImportModule is the
direct replacement and is compatible with all Python versions.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
int r;
- pPickleModule = PyImport_ImportModuleNoBlock("pickle");
+ pPickleModule = PyImport_ImportModule("pickle");
if (!pPickleModule) {
derr << "Unable to load pickle" << dendl;
return -EINVAL;