diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-12-13 15:53:56 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-12-14 11:33:22 -0700 |
commit | ec0e04694278ef9ea83537d308b07fc27c1b5f85 (patch) | |
tree | a28bb53d6827e5449c3f2d5ade3a4ad43bef7ca0 /numpy/distutils/command/build_src.py | |
parent | 2a1e5a6d2ffdabf2a18875ee8dd57773d608e4c5 (diff) | |
download | numpy-ec0e04694278ef9ea83537d308b07fc27c1b5f85.tar.gz |
DEP: Fix escaped string characters deprecated in Python 3.6.
In Python 3.6 a number of escape sequences that were previously accepted
-- for instance "\(" that was translated to "\\(" -- are deprecated. To
retain the previous behavior either raw strings must be used or the
backslash must be properly escaped itself.
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r-- | numpy/distutils/command/build_src.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py index edb37b8ed..18db1bb42 100644 --- a/numpy/distutils/command/build_src.py +++ b/numpy/distutils/command/build_src.py @@ -18,8 +18,9 @@ from distutils.errors import DistutilsError, DistutilsSetupError # after it's installed #import numpy.f2py from numpy.distutils import log -from numpy.distutils.misc_util import fortran_ext_match, \ - appendpath, is_string, is_sequence, get_cmd +from numpy.distutils.misc_util import ( + fortran_ext_match, appendpath, is_string, is_sequence, get_cmd + ) from numpy.distutils.from_template import process_file as process_f_file from numpy.distutils.conv_template import process_file as process_c_file @@ -755,9 +756,9 @@ def _find_swig_target(target_dir, name): #### F2PY related auxiliary functions #### _f2py_module_name_match = re.compile(r'\s*python\s*module\s*(?P<name>[\w_]+)', - re.I).match -_f2py_user_module_name_match = re.compile(r'\s*python\s*module\s*(?P<name>[\w_]*?'\ - '__user__[\w_]*)', re.I).match + re.I).match +_f2py_user_module_name_match = re.compile(r'\s*python\s*module\s*(?P<name>[\w_]*?' + r'__user__[\w_]*)', re.I).match def get_f2py_modulename(source): name = None |