File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 66import logging
77
88import portalocker
9- from packaging .version import Version
109
1110
1211logger = logging .getLogger (__name__ )
@@ -19,9 +18,6 @@ class CrossPlatLock(object):
1918 """
2019 def __init__ (self , lockfile_path ):
2120 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 {})
2521 self ._lock = portalocker .Lock (
2622 lockfile_path ,
2723 mode = 'wb+' ,
@@ -30,7 +26,11 @@ def __init__(self, lockfile_path):
3026 # More information here:
3127 # https://docs.python.org/3/library/fcntl.html#fcntl.lockf
3228 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+ )
3434
3535 def _try_to_create_lock_file (self ):
3636 timeout = 5
Original file line number Diff line number Diff line change 2323 python_requires = ">=3.7" ,
2424 install_requires = [
2525 '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' ,
2927
3028 ## We choose to NOT define a hard dependency on this.
3129 # "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' ,
3730 ],
3831 tests_require = ['pytest' ],
3932)
You can’t perform that action at this time.
0 commit comments