Skip to content

Commit e6dff1b

Browse files
Eeshan Gargtimabbott
Eeshan Garg
authored andcommitted
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().
1 parent 7c3967f commit e6dff1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

zulip/zulip/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import traceback
1111
import types
1212
import urllib.parse
13-
from configparser import SafeConfigParser
13+
from configparser import ConfigParser
1414
from typing import (
1515
IO,
1616
Any,
@@ -425,9 +425,9 @@ def __init__(
425425
config_file = get_default_config_filename()
426426

427427
if config_file is not None and os.path.exists(config_file):
428-
config = SafeConfigParser()
428+
config = ConfigParser()
429429
with open(config_file) as f:
430-
config.readfp(f, config_file)
430+
config.read_file(f, config_file)
431431
if api_key is None:
432432
api_key = config.get("api", "key")
433433
if email is None:

0 commit comments

Comments
 (0)