From 321f4ca326dad25690a5cee37fed63589088b034 Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 21:41:38 +0300 Subject: [PATCH 1/8] Update pytesseract to version 0.3.13 Signed-off-by: Sysoev, Vladimir --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7e714278..8c08c9b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ numpy>=1.21.6 Pillow==10.3.0 pyautogui==0.9.54 pyperclip==1.8.2 -pytesseract==0.3.10 +pytesseract==0.3.13 pytest==7.2.2 hdbscan==0.8.40 python_Levenshtein==0.20.9 From 821ce07aa1d7cfe9877960e3acdcaeec487c9866 Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 21:44:20 +0300 Subject: [PATCH 2/8] Resolved dependabot alert CVE-2020-1747 A vulnerability was discovered in the PyYAML library in versions before 5.4, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. This flaw allows an attacker to execute arbitrary code on the system by abusing the python/object/new constructor. This flaw is due to an incomplete fix for CVE-2020-1747. Signed-off-by: Sysoev, Vladimir --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8c08c9b9..4c0bff46 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,5 +10,5 @@ colorama==0.4.6 opencv-python==4.10.0.84 mss==9.0.1 qat==1.1.2 -pyyaml==5.3.1 +pyyaml==5.4 pyscreeze==0.1.21 \ No newline at end of file From d7be9b0bfa62760f536bdfe5e1feb19d0ba7f09b Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 21:49:03 +0300 Subject: [PATCH 3/8] Update version for greater than Signed-off-by: Sysoev, Vladimir --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4c0bff46..dc94e920 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ numpy>=1.21.6 Pillow==10.3.0 pyautogui==0.9.54 pyperclip==1.8.2 -pytesseract==0.3.13 +pytesseract>=0.3.13 pytest==7.2.2 hdbscan==0.8.40 python_Levenshtein==0.20.9 @@ -10,5 +10,5 @@ colorama==0.4.6 opencv-python==4.10.0.84 mss==9.0.1 qat==1.1.2 -pyyaml==5.4 +pyyaml>=5.4 pyscreeze==0.1.21 \ No newline at end of file From bd0600ff60d98cf0d205ffcefd5148554e11f732 Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 21:53:51 +0300 Subject: [PATCH 4/8] Fixed deprecated classifier SetuptoolsDeprecationWarning: License classifiers are deprecated. Signed-off-by: Sysoev, Vladimir --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2da11522..d0277a4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ readme = "README.md" requires-python = ">=3.9" classifiers = [ "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", ] dependencies = [ 'pyautogui', From c0bbdd265d773bac1b06381b584d38ae8f42e9e1 Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 21:58:51 +0300 Subject: [PATCH 5/8] Fixed CI issues reported Signed-off-by: Sysoev, Vladimir --- docs/requirements.txt | 4 ++-- tests/find/gen.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index b1c3d39d..3ffe7dad 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,7 +5,7 @@ numpy>=1.21.6 Pillow==10.3.0 pyautogui==0.9.54 pyperclip==1.8.2 -pytesseract==0.3.10 +pytesseract>=0.3.13 pytest==7.2.2 hdbscan==0.8.40 python_Levenshtein==0.20.9 @@ -13,5 +13,5 @@ colorama==0.4.6 opencv-python==4.10.0.84 mss==9.0.1 qat==1.1.2 -pyyaml==5.4.1 +pyyaml>=5.4.1 pyscreeze==0.1.21 \ No newline at end of file diff --git a/tests/find/gen.py b/tests/find/gen.py index 9e674a78..6055deae 100644 --- a/tests/find/gen.py +++ b/tests/find/gen.py @@ -23,7 +23,6 @@ def wrapper(): def gen(filename, w, h, font='', size=16, text='', crop=False): - global count img = Image.open(f'tests/find/background/{filename}.jpg') if crop: img = crop_image(img, 600, 600) From 36d4385a49e2347077f842883d0b4a37ca6cd1ce Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 22:24:28 +0300 Subject: [PATCH 6/8] Probably fix test_pygats Signed-off-by: Sysoev, Vladimir --- tests/test_pygats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pygats.py b/tests/test_pygats.py index 3593860f..eaca5016 100644 --- a/tests/test_pygats.py +++ b/tests/test_pygats.py @@ -98,7 +98,7 @@ def test_random_string(string_length, character_set, expectation): def test_locate_on_screen(img_path, expectation, ctx_formatter, gen_photo): """Test locate_on_screen""" ctx = ctx_formatter - gen_photo + gen_photo() with expectation: print("Проверяем изображение:", img_path) if not os.path.exists(img_path): From fd20ece6693d5865f6e086d47130c4716e99eb0b Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 22:36:43 +0300 Subject: [PATCH 7/8] Removing fixture from test parameter Signed-off-by: Sysoev, Vladimir --- tests/test_pygats.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_pygats.py b/tests/test_pygats.py index eaca5016..aa552c2c 100644 --- a/tests/test_pygats.py +++ b/tests/test_pygats.py @@ -95,10 +95,9 @@ def test_random_string(string_length, character_set, expectation): ("pygats/failed.png", pytest.raises(pyg.TestException)), ] ) -def test_locate_on_screen(img_path, expectation, ctx_formatter, gen_photo): +def test_locate_on_screen(img_path, expectation, ctx_formatter): """Test locate_on_screen""" ctx = ctx_formatter - gen_photo() with expectation: print("Проверяем изображение:", img_path) if not os.path.exists(img_path): From 7ecd7d77e61374832888f29bad0f7fd38e7eb836 Mon Sep 17 00:00:00 2001 From: "Sysoev, Vladimir" Date: Tue, 20 May 2025 23:01:17 +0300 Subject: [PATCH 8/8] fix linter issue Signed-off-by: Sysoev, Vladimir --- tests/test_pygats.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_pygats.py b/tests/test_pygats.py index aa552c2c..35025040 100644 --- a/tests/test_pygats.py +++ b/tests/test_pygats.py @@ -98,6 +98,7 @@ def test_random_string(string_length, character_set, expectation): def test_locate_on_screen(img_path, expectation, ctx_formatter): """Test locate_on_screen""" ctx = ctx_formatter + dummy = gen_photo with expectation: print("Проверяем изображение:", img_path) if not os.path.exists(img_path):