Commit f7ede6da authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #962 from idlesign/deprecate_classifiers_subsection

Dropped support for classifiers subsection handling in setup.cfg
parents 3ddf493a 50830de1
...@@ -2302,10 +2302,10 @@ boilerplate code in some cases. ...@@ -2302,10 +2302,10 @@ boilerplate code in some cases.
long_description = file: README.rst long_description = file: README.rst
keywords = one, two keywords = one, two
license = BSD 3-Clause License license = BSD 3-Clause License
classifiers =
[metadata.classifiers] Framework :: Django
Framework :: Django Programming Language :: Python :: 3
Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.5
[options] [options]
zip_safe = False zip_safe = False
...@@ -2398,7 +2398,7 @@ author str ...@@ -2398,7 +2398,7 @@ author str
author_email author-email str author_email author-email str
maintainer str maintainer str
maintainer_email maintainer-email str maintainer_email maintainer-email str
classifiers classifier file:, section, list-comma classifiers classifier file:, list-comma
license file:, str license file:, str
description summary file:, str description summary file:, str
long_description long-description file:, str long_description long-description file:, str
......
...@@ -412,17 +412,6 @@ class ConfigMetadataHandler(ConfigHandler): ...@@ -412,17 +412,6 @@ class ConfigMetadataHandler(ConfigHandler):
'version': self._parse_version, 'version': self._parse_version,
} }
def parse_section_classifiers(self, section_options):
"""Parses configuration file section.
:param dict section_options:
"""
classifiers = []
for begin, (_, rest) in section_options.items():
classifiers.append('%s :%s' % (begin.title(), rest))
self['classifiers'] = classifiers
def _parse_version(self, value): def _parse_version(self, value):
"""Parses `version` option value. """Parses `version` option value.
......
...@@ -257,6 +257,7 @@ class TestMetadata: ...@@ -257,6 +257,7 @@ class TestMetadata:
def test_classifiers(self, tmpdir): def test_classifiers(self, tmpdir):
expected = set([ expected = set([
'Framework :: Django', 'Framework :: Django',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.5',
]) ])
...@@ -269,19 +270,21 @@ class TestMetadata: ...@@ -269,19 +270,21 @@ class TestMetadata:
tmpdir.join('classifiers').write( tmpdir.join('classifiers').write(
'Framework :: Django\n' 'Framework :: Django\n'
'Programming Language :: Python :: 3\n'
'Programming Language :: Python :: 3.5\n' 'Programming Language :: Python :: 3.5\n'
) )
with get_dist(tmpdir) as dist: with get_dist(tmpdir) as dist:
assert set(dist.metadata.classifiers) == expected assert set(dist.metadata.classifiers) == expected
# From section. # From list notation
config.write( config.write(
'[metadata.classifiers]\n' '[metadata]\n'
'Framework :: Django\n' 'classifiers =\n'
'Programming Language :: Python :: 3.5\n' ' Framework :: Django\n'
' Programming Language :: Python :: 3\n'
' Programming Language :: Python :: 3.5\n'
) )
with get_dist(tmpdir) as dist: with get_dist(tmpdir) as dist:
assert set(dist.metadata.classifiers) == expected assert set(dist.metadata.classifiers) == expected
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment