]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: replace deprecated PyImport_ImportModuleNoBlock with PyImport_ImportModule 68085/head
authorKefu Chai <k.chai@proxmox.com>
Sun, 29 Mar 2026 06:23:31 +0000 (14:23 +0800)
committerKefu Chai <k.chai@proxmox.com>
Sun, 29 Mar 2026 06:27:35 +0000 (14:27 +0800)
commita89074c6bee999a10952c24c5b6afc2bc05e54bf
tree5caff2e4e92d75e48949079b74883739d0be78ac
parent0e10249fcafeca4c140b27c0c9ee841d8db8bb35
mgr: replace deprecated PyImport_ImportModuleNoBlock with PyImport_ImportModule

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>
src/mgr/PyModule.cc