diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-01-01 15:27:58 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-01-01 15:27:58 +0100 |
commit | a3d3ab54c516b023d6f313ca1bbe8c219852298f (patch) | |
tree | 9aa29a90a03c74f2806437eba88b298eb71a4b49 | |
parent | 6b174f8243cad1bea11c34c9a1f590c56b810709 (diff) | |
download | cython-a3d3ab54c516b023d6f313ca1bbe8c219852298f.tar.gz |
Make an import prefer Py3 over Py2, since that's what most people are (or should be) using these days.
-rw-r--r-- | Cython/Build/IpythonMagic.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Cython/Build/IpythonMagic.py b/Cython/Build/IpythonMagic.py index 193214544..cca7b5cb1 100644 --- a/Cython/Build/IpythonMagic.py +++ b/Cython/Build/IpythonMagic.py @@ -58,9 +58,9 @@ import textwrap try: - reload -except NameError: # Python 3 - from imp import reload + from importlib import reload +except ImportError: # Python 2 had a builtin function + pass import hashlib from distutils.core import Distribution, Extension |