Commit 3fbffdb 1 parent 52307ec commit 3fbffdb Copy full SHA for 3fbffdb
File tree 2 files changed +6
-13
lines changed
2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 6
6
import logging
7
7
8
8
import portalocker
9
- from packaging .version import Version
10
9
11
10
12
11
logger = logging .getLogger (__name__ )
@@ -19,9 +18,6 @@ class CrossPlatLock(object):
19
18
"""
20
19
def __init__ (self , lockfile_path ):
21
20
self ._lockpath = lockfile_path
22
- # Support for passing through arguments to the open syscall was added in v1.4.0
23
- open_kwargs = ({'buffering' : 0 }
24
- if Version (portalocker .__version__ ) >= Version ("1.4.0" ) else {})
25
21
self ._lock = portalocker .Lock (
26
22
lockfile_path ,
27
23
mode = 'wb+' ,
@@ -30,7 +26,11 @@ def __init__(self, lockfile_path):
30
26
# More information here:
31
27
# https://docs.python.org/3/library/fcntl.html#fcntl.lockf
32
28
flags = portalocker .LOCK_EX | portalocker .LOCK_NB ,
33
- ** open_kwargs )
29
+ # Support for passing through arguments to the open syscall
30
+ # was added in Portalocker v1.4.0 (2019-02-11),
31
+ # we depend on >= 1.6.0 (2020-03-24) at present.
32
+ buffering = 0 ,
33
+ )
34
34
35
35
def _try_to_create_lock_file (self ):
36
36
timeout = 5
Original file line number Diff line number Diff line change 23
23
python_requires = ">=3.7" ,
24
24
install_requires = [
25
25
'msal>=0.4.1,<2.0.0' ,
26
-
27
- "portalocker<3,>=1.0;platform_system!='Windows'" ,
28
- "portalocker<3,>=1.6;platform_system=='Windows'" ,
26
+ 'portalocker<3,>=1.6' ,
29
27
30
28
## We choose to NOT define a hard dependency on this.
31
29
# "pygobject>=3,<4;platform_system=='Linux'",
32
-
33
- # Packaging package uses YY.N versioning so we have no upperbound to pin.
34
- # Neither do we need lowerbound because its `Version` API existed since its first release
35
- # https://github.com/pypa/packaging/blame/14.0/packaging/version.py
36
- 'packaging' ,
37
30
],
38
31
tests_require = ['pytest' ],
39
32
)
You can’t perform that action at this time.
0 commit comments