11import copy
2- import collections
2+ import collections . abc
33
44import json
55from json .encoder import (
2727 UNDEFINED_CONF_KEY : "No configuration named '{conf}' found in"
2828 " CKEDITOR_CONFIGS setting." ,
2929 INVALID_CONF_TYPE : "CKEDITOR_CONFIGS setting must be an instance"
30- " of collections.Mapping (e.g. dict), instead "
30+ " of collections.abc. Mapping (e.g. dict), instead "
3131 " found {type}" ,
3232 INVALID_CONF_KEY_TYPE : "CKEDITOR_CONFIGS['{conf}'] setting must be an"
33- " instance of collections.Mapping (e.g. dict),"
33+ " instance of collections.abc. Mapping (e.g. dict),"
3434 " instead found {type}" ,
3535}
3636
@@ -41,7 +41,7 @@ def validate_config(config_name='default', config=None, instance=None):
4141 if config_name :
4242 if not ck_settings .CONFIGS :
4343 raise ImproperlyConfigured (error_msgs [UNDEFINED_CONF ])
44- if not isinstance (ck_settings .CONFIGS , collections .Mapping ):
44+ if not isinstance (ck_settings .CONFIGS , collections .abc . Mapping ):
4545 raise ImproperlyConfigured (error_msgs [INVALID_CONF_TYPE ].format (
4646 type = type (ck_settings .CONFIGS ).__name__ ))
4747
@@ -51,7 +51,7 @@ def validate_config(config_name='default', config=None, instance=None):
5151 raise ImproperlyConfigured (
5252 error_msgs [UNDEFINED_CONF_KEY ].format (conf = config_name ))
5353
54- if not isinstance (named_config , collections .Mapping ):
54+ if not isinstance (named_config , collections .abc . Mapping ):
5555 raise ImproperlyConfigured (
5656 error_msgs [INVALID_CONF_KEY_TYPE ].format (
5757 conf = config_name ,
0 commit comments