diff --git a/setup.py b/setup.py index 538cee9ae..62c18b501 100644 --- a/setup.py +++ b/setup.py @@ -330,10 +330,15 @@ def _setup_extensions(self): extra_compile_args=compile_args) for m in cython_candidates], nthreads=build_concurrency, - exclude_failures=not CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST)) + exclude_failures=not CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST, + compiler_directives={'language_level': 3}, + )) - self.extensions.extend(cythonize(NoPatchExtension("*", ["cassandra/*.pyx"], extra_compile_args=compile_args), - nthreads=build_concurrency)) + self.extensions.extend(cythonize( + NoPatchExtension("*", ["cassandra/*.pyx"], extra_compile_args=compile_args), + nthreads=build_concurrency, + compiler_directives={'language_level': 3}, + )) except Exception: sys.stderr.write("Failed to cythonize one or more modules. These will not be compiled as extensions (optional).\n") if CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST: