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
This commit is contained in:
parent
590984f897
commit
a0da2fadc4
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user