tinyman-py-sdk icon indicating copy to clipboard operation
tinyman-py-sdk copied to clipboard

importlib read_text and open_text are depreciated in python 3.11

Open AaronColman opened this issue 2 years ago • 0 comments

Starting in python 3.11 importlib's read_text and open_text are deprecated with a warning...

DeprecationWarning: read_text is deprecated. Use files() instead. self._contracts = json.loads(importlib.resources.read_text(tinyman.v1, 'asc.json'))

DeprecationWarning: open_text is deprecated. Use files() instead. with open_text(package, resource, encoding, errors) as fp:

Py 3.11 is already available for Ubuntu, and the newest version of Debian is expected to carry it as well. So this might matter soon.

AaronColman avatar Mar 03 '23 16:03 AaronColman