From 55105196877982b2b361b8332f960c426b3c6c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Fri, 13 Oct 2023 20:53:52 -0600 Subject: [PATCH 1/3] Remove use of distutils --- msal_extensions/cache_lock.py | 4 ++-- setup.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/msal_extensions/cache_lock.py b/msal_extensions/cache_lock.py index ebb2601..c6f95e2 100644 --- a/msal_extensions/cache_lock.py +++ b/msal_extensions/cache_lock.py @@ -4,9 +4,9 @@ import errno import time import logging -from distutils.version import LooseVersion import portalocker +from packaging.version import Version logger = logging.getLogger(__name__) @@ -21,7 +21,7 @@ def __init__(self, lockfile_path): self._lockpath = lockfile_path # Support for passing through arguments to the open syscall was added in v1.4.0 open_kwargs = ({'buffering': 0} - if LooseVersion(portalocker.__version__) >= LooseVersion("1.4.0") else {}) + if Version(portalocker.__version__) >= Version("1.4.0") else {}) self._lock = portalocker.Lock( lockfile_path, mode='wb+', diff --git a/setup.py b/setup.py index 1500a37..7c94a45 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,8 @@ "pathlib2;python_version<'3.0'", ## We choose to NOT define a hard dependency on this. # "pygobject>=3,<4;platform_system=='Linux'", + + 'packaging', ], tests_require=['pytest'], ) From 8c9541a411e860a5f67d0db2cde5885ee85bd29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Sat, 14 Oct 2023 19:07:35 -0600 Subject: [PATCH 2/3] Use `fail-fast: false` --- .github/workflows/python-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7570e26..5cba06b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,6 +15,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: python-version: [3.7, 3.8, 3.9, 2.7] os: [ubuntu-latest, windows-latest, macos-latest] From aff2c875755b4af322457b8dc3bbb15c93b6c1f9 Mon Sep 17 00:00:00 2001 From: Ray Luo Date: Mon, 13 Nov 2023 19:17:53 -0800 Subject: [PATCH 3/3] Explaining the lack of packaging versioning pin --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 7c94a45..48966ac 100644 --- a/setup.py +++ b/setup.py @@ -37,6 +37,9 @@ ## We choose to NOT define a hard dependency on this. # "pygobject>=3,<4;platform_system=='Linux'", + # Packaging package uses YY.N versioning so we have no upperbound to pin. + # Neither do we need lowerbound because its `Version` API existed since its first release + # https://github.com/pypa/packaging/blame/14.0/packaging/version.py 'packaging', ], tests_require=['pytest'],