From 8be50d310dbaae2bf1d76d350d0a4af1e0f053e6 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Tue, 2 Apr 2019 13:35:59 +0200 Subject: [PATCH] update and cleanup dependencies -- load YAML safely --- add.py | 2 +- main.py | 4 ++-- requirements.txt | 20 +++++++------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/add.py b/add.py index df2a3dd..c33fb45 100644 --- a/add.py +++ b/add.py @@ -3,7 +3,7 @@ import yaml from urllib.parse import urlparse with open("sites.yaml", 'r') as stream: - sites = yaml.load(stream) + sites = yaml.safe_load(stream) try: name = sys.argv[1] diff --git a/main.py b/main.py index d5e6dbe..33b4d25 100644 --- a/main.py +++ b/main.py @@ -21,7 +21,7 @@ logger.setLevel(logging.DEBUG) with open("config.yaml", 'r') as stream: try: - config = yaml.load(stream) + config = yaml.safe_load(stream) except (yaml.YAMLError, FileNotFoundError) as exception: config = None exit(1) @@ -49,7 +49,7 @@ if "sentry_url" in config and ("debug" not in config or not config["debug"]): with open("sites.yaml", 'r') as stream: try: - sites = yaml.load(stream) + sites = yaml.safe_load(stream) except (yaml.YAMLError, FileNotFoundError) as exception: logger.error(exception) sites = None diff --git a/requirements.txt b/requirements.txt index 064bd8d..e2e1890 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,11 @@ -aiodns==1.1.1 -aiohttp==3.4.4 +aiohttp==3.5.4 async-timeout==3.0.1 -attrs==18.2.0 -certifi==2018.10.15 +attrs==19.1.0 chardet==3.0.4 feedparser==5.2.1 -idna==2.7 -idna-ssl==1.1.0 -multidict==4.4.2 -pycares==2.3.0 -PyYAML==3.13 -raven==6.9.0 -requests==2.20.1 -urllib3==1.24.1 +idna==2.8 +multidict==4.5.2 +PyYAML==5.1 +raven==6.10.0 wallabag-api==1.2.3 -yarl==1.2.6 +yarl==1.3.0