summaryrefslogtreecommitdiff
path: root/setuptools/dist.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index c074468b..43a51ad8 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -599,6 +599,7 @@ class Distribution(_Distribution):
val = parser.get(section, opt)
opt = self.dash_to_underscore_warning(opt, section)
+ opt = self.uppercase_warning(opt, section)
opt_dict[opt] = (filename, val)
# Make the ConfigParser forget everything (so we retain
@@ -636,6 +637,17 @@ class Distribution(_Distribution):
% (opt, underscore_opt))
return underscore_opt
+ def uppercase_warning(self, opt, section):
+ if section in ('metadata',) and (any(c.isupper() for c in opt)):
+ lowercase_opt = opt.lower()
+ warnings.warn(
+ "Usage of uppercase key '%s' in '%s' will be deprecated in future "
+ "versions. Please use lowercase '%s' instead"
+ % (opt, section, lowercase_opt)
+ )
+ return lowercase_opt
+ return opt
+
# FIXME: 'Distribution._set_command_options' is too complex (14)
def _set_command_options(self, command_obj, option_dict=None): # noqa: C901
"""