diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-16 22:18:25 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-16 22:19:26 -0400 |
commit | 39a37c0758f43b130e5163156facffbbe89cf9fa (patch) | |
tree | e06380f0eb50d615ce25a40ee6bb50766be0a8df | |
parent | 55456fe32ab2b5d7a4d476149ba935dbfd6e5fca (diff) | |
download | external_python_setuptools-39a37c0758f43b130e5163156facffbbe89cf9fa.tar.gz external_python_setuptools-39a37c0758f43b130e5163156facffbbe89cf9fa.tar.bz2 external_python_setuptools-39a37c0758f43b130e5163156facffbbe89cf9fa.zip |
Disable test on Python 2.
-rw-r--r-- | changelog.d/1753.change.rst | 4 | ||||
-rw-r--r-- | setuptools/tests/test_config.py | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/changelog.d/1753.change.rst b/changelog.d/1753.change.rst index c8b68026..08fa9ea4 100644 --- a/changelog.d/1753.change.rst +++ b/changelog.d/1753.change.rst @@ -1,4 +1,4 @@ ``attr:`` now extracts variables through rudimentary examination of the AST, -thereby supporting modules with third-party imports. If examining the AST +thereby supporting modules with third-party imports. If examining the AST fails to find the variable, ``attr:`` falls back to the old behavior of -importing the module. +importing the module. Works on Python 3 only. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 77b853eb..67992c04 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -10,6 +10,7 @@ from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration from setuptools.extern.six.moves import configparser +from setuptools.extern import six from . import py2_only, py3_only from .textwrap import DALS @@ -310,6 +311,10 @@ class TestMetadata: with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' + if six.PY2: + # static version loading is unsupported on Python 2 + return + config.write( '[metadata]\n' 'version = attr: fake_package.subpkg_b.mod.VERSION\n' |