mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Better finalize mock
This commit is contained in:
+6
-2
@@ -22,8 +22,12 @@ except ImportError:
|
||||
try:
|
||||
from backports.weakref import finalize
|
||||
except ImportError:
|
||||
def finalize(*args, **kwargs):
|
||||
logging.warn('weakref.finalize unavailable, not cleaning...')
|
||||
class finalize(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
logging.warn('weakref.finalize unavailable, not cleaning...')
|
||||
|
||||
def detach(self):
|
||||
return False
|
||||
|
||||
from time import time
|
||||
|
||||
|
||||
Reference in New Issue
Block a user