From e6dff1b5b6a9c6851d6c6699c2c52f345a4f486e Mon Sep 17 00:00:00 2001 From: Eeshan Garg Date: Tue, 28 Dec 2021 19:32:04 -0500 Subject: [PATCH] zulip: Fix deprecation warnings for SafeConfigParser and readfp. SafeConfigParser has been renamed to ConfigParser and the method SafeConfigParser.readfp() is now named ConfigParser.read_file(). --- zulip/zulip/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 6ad580d..4b48293 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -10,7 +10,7 @@ import time import traceback import types import urllib.parse -from configparser import SafeConfigParser +from configparser import ConfigParser from typing import ( IO, Any, @@ -425,9 +425,9 @@ class Client: config_file = get_default_config_filename() if config_file is not None and os.path.exists(config_file): - config = SafeConfigParser() + config = ConfigParser() with open(config_file) as f: - config.readfp(f, config_file) + config.read_file(f, config_file) if api_key is None: api_key = config.get("api", "key") if email is None: