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] 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..48966ac 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,11 @@ "pathlib2;python_version<'3.0'", ## 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'], )