summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setuptools/dist.py4
-rw-r--r--setuptools/tests/test_config.py16
2 files changed, 10 insertions, 10 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index d1587e34..7cebcb37 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -600,7 +600,7 @@ class Distribution(_Distribution):
continue
val = parser.get(section, opt)
- opt = self.dash_to_underscore_warning(opt, section)
+ opt = self.warn_dash_deprecation(opt, section)
opt = self.make_option_lowercase(opt, section)
opt_dict[opt] = (filename, val)
@@ -626,7 +626,7 @@ class Distribution(_Distribution):
except ValueError as e:
raise DistutilsOptionError(e) from e
- def dash_to_underscore_warning(self, opt, section):
+ def warn_dash_deprecation(self, opt, section):
if section in (
'options.extras_require', 'options.data_files',
):
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py
index 1ff5ee41..21f1becd 100644
--- a/setuptools/tests/test_config.py
+++ b/setuptools/tests/test_config.py
@@ -507,10 +507,9 @@ class TestMetadata:
with get_dist(tmpdir):
pass
- def test_dash_to_underscore_warning(self, tmpdir):
- # dash_to_underscore_warning() is a method in setuptools.dist
- # remove this test and method when dash convert to underscore in setup.cfg
- # is no longer supported
+ def test_warn_dash_deprecation(self, tmpdir):
+ # warn_dash_deprecation() is a method in setuptools.dist
+ # remove this test and the method when no longer needed
fake_env(
tmpdir,
'[metadata]\n'
@@ -523,11 +522,12 @@ class TestMetadata:
with pytest.warns(UserWarning, match=msg):
with get_dist(tmpdir) as dist:
metadata = dist.metadata
- assert metadata.author_email == 'test@test.com'
- assert metadata.maintainer_email == 'foo@foo.com'
- def test_uppercase_warning(self, tmpdir):
- # remove this test and the method uppercase_warning() in setuptools.dist
+ assert metadata.author_email == 'test@test.com'
+ assert metadata.maintainer_email == 'foo@foo.com'
+
+ def test_make_option_lowercase(self, tmpdir):
+ # remove this test and the method make_option_lowercase() in setuptools.dist
# when no longer needed
fake_env(
tmpdir,