Skip to content

Commit 39a37c0

Browse files
committed
Disable test on Python 2.
1 parent 55456fe commit 39a37c0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

changelog.d/1753.change.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
``attr:`` now extracts variables through rudimentary examination of the AST,
2-
thereby supporting modules with third-party imports. If examining the AST
2+
thereby supporting modules with third-party imports. If examining the AST
33
fails to find the variable, ``attr:`` falls back to the old behavior of
4-
importing the module.
4+
importing the module. Works on Python 3 only.

setuptools/tests/test_config.py

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from setuptools.dist import Distribution, _Distribution
1111
from setuptools.config import ConfigHandler, read_configuration
1212
from setuptools.extern.six.moves import configparser
13+
from setuptools.extern import six
1314
from . import py2_only, py3_only
1415
from .textwrap import DALS
1516

@@ -310,6 +311,10 @@ def test_version(self, tmpdir):
310311
with get_dist(tmpdir) as dist:
311312
assert dist.metadata.version == '2016.11.26'
312313

314+
if six.PY2:
315+
# static version loading is unsupported on Python 2
316+
return
317+
313318
config.write(
314319
'[metadata]\n'
315320
'version = attr: fake_package.subpkg_b.mod.VERSION\n'

0 commit comments

Comments
 (0)