Skip to content

Commit fc3d8fe

Browse files
committed
Updates for Python 3.10
1 parent dad5bae commit fc3d8fe

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CONST_abated.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ def load_from_yaml(yaml_configuration_file, const_object):
2121
fin = open(yaml_configuration_file, 'r')
2222
raw_yaml = fin.read()
2323
fin.close()
24-
__populate_object(const_object, yaml.load(raw_yaml))
24+
__populate_object(const_object, yaml.load(raw_yaml, Loader=yaml.SafeLoader))
2525
except IOError as e:
2626
logging.error('Could not open config file %s. Bailing out.' % yaml_configuration_file)
2727
raise e
2828
except yaml.scanner.ScannerError as e:
2929
logging.error('Syntax error in %s. Bailing out.' % yaml_configuration_file)
3030
raise e
3131

32-
# TODO: load_from_json
32+
# TODO: load_from_json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Visit [PyTerraBackTYL Docker Hub page](https://hub.docker.com/r/devdull/pyterrab
1212

1313
## Quickstart:
1414
### Requirements:
15-
- PyTerraBackTYL was developed using Python 3.6 and is subsequently recommended, but 3.4 and 3.5 have been tested and known to work well.
15+
- PyTerraBackTYL was developed using Python 3.6 and has since been updated to require Python 3.10. Please open a GitHub Isssue for any Python changes that have broken functionality.
1616
- flask
1717
- pyyaml
1818
- jsonpath

pyterrabacktyl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import abc_tylstore
66

77
from CONSTS import C
8-
from collections import Iterable
8+
from collections.abc import Iterable
99
from importlib import import_module
1010
from flask import Flask, request, jsonify
1111

0 commit comments

Comments
 (0)