From 91f2dacbcce14d3dbc7519bcbff61d1da5ebcb00 Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:05:58 +0100 Subject: [PATCH] Use truststore on Windows in Python 3.10+ --- main.py | 2 +- requirements.txt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 9ad5d4e5..f87c60d9 100644 --- a/main.py +++ b/main.py @@ -18,7 +18,7 @@ from tkinter import messagebox from typing import IO, NoReturn - if sys.platform == "linux" and sys.version_info >= (3, 10): + if sys.version_info >= (3, 10): import truststore truststore.inject_into_ssl() diff --git a/requirements.txt b/requirements.txt index 9f59ae44..a603ecb8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,11 @@ aiohttp>=3.9,<4.0 Pillow pystray PyGObject; sys_platform == "linux" # required for better system tray support on Linux + +# environment-dependent dependencies +pywin32; sys_platform == "win32" +truststore; python_version >= "3.10" + +# unused dependencies # selenium-wire # undetected-chromedriver -# this is installed only on windows -pywin32; sys_platform == "win32" -truststore; sys_platform == "linux" and python_version >= "3.10"