We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RuntimeWarning: Config variable 'Py_DEBUG' is unset
When I run pip (any argument) I get the following message:

```
c:\Program Files\Python34\Scripts>pip --version
c:\progra~1\python34\lib\site-packages\pip\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
c:\progra~1\python34\lib\site-packages\pip\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
pip 8.0.0 from c:\progra~1\python34\lib\site-packages (python 3.4)
```

I think something is wrong.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pip/pep425tags.py`
Content:
```
1 """Generate and work with PEP 425 Compatibility Tags."""
2 from __future__ import absolute_import
3 
4 import re
5 import sys
6 import warnings
7 import platform
8 
9 try:
10     import sysconfig
11 except ImportError:  # pragma nocover
12     # Python < 2.7
13     import distutils.sysconfig as sysconfig
14 import distutils.util
15 
16 _osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')
17 
18 
19 def get_config_var(var):
20     try:
21         return sysconfig.get_config_var(var)
22     except IOError as e:  # Issue #1074
23         warnings.warn("{0}".format(e), RuntimeWarning)
24         return None
25 
26 
27 def get_abbr_impl():
28     """Return abbreviated implementation name."""
29     if hasattr(sys, 'pypy_version_info'):
30         pyimpl = 'pp'
31     elif sys.platform.startswith('java'):
32         pyimpl = 'jy'
33     elif sys.platform == 'cli':
34         pyimpl = 'ip'
35     else:
36         pyimpl = 'cp'
37     return pyimpl
38 
39 
40 def get_impl_ver():
41     """Return implementation version."""
42     impl_ver = get_config_var("py_version_nodot")
43     if not impl_ver or get_abbr_impl() == 'pp':
44         impl_ver = ''.join(map(str, get_impl_version_info()))
45     return impl_ver
46 
47 
48 def get_impl_version_info():
49     """Return sys.version_info-like tuple for use in decrementing the minor
50     version."""
51     if get_abbr_impl() == 'pp':
52         # as per https://github.com/pypa/pip/issues/2882
53         return (sys.version_info[0], sys.pypy_version_info.major,
54                 sys.pypy_version_info.minor)
55     else:
56         return sys.version_info[0], sys.version_info[1]
57 
58 
59 def get_impl_tag():
60     """
61     Returns the Tag for this specific implementation.
62     """
63     return "{0}{1}".format(get_abbr_impl(), get_impl_ver())
64 
65 
66 def get_flag(var, fallback, expected=True, warn=True):
67     """Use a fallback method for determining SOABI flags if the needed config
68     var is unset or unavailable."""
69     val = get_config_var(var)
70     if val is None:
71         if warn:
72             warnings.warn("Config variable '{0}' is unset, Python ABI tag may "
73                           "be incorrect".format(var), RuntimeWarning, 2)
74         return fallback()
75     return val == expected
76 
77 
78 def get_abi_tag():
79     """Return the ABI tag based on SOABI (if available) or emulate SOABI
80     (CPython 2, PyPy)."""
81     soabi = get_config_var('SOABI')
82     impl = get_abbr_impl()
83     if not soabi and impl in ('cp', 'pp') and hasattr(sys, 'maxunicode'):
84         d = ''
85         m = ''
86         u = ''
87         if get_flag('Py_DEBUG',
88                     lambda: hasattr(sys, 'gettotalrefcount'),
89                     warn=(impl == 'cp')):
90             d = 'd'
91         if get_flag('WITH_PYMALLOC',
92                     lambda: impl == 'cp',
93                     warn=(impl == 'cp')):
94             m = 'm'
95         if get_flag('Py_UNICODE_SIZE',
96                     lambda: sys.maxunicode == 0x10ffff,
97                     expected=4,
98                     warn=(impl == 'cp' and
99                           sys.version_info < (3, 3))) \
100                 and sys.version_info < (3, 3):
101             u = 'u'
102         abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)
103     elif soabi and soabi.startswith('cpython-'):
104         abi = 'cp' + soabi.split('-')[1]
105     elif soabi:
106         abi = soabi.replace('.', '_').replace('-', '_')
107     else:
108         abi = None
109     return abi
110 
111 
112 def get_platform():
113     """Return our platform name 'win32', 'linux_x86_64'"""
114     if sys.platform == 'darwin':
115         # distutils.util.get_platform() returns the release based on the value
116         # of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may
117         # be signficantly older than the user's current machine.
118         release, _, machine = platform.mac_ver()
119         split_ver = release.split('.')
120         return 'macosx_{0}_{1}_{2}'.format(split_ver[0], split_ver[1], machine)
121     # XXX remove distutils dependency
122     return distutils.util.get_platform().replace('.', '_').replace('-', '_')
123 
124 
125 def get_supported(versions=None, noarch=False):
126     """Return a list of supported tags for each version specified in
127     `versions`.
128 
129     :param versions: a list of string versions, of the form ["33", "32"],
130         or None. The first version will be assumed to support our ABI.
131     """
132     supported = []
133 
134     # Versions must be given with respect to the preference
135     if versions is None:
136         versions = []
137         version_info = get_impl_version_info()
138         major = version_info[:-1]
139         # Support all previous minor Python versions.
140         for minor in range(version_info[-1], -1, -1):
141             versions.append(''.join(map(str, major + (minor,))))
142 
143     impl = get_abbr_impl()
144 
145     abis = []
146 
147     abi = get_abi_tag()
148     if abi:
149         abis[0:0] = [abi]
150 
151     abi3s = set()
152     import imp
153     for suffix in imp.get_suffixes():
154         if suffix[0].startswith('.abi'):
155             abi3s.add(suffix[0].split('.', 2)[1])
156 
157     abis.extend(sorted(list(abi3s)))
158 
159     abis.append('none')
160 
161     if not noarch:
162         arch = get_platform()
163         if sys.platform == 'darwin':
164             # support macosx-10.6-intel on macosx-10.9-x86_64
165             match = _osx_arch_pat.match(arch)
166             if match:
167                 name, major, minor, actual_arch = match.groups()
168                 actual_arches = [actual_arch]
169                 if actual_arch in ('i386', 'ppc'):
170                     actual_arches.append('fat')
171                 if actual_arch in ('i386', 'x86_64'):
172                     actual_arches.append('intel')
173                 if actual_arch in ('ppc64', 'x86_64'):
174                     actual_arches.append('fat64')
175                 if actual_arch in ('i386', 'ppc', 'x86_64'):
176                     actual_arches.append('fat32')
177                 if actual_arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):
178                     actual_arches.append('universal')
179                 tpl = '{0}_{1}_%i_%s'.format(name, major)
180                 arches = []
181                 for m in reversed(range(int(minor) + 1)):
182                     for a in actual_arches:
183                         arches.append(tpl % (m, a))
184             else:
185                 # arch pattern didn't match (?!)
186                 arches = [arch]
187         else:
188             arches = [arch]
189 
190         # Current version, current API (built specifically for our Python):
191         for abi in abis:
192             for arch in arches:
193                 supported.append(('%s%s' % (impl, versions[0]), abi, arch))
194 
195         # Has binaries, does not use the Python API:
196         supported.append(('py%s' % (versions[0][0]), 'none', arch))
197 
198     # No abi / arch, but requires our implementation:
199     for i, version in enumerate(versions):
200         supported.append(('%s%s' % (impl, version), 'none', 'any'))
201         if i == 0:
202             # Tagged specifically as being cross-version compatible
203             # (with just the major version specified)
204             supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))
205 
206     # No abi / arch, generic Python
207     for i, version in enumerate(versions):
208         supported.append(('py%s' % (version,), 'none', 'any'))
209         if i == 0:
210             supported.append(('py%s' % (version[0]), 'none', 'any'))
211 
212     return supported
213 
214 supported_tags = get_supported()
215 supported_tags_noarch = get_supported(noarch=True)
216 
217 implementation_tag = get_impl_tag()
218
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pip/pep425tags.py b/pip/pep425tags.py
--- a/pip/pep425tags.py
+++ b/pip/pep425tags.py
@@ -5,6 +5,7 @@
 import sys
 import warnings
 import platform
