From 8d953a9424700b85beff13a83fe7a6921768dd75 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 28 Jul 2017 23:54:31 -0400 Subject: [PATCH] [Python] Make Python module compatible with Cython 0.26 Cython 0.26 unexpectedly removed automatic conversions of C++ containers to Python containers. Explicit casting provides the old behavior. Fixes #465 --- interfaces/cython/cantera/utils.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/cython/cantera/utils.pyx b/interfaces/cython/cantera/utils.pyx index c435e0903..cb3a6adfb 100644 --- a/interfaces/cython/cantera/utils.pyx +++ b/interfaces/cython/cantera/utils.pyx @@ -58,12 +58,12 @@ cdef Composition comp_map(X) except *: # assume X is dict-like cdef Composition m - for species,value in X.items(): + for species,value in (X).items(): m[stringify(species)] = value return m cdef comp_map_to_dict(Composition m): - return {pystr(species):value for species,value in m.items()} + return {pystr(species):value for species,value in (m).items()} class CanteraError(RuntimeError): pass