aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-02-24 10:55:44 +0200
committerVille Skyttä <ville.skytta@iki.fi>2017-02-24 19:37:39 +0200
commite753cb42481783ac858ceb518aaac1472075063c (patch)
treea32e98067242439d3fe609cf8672045d04b5cd35
parent4c560effc96a75f337193bc164ad4117b0e333ab (diff)
downloadexternal_python_setuptools-e753cb42481783ac858ceb518aaac1472075063c.tar.gz
external_python_setuptools-e753cb42481783ac858ceb518aaac1472075063c.tar.bz2
external_python_setuptools-e753cb42481783ac858ceb518aaac1472075063c.zip
Python 3.6 invalid escape sequence deprecation fixes
-rw-r--r--CHANGES.rst6
-rw-r--r--pkg_resources/tests/test_resources.py2
-rwxr-xr-xsetuptools/command/easy_install.py2
-rw-r--r--setuptools/msvc.py4
-rwxr-xr-xsetuptools/package_index.py8
-rwxr-xr-xsetuptools/sandbox.py4
-rw-r--r--setuptools/tests/test_bdist_egg.py2
-rw-r--r--setuptools/tests/test_easy_install.py2
8 files changed, 18 insertions, 12 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index c6d5556f..000705b7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,9 @@
+v34.3.1
+-------
+
+* #983: Fixes to invalid escape sequence deprecations on
+ Python 3.6.
+
v34.3.0
-------
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index f28378b9..b997aaa3 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -593,7 +593,7 @@ class TestParsing:
[Requirement('Twis-Ted>=1.2-1')]
)
assert (
- list(parse_requirements('Twisted >=1.2, \ # more\n<2.0'))
+ list(parse_requirements('Twisted >=1.2, \\ # more\n<2.0'))
==
[Requirement('Twisted>=1.2,<2.0')]
)
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index d3eabfc3..f5ca0754 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -2013,7 +2013,7 @@ class ScriptWriter(object):
gui apps.
"""
- template = textwrap.dedent("""
+ template = textwrap.dedent(r"""
# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
__requires__ = %(spec)r
import re
diff --git a/setuptools/msvc.py b/setuptools/msvc.py
index 97e27303..d41daec4 100644
--- a/setuptools/msvc.py
+++ b/setuptools/msvc.py
@@ -272,7 +272,7 @@ class PlatformInfo:
)
def target_dir(self, hidex86=False, x64=False):
- """
+ r"""
Target platform specific subfolder.
Parameters
@@ -294,7 +294,7 @@ class PlatformInfo:
)
def cross_dir(self, forcex86=False):
- """
+ r"""
Cross platform specific subfolder.
Parameters
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 3544dd54..5d397b67 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -34,8 +34,8 @@ EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
# this is here to fix emacs' cruddy broken syntax highlighting
PYPI_MD5 = re.compile(
- '<a href="([^"#]+)">([^<]+)</a>\n\s+\\(<a (?:title="MD5 hash"\n\s+)'
- 'href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\\)'
+ '<a href="([^"#]+)">([^<]+)</a>\n\\s+\\(<a (?:title="MD5 hash"\n\\s+)'
+ 'href="[^?]+\\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\\)'
)
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()
@@ -161,7 +161,7 @@ def interpret_distro_name(
# versions in distribution archive names (sdist and bdist).
parts = basename.split('-')
- if not py_version and any(re.match('py\d\.\d$', p) for p in parts[2:]):
+ if not py_version and any(re.match(r'py\d\.\d$', p) for p in parts[2:]):
# it is a bdist_dumb, not an sdist -- bail out
return
@@ -205,7 +205,7 @@ def unique_values(func):
return wrapper
-REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
+REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
# this line is here to fix emacs' cruddy broken syntax highlighting
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 0ddd2332..41c1c3b1 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -215,7 +215,7 @@ def _needs_hiding(mod_name):
>>> _needs_hiding('Cython')
True
"""
- pattern = re.compile('(setuptools|pkg_resources|distutils|Cython)(\.|$)')
+ pattern = re.compile(r'(setuptools|pkg_resources|distutils|Cython)(\.|$)')
return bool(pattern.match(mod_name))
@@ -391,7 +391,7 @@ class DirectorySandbox(AbstractSandbox):
_exception_patterns = [
# Allow lib2to3 to attempt to save a pickled grammar object (#121)
- '.*lib2to3.*\.pickle$',
+ r'.*lib2to3.*\.pickle$',
]
"exempt writing to paths that match the pattern"
diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
index 5aabf404..d24aa366 100644
--- a/setuptools/tests/test_bdist_egg.py
+++ b/setuptools/tests/test_bdist_egg.py
@@ -41,4 +41,4 @@ class Test:
# let's see if we got our egg link at the right place
[content] = os.listdir('dist')
- assert re.match('foo-0.0.0-py[23].\d.egg$', content)
+ assert re.match(r'foo-0.0.0-py[23].\d.egg$', content)
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index b75e6ff2..fd8300a0 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -65,7 +65,7 @@ class TestEasyInstallTest:
def test_get_script_args(self):
header = ei.CommandSpec.best().from_environment().as_header()
- expected = header + DALS("""
+ expected = header + DALS(r"""
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'
import re