summaryrefslogtreecommitdiff
path: root/trove
diff options
context:
space:
mode:
authorHirotaka Wakabayashi <hiwkby@yahoo.com>2022-03-13 15:24:16 +0900
committerHirotaka Wakabayashi <hiwkby@yahoo.com>2022-03-20 02:40:37 +0000
commita0da2fadc4c871a4359830ef37bb4582b4043cb9 (patch)
tree23df6c01e58776f64e1e11b7433288339aa56f6e /trove
parent590984f897de15514e01ecd29c6b9ef8b0e76140 (diff)
downloadtrove-a0da2fadc4c871a4359830ef37bb4582b4043cb9.tar.gz
Stop using deprecated functions in std Python lib
This PR stops using the following deprecated functions in std Python lib. * parser.readfp We should use parser.read_file(readline_generator(fp))[1]. * importing modules from collections directly. We should use collections.abc instead of using collections directly.[2] -- [1]: https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.readfp [2]: https://github.com/python/cpython/pull/5460 Task: 44767 Story: 2009917 Change-Id: I61bf4299ad2acd8ee26b4aab66875b10287020e1
Diffstat (limited to 'trove')
-rw-r--r--trove/common/stream_codecs.py2
-rw-r--r--trove/tests/config.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/trove/common/stream_codecs.py b/trove/common/stream_codecs.py
index ab5a60b7..a70f9b5f 100644
--- a/trove/common/stream_codecs.py
+++ b/trove/common/stream_codecs.py
@@ -207,7 +207,7 @@ class IniCodec(StreamCodec):
def deserialize(self, stream):
parser = self._init_config_parser()
- parser.readfp(self._pre_parse(stream))
+ parser.read_file(self._pre_parse(stream))
return {s: {k:
StringConverter({None: self._default_value}).to_objects(v)
diff --git a/trove/tests/config.py b/trove/tests/config.py
index 49d97c3e..1d21207d 100644
--- a/trove/tests/config.py
+++ b/trove/tests/config.py
@@ -21,7 +21,7 @@ environments if we choose to.
"""
-from collections import Mapping
+from collections.abc import Mapping
from datetime import datetime
import json
import os