deepdrone / drone /compatibility_fix.py
evangelosmeklis's picture
Initial commit with clean project structure
bd61f34
raw
history blame contribute delete
573 Bytes
"""
Compatibility fix for 'collections.MutableMapping' error in Python 3.10+
This script patches the collections module to provide MutableMapping
for libraries that import it directly from collections rather than collections.abc
"""
import sys
import collections
import collections.abc
# Only apply the patch for Python 3.10 and above
if sys.version_info >= (3, 10):
# Add MutableMapping to collections for backward compatibility
collections.MutableMapping = collections.abc.MutableMapping
print("Applied compatibility patch for collections.MutableMapping")