+import logging
 
 try:
     import sysconfig
@@ -13,6 +14,10 @@
     import distutils.sysconfig as sysconfig
 import distutils.util
 
+
+logger = logging.getLogger(__name__)
+
+
 _osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')
 
 
@@ -69,8 +74,8 @@
     val = get_config_var(var)
     if val is None:
         if warn:
-            warnings.warn("Config variable '{0}' is unset, Python ABI tag may "
-                          "be incorrect".format(var), RuntimeWarning, 2)
+            logger.debug("Config variable '%s' is unset, Python ABI tag may "
+                         "be incorrect", var)
         return fallback()
     return val == expected

{"golden_diff": "diff --git a/pip/pep425tags.py b/pip/pep425tags.py\n--- a/pip/pep425tags.py\n+++ b/pip/pep425tags.py\n@@ -5,6 +5,7 @@\n import sys\n import warnings\n import platform\n+import logging\n \n try:\n     import sysconfig\n@@ -13,6 +14,10 @@\n     import distutils.sysconfig as sysconfig\n import distutils.util\n \n+\n+logger = logging.getLogger(__name__)\n+\n+\n _osx_arch_pat = re.compile(r'(.+)_(\\d+)_(\\d+)_(.+)')\n \n \n@@ -69,8 +74,8 @@\n     val = get_config_var(var)\n     if val is None:\n         if warn:\n-            warnings.warn(\"Config variable '{0}' is unset, Python ABI tag may \"\n-                          \"be incorrect\".format(var), RuntimeWarning, 2)\n+            logger.debug(\"Config variable '%s' is unset, Python ABI tag may \"\n+                         \"be incorrect\", var)\n         return fallback()\n     return val == expected\n", "issue": "RuntimeWarning: Config variable 'Py_DEBUG' is unset\nWhen I run pip (any argument) I get the following message:\n\n```\nc:\\Program Files\\Python34\\Scripts>pip --version\nc:\\progra~1\\python34\\lib\\site-packages\\pip\\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect\n  warn=(impl == 'cp')):\nc:\\progra~1\\python34\\lib\\site-packages\\pip\\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect\n  warn=(impl == 'cp')):\npip 8.0.0 from c:\\progra~1\\python34\\lib\\site-packages (python 3.4)\n```\n\nI think something is wrong.\n\n", "before_files": [{"content": "\"\"\"Generate and work with PEP 425 Compatibility Tags.\"\"\"\nfrom __future__ import absolute_import\n\nimport re\nimport sys\nimport warnings\nimport platform\n\ntry:\n    import sysconfig\nexcept ImportError:  # pragma nocover\n    # Python < 2.7\n    import distutils.sysconfig as sysconfig\nimport distutils.util\n\n_osx_arch_pat = re.compile(r'(.+)_(\\d+)_(\\d+)_(.+)')\n\n\ndef get_config_var(var):\n    try:\n        return sysconfig.get_config_var(var)\n    except IOError as e:  # Issue #1074\n        warnings.warn(\"{0}\".format(e), RuntimeWarning)\n        return None\n\n\ndef get_abbr_impl():\n    \"\"\"Return abbreviated implementation name.\"\"\"\n    if hasattr(sys, 'pypy_version_info'):\n        pyimpl = 'pp'\n    elif sys.platform.startswith('java'):\n        pyimpl = 'jy'\n    elif sys.platform == 'cli':\n        pyimpl = 'ip'\n    else:\n        pyimpl = 'cp'\n    return pyimpl\n\n\ndef get_impl_ver():\n    \"\"\"Return implementation version.\"\"\"\n    impl_ver = get_config_var(\"py_version_nodot\")\n    if not impl_ver or get_abbr_impl() == 'pp':\n        impl_ver = ''.join(map(str, get_impl_version_info()))\n    return impl_ver\n\n\ndef get_impl_version_info():\n    \"\"\"Return sys.version_info-like tuple for use in decrementing the minor\n    version.\"\"\"\n    if get_abbr_impl() == 'pp':\n        # as per https://github.com/pypa/pip/issues/2882\n        return (sys.version_info[0], sys.pypy_version_info.major,\n                sys.pypy_version_info.minor)\n    else:\n        return sys.version_info[0], sys.version_info[1]\n\n\ndef get_impl_tag():\n    \"\"\"\n    Returns the Tag for this specific implementation.\n    \"\"\"\n    return \"{0}{1}\".format(get_abbr_impl(), get_impl_ver())\n\n\ndef get_flag(var, fallback, expected=True, warn=True):\n    \"\"\"Use a fallback method for determining SOABI flags if the needed config\n    var is unset or unavailable.\"\"\"\n    val = get_config_var(var)\n    if val is None:\n        if warn:\n            warnings.warn(\"Config variable '{0}' is unset, Python ABI tag may \"\n                          \"be incorrect\".format(var), RuntimeWarning, 2)\n        return fallback()\n    return val == expected\n\n\ndef get_abi_tag():\n    \"\"\"Return the ABI tag based on SOABI (if available) or emulate SOABI\n    (CPython 2, PyPy).\"\"\"\n    soabi = get_config_var('SOABI')\n    impl = get_abbr_impl()\n    if not soabi and impl in ('cp', 'pp') and hasattr(sys, 'maxunicode'):\n        d = ''\n        m = ''\n        u = ''\n        if get_flag('Py_DEBUG',\n                    lambda: hasattr(sys, 'gettotalrefcount'),\n                    warn=(impl == 'cp')):\n            d = 'd'\n        if get_flag('WITH_PYMALLOC',\n                    lambda: impl == 'cp',\n                    warn=(impl == 'cp')):\n            m = 'm'\n        if get_flag('Py_UNICODE_SIZE',\n                    lambda: sys.maxunicode == 0x10ffff,\n                    expected=4,\n                    warn=(impl == 'cp' and\n                          sys.version_info < (3, 3))) \\\n                and sys.version_info < (3, 3):\n            u = 'u'\n        abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)\n    elif soabi and soabi.startswith('cpython-'):\n        abi = 'cp' + soabi.split('-')[1]\n    elif soabi:\n        abi = soabi.replace('.', '_').replace('-', '_')\n    else:\n        abi = None\n    return abi\n\n\ndef get_platform():\n    \"\"\"Return our platform name 'win32', 'linux_x86_64'\"\"\"\n    if sys.platform == 'darwin':\n        # distutils.util.get_platform() returns the release based on the value\n        # of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may\n        # be signficantly older than the user's current machine.\n        release, _, machine = platform.mac_ver()\n        split_ver = release.split('.')\n        return 'macosx_{0}_{1}_{2}'.format(split_ver[0], split_ver[1], machine)\n    # XXX remove distutils dependency\n    return distutils.util.get_platform().replace('.', '_').replace('-', '_')\n\n\ndef get_supported(versions=None, noarch=False):\n    \"\"\"Return a list of supported tags for each version specified in\n    `versions`.\n\n    :param versions: a list of string versions, of the form [\"33\", \"32\"],\n        or None. The first version will be assumed to support our ABI.\n    \"\"\"\n    supported = []\n\n    # Versions must be given with respect to the preference\n    if versions is None:\n        versions = []\n        version_info = get_impl_version_info()\n        major = version_info[:-1]\n        # Support all previous minor Python versions.\n        for minor in range(version_info[-1], -1, -1):\n            versions.append(''.join(map(str, major + (minor,))))\n\n    impl = get_abbr_impl()\n\n    abis = []\n\n    abi = get_abi_tag()\n    if abi:\n        abis[0:0] = [abi]\n\n    abi3s = set()\n    import imp\n    for suffix in imp.get_suffixes():\n        if suffix[0].startswith('.abi'):\n            abi3s.add(suffix[0].split('.', 2)[1])\n\n    abis.extend(sorted(list(abi3s)))\n\n    abis.append('none')\n\n    if not noarch:\n        arch = get_platform()\n        if sys.platform == 'darwin':\n            # support macosx-10.6-intel on macosx-10.9-x86_64\n            match = _osx_arch_pat.match(arch)\n            if match:\n                name, major, minor, actual_arch = match.groups()\n                actual_arches = [actual_arch]\n                if actual_arch in ('i386', 'ppc'):\n                    actual_arches.append('fat')\n                if actual_arch in ('i386', 'x86_64'):\n                    actual_arches.append('intel')\n                if actual_arch in ('ppc64', 'x86_64'):\n                    actual_arches.append('fat64')\n                if actual_arch in ('i386', 'ppc', 'x86_64'):\n                    actual_arches.append('fat32')\n                if actual_arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):\n                    actual_arches.append('universal')\n                tpl = '{0}_{1}_%i_%s'.format(name, major)\n                arches = []\n                for m in reversed(range(int(minor) + 1)):\n                    for a in actual_arches:\n                        arches.append(tpl % (m, a))\n            else:\n                # arch pattern didn't match (?!)\n                arches = [arch]\n        else:\n            arches = [arch]\n\n        # Current version, current API (built specifically for our Python):\n        for abi in abis:\n            for arch in arches:\n                supported.append(('%s%s' % (impl, versions[0]), abi, arch))\n\n        # Has binaries, does not use the Python API:\n        supported.append(('py%s' % (versions[0][0]), 'none', arch))\n\n    # No abi / arch, but requires our implementation:\n    for i, version in enumerate(versions):\n        supported.append(('%s%s' % (impl, version), 'none', 'any'))\n        if i == 0:\n            # Tagged specifically as being cross-version compatible\n            # (with just the major version specified)\n            supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))\n\n    # No abi / arch, generic Python\n    for i, version in enumerate(versions):\n        supported.append(('py%s' % (version,), 'none', 'any'))\n        if i == 0:\n            supported.append(('py%s' % (version[0]), 'none', 'any'))\n\n    return supported\n\nsupported_tags = get_supported()\nsupported_tags_noarch = get_supported(noarch=True)\n\nimplementation_tag = get_impl_tag()\n", "path": "pip/pep425tags.py"}], "after_files": [{"content": "\"\"\"Generate and work with PEP 425 Compatibility Tags.\"\"\"\nfrom __future__ import absolute_import\n\nimport re\nimport sys\nimport warnings\nimport platform\nimport logging\n\ntry:\n    import sysconfig\nexcept ImportError:  # pragma nocover\n    # Python < 2.7\n    import distutils.sysconfig as sysconfig\nimport distutils.util\n\n\nlogger = logging.getLogger(__name__)\n\n\n_osx_arch_pat = re.compile(r'(.+)_(\\d+)_(\\d+)_(.+)')\n\n\ndef get_config_var(var):\n    try:\n        return sysconfig.get_config_var(var)\n    except IOError as e:  # Issue #1074\n        warnings.warn(\"{0}\".format(e), RuntimeWarning)\n        return None\n\n\ndef get_abbr_impl():\n    \"\"\"Return abbreviated implementation name.\"\"\"\n    if hasattr(sys, 'pypy_version_info'):\n        pyimpl = 'pp'\n    elif sys.platform.startswith('java'):\n        pyimpl = 'jy'\n    elif sys.platform == 'cli':\n        pyimpl = 'ip'\n    else:\n        pyimpl = 'cp'\n    return pyimpl\n\n\ndef get_impl_ver():\n    \"\"\"Return implementation version.\"\"\"\n    impl_ver = get_config_var(\"py_version_nodot\")\n    if not impl_ver or get_abbr_impl() == 'pp':\n        impl_ver = ''.join(map(str, get_impl_version_info()))\n    return impl_ver\n\n\ndef get_impl_version_info():\n    \"\"\"Return sys.version_info-like tuple for use in decrementing the minor\n    version.\"\"\"\n    if get_abbr_impl() == 'pp':\n        # as per https://github.com/pypa/pip/issues/2882\n        return (sys.version_info[0], sys.pypy_version_info.major,\n                sys.pypy_version_info.minor)\n    else:\n        return sys.version_info[0], sys.version_info[1]\n\n\ndef get_impl_tag():\n    \"\"\"\n    Returns the Tag for this specific implementation.\n    \"\"\"\n    return \"{0}{1}\".format(get_abbr_impl(), get_impl_ver())\n\n\ndef get_flag(var, fallback, expected=True, warn=True):\n    \"\"\"Use a fallback method for determining SOABI flags if the needed config\n    var is unset or unavailable.\"\"\"\n    val = get_config_var(var)\n    if val is None:\n        if warn:\n            logger.debug(\"Config variable '%s' is unset, Python ABI tag may \"\n                         \"be incorrect\", var)\n        return fallback()\n    return val == expected\n\n\ndef get_abi_tag():\n    \"\"\"Return the ABI tag based on SOABI (if available) or emulate SOABI\n    (CPython 2, PyPy).\"\"\"\n    soabi = get_config_var('SOABI')\n    impl = get_abbr_impl()\n    if not soabi and impl in ('cp', 'pp') and hasattr(sys, 'maxunicode'):\n        d = ''\n        m = ''\n        u = ''\n        if get_flag('Py_DEBUG',\n                    lambda: hasattr(sys, 'gettotalrefcount'),\n                    warn=(impl == 'cp')):\n            d = 'd'\n        if get_flag('WITH_PYMALLOC',\n                    lambda: impl == 'cp',\n                    warn=(impl == 'cp')):\n            m = 'm'\n        if get_flag('Py_UNICODE_SIZE',\n                    lambda: sys.maxunicode == 0x10ffff,\n                    expected=4,\n                    warn=(impl == 'cp' and\n                          sys.version_info < (3, 3))) \\\n                and sys.version_info < (3, 3):\n            u = 'u'\n        abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)\n    elif soabi and soabi.startswith('cpython-'):\n        abi = 'cp' + soabi.split('-')[1]\n    elif soabi:\n        abi = soabi.replace('.', '_').replace('-', '_')\n    else:\n        abi = None\n    return abi\n\n\ndef get_platform():\n    \"\"\"Return our platform name 'win32', 'linux_x86_64'\"\"\"\n    if sys.platform == 'darwin':\n        # distutils.util.get_platform() returns the release based on the value\n        # of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may\n        # be signficantly older than the user's current machine.\n        release, _, machine = platform.mac_ver()\n        split_ver = release.split('.')\n        return 'macosx_{0}_{1}_{2}'.format(split_ver[0], split_ver[1], machine)\n    # XXX remove distutils dependency\n    return distutils.util.get_platform().replace('.', '_').replace('-', '_')\n\n\ndef get_supported(versions=None, noarch=False):\n    \"\"\"Return a list of supported tags for each version specified in\n    `versions`.\n\n    :param versions: a list of string versions, of the form [\"33\", \"32\"],\n        or None. The first version will be assumed to support our ABI.\n    \"\"\"\n    supported = []\n\n    # Versions must be given with respect to the preference\n    if versions is None:\n        versions = []\n        version_info = get_impl_version_info()\n        major = version_info[:-1]\n        # Support all previous minor Python versions.\n        for minor in range(version_info[-1], -1, -1):\n            versions.append(''.join(map(str, major + (minor,))))\n\n    impl = get_abbr_impl()\n\n    abis = []\n\n    abi = get_abi_tag()\n    if abi:\n        abis[0:0] = [abi]\n\n    abi3s = set()\n    import imp\n    for suffix in imp.get_suffixes():\n        if suffix[0].startswith('.abi'):\n            abi3s.add(suffix[0].split('.', 2)[1])\n\n    abis.extend(sorted(list(abi3s)))\n\n    abis.append('none')\n\n    if not noarch:\n        arch = get_platform()\n        if sys.platform == 'darwin':\n            # support macosx-10.6-intel on macosx-10.9-x86_64\n            match = _osx_arch_pat.match(arch)\n            if match:\n                name, major, minor, actual_arch = match.groups()\n                actual_arches = [actual_arch]\n                if actual_arch in ('i386', 'ppc'):\n                    actual_arches.append('fat')\n                if actual_arch in ('i386', 'x86_64'):\n                    actual_arches.append('intel')\n                if actual_arch in ('ppc64', 'x86_64'):\n                    actual_arches.append('fat64')\n                if actual_arch in ('i386', 'ppc', 'x86_64'):\n                    actual_arches.append('fat32')\n                if actual_arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):\n                    actual_arches.append('universal')\n                tpl = '{0}_{1}_%i_%s'.format(name, major)\n                arches = []\n                for m in reversed(range(int(minor) + 1)):\n                    for a in actual_arches:\n                        arches.append(tpl % (m, a))\n            else:\n                # arch pattern didn't match (?!)\n                arches = [arch]\n        else:\n            arches = [arch]\n\n        # Current version, current API (built specifically for our Python):\n        for abi in abis:\n            for arch in arches:\n                supported.append(('%s%s' % (impl, versions[0]), abi, arch))\n\n        # Has binaries, does not use the Python API:\n        supported.append(('py%s' % (versions[0][0]), 'none', arch))\n\n    # No abi / arch, but requires our implementation:\n    for i, version in enumerate(versions):\n        supported.append(('%s%s' % (impl, version), 'none', 'any'))\n        if i == 0:\n            # Tagged specifically as being cross-version compatible\n            # (with just the major version specified)\n            supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))\n\n    # No abi / arch, generic Python\n    for i, version in enumerate(versions):\n        supported.append(('py%s' % (version,), 'none', 'any'))\n        if i == 0:\n            supported.append(('py%s' % (version[0]), 'none', 'any'))\n\n    return supported\n\nsupported_tags = get_supported()\nsupported_tags_noarch = get_supported(noarch=True)\n\nimplementation_tag = get_impl_tag()\n", "path": "pip/pep425tags.py"}]}