Skip to content

Commit dadf17b

Browse files
author
Jordan Adler
committed
Fix py2.6 compat issues
1 parent 0bb7b07 commit dadf17b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/future/backports/misc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def __delitem__(self, key):
817817
try:
818818
del self.maps[0][key]
819819
except KeyError:
820-
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
820+
raise KeyError('Key not found in the first mapping: {0!r}'.format(key))
821821

822822
def popitem(self):
823823
'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
@@ -831,7 +831,7 @@ def pop(self, key, *args):
831831
try:
832832
return self.maps[0].pop(key, *args)
833833
except KeyError:
834-
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
834+
raise KeyError('Key not found in the first mapping: {0!r}'.format(key))
835835

836836
def clear(self):
837837
'Clear maps[0], leaving maps[1:] intact.'

tests/test_future/test_futurize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ def total_count(self):
11941194
11951195
x = 3 / 2
11961196
y = 3. / 2
1197-
foo = range(100)
1197+
foo = list(range(100))
11981198
assert x == 1 and isinstance(x, int)
11991199
assert y == 1.5 and isinstance(y, float)
12001200
a = 1 + foo[len(foo) / 2]

0 commit comments

Comments
 (0)