diff --git a/changelogs/fragments/54974-rename-safeconfigparser-to-configparser.yaml b/changelogs/fragments/54974-rename-safeconfigparser-to-configparser.yaml new file mode 100644 index 0000000000..76c0698b2a --- /dev/null +++ b/changelogs/fragments/54974-rename-safeconfigparser-to-configparser.yaml @@ -0,0 +1,2 @@ +minor_changes: + - rename safeConfigParser to ConfigParser to suppress DeprecationWarning (The SafeConfigParser class has been renamed to ConfigParser in Python 3.2.) diff --git a/contrib/inventory/gce.py b/contrib/inventory/gce.py index 89a08fbd13..0a7df3f52a 100755 --- a/contrib/inventory/gce.py +++ b/contrib/inventory/gce.py @@ -184,7 +184,7 @@ class GceInventory(object): """ Reads the settings from the gce.ini file. - Populates a SafeConfigParser object with defaults and + Populates a ConfigParser object with defaults and attempts to read an .ini-style configuration from the filename specified in GCE_INI_PATH. If the environment variable is not present, the filename defaults to gce.ini in the current @@ -198,7 +198,7 @@ class GceInventory(object): # This provides empty defaults to each key, so that environment # variable configuration (as opposed to INI configuration) is able # to work. - config = configparser.SafeConfigParser(defaults={ + config = configparser.ConfigParser(defaults={ 'gce_service_account_email_address': '', 'gce_service_account_pem_file_path': '', 'gce_project_id': '',