@@ -46,25 +46,25 @@ def __repr__(self):
46
46
MODE_PICKLE = 4
47
47
48
48
DEFAULT_SETTINGS = {
49
- u 'statistics' : 0 , # False
50
- u 'tag_index' : 0 , # False
51
- u 'eviction_policy' : u 'least-recently-stored' ,
52
- u 'size_limit' : 2 ** 30 , # 1gb
53
- u 'cull_limit' : 10 ,
54
- u 'sqlite_auto_vacuum' : 1 , # FULL
55
- u 'sqlite_cache_size' : 2 ** 13 , # 8,192 pages
56
- u 'sqlite_journal_mode' : u 'wal' ,
57
- u 'sqlite_mmap_size' : 2 ** 26 , # 64mb
58
- u 'sqlite_synchronous' : 1 , # NORMAL
59
- u 'disk_min_file_size' : 2 ** 15 , # 32kb
60
- u 'disk_pickle_protocol' : pickle .HIGHEST_PROTOCOL ,
49
+ 'statistics' : 0 , # False
50
+ 'tag_index' : 0 , # False
51
+ 'eviction_policy' : 'least-recently-stored' ,
52
+ 'size_limit' : 2 ** 30 , # 1gb
53
+ 'cull_limit' : 10 ,
54
+ 'sqlite_auto_vacuum' : 1 , # FULL
55
+ 'sqlite_cache_size' : 2 ** 13 , # 8,192 pages
56
+ 'sqlite_journal_mode' : 'wal' ,
57
+ 'sqlite_mmap_size' : 2 ** 26 , # 64mb
58
+ 'sqlite_synchronous' : 1 , # NORMAL
59
+ 'disk_min_file_size' : 2 ** 15 , # 32kb
60
+ 'disk_pickle_protocol' : pickle .HIGHEST_PROTOCOL ,
61
61
}
62
62
63
63
METADATA = {
64
- u 'count' : 0 ,
65
- u 'size' : 0 ,
66
- u 'hits' : 0 ,
67
- u 'misses' : 0 ,
64
+ 'count' : 0 ,
65
+ 'size' : 0 ,
66
+ 'hits' : 0 ,
67
+ 'misses' : 0 ,
68
68
}
69
69
70
70
EVICTION_POLICY = {
@@ -1194,7 +1194,7 @@ def get(
1194
1194
1195
1195
try :
1196
1196
value = self ._disk .fetch (mode , filename , db_value , read )
1197
- except IOError as error :
1197
+ except IOError :
1198
1198
# Key was deleted before we could retrieve result.
1199
1199
if self .statistics :
1200
1200
sql (cache_miss )
@@ -1314,7 +1314,7 @@ def pop(
1314
1314
1315
1315
try :
1316
1316
value = self ._disk .fetch (mode , filename , db_value , False )
1317
- except IOError as error :
1317
+ except IOError :
1318
1318
# Key was deleted before we could retrieve result.
1319
1319
return default
1320
1320
finally :
@@ -1582,7 +1582,7 @@ def pull(
1582
1582
1583
1583
try :
1584
1584
value = self ._disk .fetch (mode , name , db_value , False )
1585
- except IOError as error :
1585
+ except IOError :
1586
1586
# Key was deleted before we could retrieve result.
1587
1587
continue
1588
1588
finally :
@@ -1696,7 +1696,7 @@ def peek(
1696
1696
1697
1697
try :
1698
1698
value = self ._disk .fetch (mode , name , db_value , False )
1699
- except IOError as error :
1699
+ except IOError :
1700
1700
# Key was deleted before we could retrieve result.
1701
1701
continue
1702
1702
finally :
@@ -1777,7 +1777,7 @@ def peekitem(self, last=True, expire_time=False, tag=False, retry=False):
1777
1777
1778
1778
try :
1779
1779
value = self ._disk .fetch (mode , name , db_value , False )
1780
- except IOError as error :
1780
+ except IOError :
1781
1781
# Key was deleted before we could retrieve result.
1782
1782
continue
1783
1783
break
@@ -1911,7 +1911,7 @@ def check(self, fix=False, retry=False):
1911
1911
1912
1912
rows = sql ('PRAGMA integrity_check' ).fetchall ()
1913
1913
1914
- if len (rows ) != 1 or rows [0 ][0 ] != u 'ok' :
1914
+ if len (rows ) != 1 or rows [0 ][0 ] != 'ok' :
1915
1915
for (message ,) in rows :
1916
1916
warnings .warn (message )
1917
1917
0 commit comments