From 3fe8781f8423d6cd266af1c9a3f86ab9441e1f19 Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Sun, 17 Sep 2023 15:38:18 +0100
Subject: [PATCH] fix(py3.12): `SafeConfigParser` -> `ConfigParser`
`SafeConfigParser` was deprecated in 3.2 and has been removed.
Reference:
https://docs.python.org/3.12/whatsnew/3.12.html#configparser
---
vit/config_parser.py | 2 +-
vit/keybinding_parser.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/vit/config_parser.py b/vit/config_parser.py
index dcc3afc..6e05969 100644
--- a/vit/config_parser.py
+++ b/vit/config_parser.py
@@ -100,7 +100,7 @@
class ConfigParser:
def __init__(self, loader):
self.loader = loader
- self.config = configparser.SafeConfigParser()
+ self.config = configparser.ConfigParser()
self.config.optionxform = str
self.user_config_dir = self.loader.user_config_dir
self.user_config_filepath = '%s/%s' % (self.user_config_dir, VIT_CONFIG_FILE)
diff --git a/vit/keybinding_parser.py b/vit/keybinding_parser.py
index a0c36d0..7a0c857 100644
--- a/vit/keybinding_parser.py
+++ b/vit/keybinding_parser.py
@@ -31,7 +31,7 @@ def __init__(self, loader, config, action_registry):
self.actions = self.action_registry.get_actions()
self.noop_action_name = self.action_registry.make_action_name(self.action_registry.noop_action_name)
self.default_keybinding_name = self.config.get('vit', 'default_keybindings')
- self.default_keybindings = configparser.SafeConfigParser()
+ self.default_keybindings = configparser.ConfigParser()
self.default_keybindings.optionxform=str
self.sections = DEFAULT_KEYBINDINGS_SECTIONS
self.keybindings = {}