Skip to content

Commit d7f7623

Browse files
Remove use of distutils (#120)
* Remove use of distutils * Use `fail-fast: false` * Explaining the lack of packaging versioning pin --------- Co-authored-by: Ray Luo <[email protected]>
1 parent ee452ea commit d7f7623

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/python-package.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515

1616
runs-on: ${{ matrix.os }}
1717
strategy:
18+
fail-fast: false
1819
matrix:
1920
python-version: [3.7, 3.8, 3.9, 2.7]
2021
os: [ubuntu-latest, windows-latest, macos-latest]

msal_extensions/cache_lock.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import errno
55
import time
66
import logging
7-
from distutils.version import LooseVersion
87

98
import portalocker
9+
from packaging.version import Version
1010

1111

1212
logger = logging.getLogger(__name__)
@@ -21,7 +21,7 @@ def __init__(self, lockfile_path):
2121
self._lockpath = lockfile_path
2222
# Support for passing through arguments to the open syscall was added in v1.4.0
2323
open_kwargs = ({'buffering': 0}
24-
if LooseVersion(portalocker.__version__) >= LooseVersion("1.4.0") else {})
24+
if Version(portalocker.__version__) >= Version("1.4.0") else {})
2525
self._lock = portalocker.Lock(
2626
lockfile_path,
2727
mode='wb+',

setup.py

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
"pathlib2;python_version<'3.0'",
3737
## We choose to NOT define a hard dependency on this.
3838
# "pygobject>=3,<4;platform_system=='Linux'",
39+
40+
# Packaging package uses YY.N versioning so we have no upperbound to pin.
41+
# Neither do we need lowerbound because its `Version` API existed since its first release
42+
# https://github.com/pypa/packaging/blame/14.0/packaging/version.py
43+
'packaging',
3944
],
4045
tests_require=['pytest'],
4146
)

0 commit comments

Comments
 (0)