From 98ce6c6d4c0ec1510ce2048af6d3eec7015e5aa1 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 11:42:09 -0600 Subject: [PATCH 01/34] Add current python versions to testing Add current python versions to testing last tested was 3.8 now current is 3.11 --- .appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 2b7af1b..dc76ee3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,6 +5,9 @@ environment: - PYTHON: "C:\\PYTHON36" - PYTHON: "C:\\PYTHON37" - PYTHON: "C:\\PYTHON38" + - PYTHON: "C:\\PYTHON39" + - PYTHON: "C:\\PYTHON310" + - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" build: off From 6ea7117e0134b1862530bdbcd0a6a9ad4a96f7dc Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 11:49:10 -0600 Subject: [PATCH 02/34] update to image: Visual Studio 2022 image: Visual Studio 2022 or 2019 is needed for python 3.10 and 3.11 see https://www.appveyor.com/docs/windows-images-software/#python --- .appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index dc76ee3..b741f28 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,3 +1,5 @@ +image: + - Visual Studio 2022 environment: matrix: - PYTHON: "C:\\PYTHON34" From 082e04f3a5f9cb95313049c81e6fc60360271e42 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 15:09:35 -0600 Subject: [PATCH 03/34] force update PIP to attempt pillow fix for py3.8+ force update PIP to attempt pillow wheel build fix for python 3.8 and newer. --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index b741f28..bf509ec 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,6 +11,7 @@ environment: - PYTHON: "C:\\PYTHON310" - PYTHON: "C:\\PYTHON311" install: + - "%PYTHON%\\python.exe -m pip install --upgrade pip - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" build: off test_script: From 50f2b7126a8550a1a118e668c7adf6ec8ab4e0c5 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 15:12:30 -0600 Subject: [PATCH 04/34] fix small syntax error missing end quote from line 14 prevented last change from building due to syntax error --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bf509ec..95c7fda 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,5 @@ image: - - Visual Studio 2022 + - Visual Studio 2022 environment: matrix: - PYTHON: "C:\\PYTHON34" @@ -11,7 +11,7 @@ environment: - PYTHON: "C:\\PYTHON310" - PYTHON: "C:\\PYTHON311" install: - - "%PYTHON%\\python.exe -m pip install --upgrade pip + - "%PYTHON%\\python.exe -m pip install --upgrade pip" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" build: off test_script: From 8929ae6d32090534ccfa1720828e7aea76b93e5f Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 15:39:51 -0600 Subject: [PATCH 05/34] zlib is required for pillow Should address the following error in python 3.8+ ```cmd The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source. note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pillow Failed to build pillow ERROR: Could not build wheels for pillow, which is required to install pyproject.toml-based projects ``` --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 95c7fda..426b63f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,7 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip" - - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" + - "%PYTHON%\\python.exe -m pip install zlib codecov coverage nose pillow pynput babel" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 82bcbd062a10721632dcd01e43fc7fc6d4ce47a2 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 15:53:55 -0600 Subject: [PATCH 06/34] remove py3.4 and 3.5 DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429). DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. zlib is not a python pip module attempt fixing pip issues by also upgrading setuptools and wheel --- .appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 426b63f..46bdb2a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,8 +2,6 @@ image: - Visual Studio 2022 environment: matrix: - - PYTHON: "C:\\PYTHON34" - - PYTHON: "C:\\PYTHON35" - PYTHON: "C:\\PYTHON36" - PYTHON: "C:\\PYTHON37" - PYTHON: "C:\\PYTHON38" @@ -11,8 +9,8 @@ environment: - PYTHON: "C:\\PYTHON310" - PYTHON: "C:\\PYTHON311" install: - - "%PYTHON%\\python.exe -m pip install --upgrade pip" - - "%PYTHON%\\python.exe -m pip install zlib codecov coverage nose pillow pynput babel" + - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" + - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 676916b75ff6591f6dd15e89d5bde88a7ba3f5a1 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 16:04:53 -0600 Subject: [PATCH 07/34] Try installing Pillow separately Try installing Pillow separately as it's failing to see zlib --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 46bdb2a..64aaf4c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,7 +10,8 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" + - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" + - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 8adc3816559ac526a5a281ba2a7bf8ad2a9c5e62 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 16:26:38 -0600 Subject: [PATCH 08/34] try Pillow --disable-zlib not finding a way to install zlib on appveyor trying `--disable-zlib` --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 64aaf4c..227b7e3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,7 +10,7 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" + - "%PYTHON%\\python.exe -m pip install --upgrade Pillow --disable-zlib" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" build: off test_script: From 1274c30f06dd1f6fdca8dc1b16846f8b58a233bc Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 16:32:46 -0600 Subject: [PATCH 09/34] remove --disable-zlib `no such option: --disable-zlib` Syntax for this option must be different --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 227b7e3..64aaf4c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,7 +10,7 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install --upgrade Pillow --disable-zlib" + - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" build: off test_script: From f082880f49cfed434f8b1b1ebca5131d9ed11e92 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 17:58:54 -0600 Subject: [PATCH 10/34] attempt to print the babel version for diagnosis --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index 64aaf4c..f7e95e9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,6 +12,7 @@ install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" + - "%PYTHON%\\python.exe -c "print(babel.__version__)"" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 9e1fba8ab1b504d568d810f7771c6397fcd9fcf0 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:05:53 -0600 Subject: [PATCH 11/34] install zlib for pillow using chocolatey Appveyor is using a windows build environment. In a Windows environment, you can use Chocolatey to install the required libraries. --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index f7e95e9..2b6aea2 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,6 +9,7 @@ environment: - PYTHON: "C:\\PYTHON310" - PYTHON: "C:\\PYTHON311" install: + - choco install zlib - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" From 989b8accd1bd79b988e05c977056aa9649a20e07 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:17:58 -0600 Subject: [PATCH 12/34] try without - "%PYTHON%\\python.exe -c "print(babel.__version__)"" - "%PYTHON%\\python.exe -c "print(babel.__version__)"" caused a parsing error Error parsing appveyor.yml: (Line: 16, Col: 31, Idx: 500) - (Line: 16, Col: 57, Idx: 526): While parsing a block collection, did not find expected '-' indicator. --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2b6aea2..39ddc36 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,7 +13,6 @@ install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" - - "%PYTHON%\\python.exe -c "print(babel.__version__)"" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 29bc03c02e8bf5e5e275a36ef215d8fd264b2133 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:27:09 -0600 Subject: [PATCH 13/34] remove choco import of zlib zlib is not available under choco try babel version printing again --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 39ddc36..719d5be 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,10 +9,10 @@ environment: - PYTHON: "C:\\PYTHON310" - PYTHON: "C:\\PYTHON311" install: - - choco install zlib - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" + - "%PYTHON%\\python.exe -c "import babel; print(babel.__version__)"" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 8e0890d0a5b0dd44babcce94e9c6082a11895226 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:29:41 -0600 Subject: [PATCH 14/34] try single quote for inner quote the double quotes within double quotes, was causing a parsing error. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 719d5be..17a26f9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,7 @@ install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" - - "%PYTHON%\\python.exe -c "import babel; print(babel.__version__)"" + - "%PYTHON%\\python.exe -c 'import babel; print(babel.__version__)'" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 04b78db5eec1c6afe3656aa07fdca64a8d80995e Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:33:05 -0600 Subject: [PATCH 15/34] try escaping single quotes --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 17a26f9..fac36e4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,7 @@ install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" - - "%PYTHON%\\python.exe -c 'import babel; print(babel.__version__)'" + - "%PYTHON%\\python.exe -c \"import babel; print(babel.__version__)\"" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From b3b25a055f75183b20557d755da3bd314ff6e738 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:46:14 -0600 Subject: [PATCH 16/34] printing babel version is not needed babel version is revealed in the pip installs --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index fac36e4..64aaf4c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,6 @@ install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" - - "%PYTHON%\\python.exe -c \"import babel; print(babel.__version__)\"" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From ad39283ee8599e210d1ae840a8ce06215bc8d903 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 18:52:32 -0600 Subject: [PATCH 17/34] try different syntax to disable zlib in pillow --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 64aaf4c..5c02e9a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,7 +10,7 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" + - "%PYTHON%\\python.exe -m pip install --upgrade Pillow -C zlib=disable" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" build: off test_script: From c26a893b23f438539e347c2aa0cc3f51e16b3057 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Wed, 4 Oct 2023 19:03:47 -0600 Subject: [PATCH 18/34] no such option: -C --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5c02e9a..64aaf4c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,7 +10,7 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install --upgrade Pillow -C zlib=disable" + - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" build: off test_script: From 97b84ad8406345611275411967fc38d556a9be4c Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 10:08:35 -0600 Subject: [PATCH 19/34] attempt force update of babel --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 64aaf4c..788b6c3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,8 +10,8 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install --upgrade Pillow" - - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput babel" + - "%PYTHON%\\python.exe -m pip install --upgrade Pillow babel" + - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From 42f0a48390bacc8510f963dd21a5f53a8276db32 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 10:18:38 -0600 Subject: [PATCH 20/34] upgrade of pip libraries did not solve errors just use standard installs as upgrade of pip libraries did not solve errors --- .appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 788b6c3..46bdb2a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,8 +10,7 @@ environment: - PYTHON: "C:\\PYTHON311" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install --upgrade Pillow babel" - - "%PYTHON%\\python.exe -m pip install codecov coverage nose pynput" + - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." From fa8807decba1db9c75183af0f3998f788a7c14af Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 10:50:22 -0600 Subject: [PATCH 21/34] diagnose babel error with print statement see if printing the value of self._textvariable.get() will reveal the source of the babel error --- tkcalendar/calendar_.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tkcalendar/calendar_.py b/tkcalendar/calendar_.py index b3cecab..fb783c8 100644 --- a/tkcalendar/calendar_.py +++ b/tkcalendar/calendar_.py @@ -265,6 +265,7 @@ def __init__(self, master=None, **kw): if self._textvariable is not None: # the variable overrides day, month and year keywords try: + print(self._textvariable.get()) self._sel_date = parse_date(self._textvariable.get(), locale) month = self._sel_date.month year = self._sel_date.year From 0244c364ede62e5daa052b76865f0d079502cf4d Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 10:56:58 -0600 Subject: [PATCH 22/34] try sys.stdout.write() appveyor does not output values from print, try sys.stdout.write() --- tkcalendar/calendar_.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tkcalendar/calendar_.py b/tkcalendar/calendar_.py index fb783c8..f8aedfe 100644 --- a/tkcalendar/calendar_.py +++ b/tkcalendar/calendar_.py @@ -23,7 +23,7 @@ Calendar widget """ - +import sys import calendar try: from tkinter import ttk @@ -265,7 +265,7 @@ def __init__(self, master=None, **kw): if self._textvariable is not None: # the variable overrides day, month and year keywords try: - print(self._textvariable.get()) + sys.stdout.write(self._textvariable.get()) self._sel_date = parse_date(self._textvariable.get(), locale) month = self._sel_date.month year = self._sel_date.year From 2dd062214f1394b725c47b5a9d2743ee4f62d3e6 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 11:06:27 -0600 Subject: [PATCH 23/34] Ignore external libraries external libraries should not be part of code coverage and tests. --- .codecov.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.codecov.yml b/.codecov.yml index 00429d1..84a0fdb 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -8,4 +8,9 @@ coverage: project: default: target: '80' + ignore: + - "babel" + - "ctypes" + - "pynput" + - "pytz" comment: false From 8a13324bd587fc40fccd163a93510f2913c968ec Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 11:09:31 -0600 Subject: [PATCH 24/34] remove sys.stdout.write(self._textvariable.get()) like print() sys.stdout.write(self._textvariable.get()) did not work to display information in the appveyor console --- tkcalendar/calendar_.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tkcalendar/calendar_.py b/tkcalendar/calendar_.py index f8aedfe..e32f6e4 100644 --- a/tkcalendar/calendar_.py +++ b/tkcalendar/calendar_.py @@ -23,7 +23,6 @@ Calendar widget """ -import sys import calendar try: from tkinter import ttk @@ -265,7 +264,6 @@ def __init__(self, master=None, **kw): if self._textvariable is not None: # the variable overrides day, month and year keywords try: - sys.stdout.write(self._textvariable.get()) self._sel_date = parse_date(self._textvariable.get(), locale) month = self._sel_date.month year = self._sel_date.year From 1ae761d5fc7acaa42c4412598e3c29d157440bb6 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 11:21:16 -0600 Subject: [PATCH 25/34] adjust ignore levels with wildcards add tkinter to ignore list --- .codecov.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 84a0fdb..5e7e768 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -9,8 +9,9 @@ coverage: default: target: '80' ignore: - - "babel" - - "ctypes" - - "pynput" - - "pytz" + - "**/babel/**/*" + - "**/ctypes/**/*" + - "**/pynput/**/*" + - "**/pytz/**/*" + - "**/tkinter/**/*" comment: false From b6614f75becd18e88ece46a272cdc574d1dcb9d2 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Thu, 5 Oct 2023 11:35:44 -0600 Subject: [PATCH 26/34] ignore is not the ignore we are looking for --- .codecov.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 5e7e768..00429d1 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -8,10 +8,4 @@ coverage: project: default: target: '80' - ignore: - - "**/babel/**/*" - - "**/ctypes/**/*" - - "**/pynput/**/*" - - "**/pytz/**/*" - - "**/tkinter/**/*" comment: false From 96de81e58a7b71dce68505ee58fa9e870b929b15 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 8 Oct 2023 14:32:34 -0600 Subject: [PATCH 27/34] use 64bit python Pillow 9.5.0 is the last Pillow version where they released 32-bit wheels. The solution to "Failed to build pillow" from missing zlib is to pin to old Pillow 9.5.0 or to use 64bit python. Opting for 64bit python. This should fix the wheel build errors but won't fix the issues with the Babel parse error --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 46bdb2a..8f8955e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,12 +2,12 @@ image: - Visual Studio 2022 environment: matrix: - - PYTHON: "C:\\PYTHON36" - - PYTHON: "C:\\PYTHON37" - - PYTHON: "C:\\PYTHON38" - - PYTHON: "C:\\PYTHON39" - - PYTHON: "C:\\PYTHON310" - - PYTHON: "C:\\PYTHON311" + - PYTHON: "C:\\PYTHON36-x64" + - PYTHON: "C:\\PYTHON37-x64" + - PYTHON: "C:\\PYTHON38-x64" + - PYTHON: "C:\\PYTHON39-x64" + - PYTHON: "C:\\PYTHON310-x64" + - PYTHON: "C:\\PYTHON311-x64" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" From f61fd728c874bdcbf3f31383e1bdeaad212bab00 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 14:05:21 -0600 Subject: [PATCH 28/34] make some of the lines single make a few lines single lines to see if that changes anything in the unit test errors --- tests/test_calendar.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_calendar.py b/tests/test_calendar.py index 121b504..8cbb318 100644 --- a/tests/test_calendar.py +++ b/tests/test_calendar.py @@ -224,8 +224,7 @@ def test_calendar_buttons_functions(self): def test_calendar_textvariable(self): var = tk.StringVar(self.window) - widget = Calendar(self.window, selectmode='day', - year=2015, month=1, day=3, textvariable=var) + widget = Calendar(self.window, selectmode='day', year=2015, month=1, day=3, textvariable=var) widget.pack() self.window.update() self.assertEqual('', var.get()) @@ -267,8 +266,7 @@ def test_calendar_textvariable(self): self.assertEqual('', var.get()) widget.destroy() - widget = Calendar(self.window, selectmode='day', locale='en_US', - textvariable=var) + widget = Calendar(self.window, selectmode='day', locale='en_US', textvariable=var) widget.pack() self.window.update() widget.selection_set(date(2018, 1, 2)) From 7a5c50b1528f5daec472dd6b4d0f206512b013d3 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 14:35:17 -0600 Subject: [PATCH 29/34] implement nose-exclude to correct coverage report implement nose-exclude to correct coverage report by excluding directories that are not part of the source code https://pypi.org/project/nose-exclude/ --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8f8955e..14dcb9b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,10 +10,10 @@ environment: - PYTHON: "C:\\PYTHON311-x64" install: - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - - "%PYTHON%\\python.exe -m pip install codecov coverage nose pillow pynput babel" + - "%PYTHON%\\python.exe -m pip install codecov coverage nose nose-exclude pillow pynput babel" build: off test_script: - "%PYTHON%\\python.exe -m pip install ." - - "%PYTHON%\\python.exe -m nose --with-coverage" + - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=babel --exclude-dir=pytz --exclude-dir=tkinter" after_test: - "%PYTHON%\\Scripts\\codecov.exe" From 099696d05ba0b30a921ad343a6d35402008a933b Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 14:41:43 -0600 Subject: [PATCH 30/34] try fixing the exclude directories possibly needed \projects\ before the exclude directories --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 14dcb9b..9677c61 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,6 @@ install: build: off test_script: - "%PYTHON%\\python.exe -m pip install ." - - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=babel --exclude-dir=pytz --exclude-dir=tkinter" + - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=/projects/babel --exclude-dir=/projects/pytz --exclude-dir=/projects/tkinter" after_test: - "%PYTHON%\\Scripts\\codecov.exe" From 6f613c620627f990dbacd267665e7d4de6b76baf Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 14:51:51 -0600 Subject: [PATCH 31/34] adjust exclude directories again nose exclude is still not excluding directories --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9677c61..0ffbef9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,6 @@ install: build: off test_script: - "%PYTHON%\\python.exe -m pip install ." - - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=/projects/babel --exclude-dir=/projects/pytz --exclude-dir=/projects/tkinter" + - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=\lib\site-packages\babel --exclude-dir=\lib\site-packages\pytz --exclude-dir=\lib\site-packages\tkinter" after_test: - "%PYTHON%\\Scripts\\codecov.exe" From 44cfec821ff98476186e5b126e0b97e2d9e4e288 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 14:57:31 -0600 Subject: [PATCH 32/34] adjust escape character adjust escape characters --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0ffbef9..5838944 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,6 @@ install: build: off test_script: - "%PYTHON%\\python.exe -m pip install ." - - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=\lib\site-packages\babel --exclude-dir=\lib\site-packages\pytz --exclude-dir=\lib\site-packages\tkinter" + - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=lib/site-packages/babel --exclude-dir=lib/site-packages/pytz --exclude-dir=lib/site-packages/tkinter" after_test: - "%PYTHON%\\Scripts\\codecov.exe" From 769b166cc0b6dce7be0ec36163387d4e06fdfc4b Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 15:05:03 -0600 Subject: [PATCH 33/34] change slash from / to \ change slash from / to \ --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5838944..4d8dec7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,6 @@ install: build: off test_script: - "%PYTHON%\\python.exe -m pip install ." - - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=lib/site-packages/babel --exclude-dir=lib/site-packages/pytz --exclude-dir=lib/site-packages/tkinter" + - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=lib\site-packages\babel --exclude-dir=lib\site-packages\pytz --exclude-dir=lib\site-packages\tkinter" after_test: - "%PYTHON%\\Scripts\\codecov.exe" From f47cb53f38eafafd03ea35242d14788814571e37 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Sun, 29 Oct 2023 15:12:51 -0600 Subject: [PATCH 34/34] more exclude directories adjustment still hunting for the right syntax for the directory to exclude --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4d8dec7..6571d6b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,6 @@ install: build: off test_script: - "%PYTHON%\\python.exe -m pip install ." - - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=lib\site-packages\babel --exclude-dir=lib\site-packages\pytz --exclude-dir=lib\site-packages\tkinter" + - "%PYTHON%\\python.exe -m nose --with-coverage --exclude-dir=/babel --exclude-dir=/pytz --exclude-dir=/tkinter" after_test: - "%PYTHON%\\Scripts\\codecov.exe"