File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Expand file tree Collapse file tree 2 files changed +5
-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,10 @@ 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+             buffering = 0 ,
32+         )
3433
3534    def  _try_to_create_lock_file (self ):
3635        timeout  =  5 
Original file line number Diff line number Diff line change 2020    python_requires = ">=3.7" ,
2121    install_requires = [
2222        'msal>=0.4.1,<2.0.0' ,
23- 
24-         "portalocker<3,>=1.0;platform_system!='Windows'" ,
25-         "portalocker<3,>=1.6;platform_system=='Windows'" ,
23+         'portalocker<3,>=1.4' ,
2624
2725        ## We choose to NOT define a hard dependency on this. 
2826        # "pygobject>=3,<4;platform_system=='Linux'", 
29- 
30-         # Packaging package uses YY.N versioning so we have no upperbound to pin. 
31-         # Neither do we need lowerbound because its `Version` API existed since its first release 
32-         # https://github.com/pypa/packaging/blame/14.0/packaging/version.py 
33-         'packaging' ,
3427    ],
3528    tests_require = ['pytest' ],
3629)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments