8000 fix regression with py27 · libvips/pyvips@bf00a21 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf00a21

Browse files
committed
fix regression with py27
oops nonlocal is not supported in py2
1 parent 666b65a commit bf00a21

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# master
22

3+
## Version 2.1.8 (1 Jul 2019)
4+
5+
* fix regression with py27 [jcupitt]
6+
37
## Version 2.1.7 (1 Jul 2019)
48

59
* prevent exponential growth of reference tables in some cases [NextGuido]

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
# The short X.Y version.
6767
version = u'2.1'
6868
# The full version, including alpha/beta/rc tags.
69-
release = u'2.1.7'
69+
release = u'2.1.8'
7070

7171
# The language for content autogenerated by Sphinx. Refer to documentation
7272
# for a list of supported languages.

pyvips/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# this is execfile()d into setup.py imported into __init__.py
2-
__version__ = '2.1.7'
2+
__version__ = '2.1.8'
33

44
__all__ = ['__version__']

pyvips/voperation.py

Lines changed: 2 additions & 3 deletions
7ED0
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,11 @@ def call(operation_name, *args, **kwargs):
219219
references = []
220220

221221
def add_reference(x):
222-
nonlocal references
223-
224222
if isinstance(x, pyvips.Image):
225223
for i in x._references:
226224
if i not in references:
227-
references += [i]
225+
# references += [i] won't work with py27
226+
references.append(i)
228227

229228
return False
230229

0 commit comments

Comments
 (0)
0